Simple addition to make SEARCH MODULE a TAG Module

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
kendo451

Simple addition to make SEARCH MODULE a TAG Module

Post by kendo451 »

CMSMS has needed a TAG module for some time.  

However, the Search module could easily be used as a tagging module if it has one minor change:

The ability to register a pretty URL path for the root results page and convert parameters into search terms.

Search could very easily double as a TAGS module with one or two simple additions:

1. Allow registration of a result page alias, such as:

http://yoursite.com/tags

or

http://yoursite.com/search

2. Have search generate a search results page based on the parameter.

Examples:

Any url like this:

http://yoursite.com/tag/searchterm/

Will simple show a search results page for "searchterm"

and

http://yoursite.com/tag/a-search-phrase/

will show a search results page for "a search phrase"

I posted a feature request here:

http://dev.cmsmadesimple.org/feature_request/view/4647
Last edited by kendo451 on Thu Mar 04, 2010 8:29 pm, edited 1 time in total.
kendo451

Re: Simple addition to make SEARCH MODULE a TAG Module

Post by kendo451 »

Alternately, someone could make a TAG module that registers the Pretty URL path (tag-alias), converts the URL into search terms and just uses an instance SEARCH MODULE for the actual search and outputs the result in the tag result template.

Then in your news article templates, you could just add a one-line field for comma separated tags, that you convert into links to /tag-alias/tagname.

A Javacript to add tag suggestions would require hard coding News or whatever other module you want to use it with.

But, you could put a UDT in your template that searches the article, computes keywords and makes the tags.
JeremyBASS

Re: Simple addition to make SEARCH MODULE a TAG Module

Post by JeremyBASS »

have you tired this? http://dev.cmsmadesimple.org/projects/s ... gging  it worked the last time I tried.. Cheers -J
kendo451

Re: Simple addition to make SEARCH MODULE a TAG Module

Post by kendo451 »

Yes, I've tried that but it doesn't have a way of dealing with news/blog or whatever module items, IIRC.
JeremyBASS

Re: Simple addition to make SEARCH MODULE a TAG Module

Post by JeremyBASS »

well I'd think it'd be easy to use that to make chages where it'd pull from the search... Just a thought since it have the sizing and what not.. May -be a good jumping point...
kendo451

Re: Simple addition to make SEARCH MODULE a TAG Module

Post by kendo451 »

True, I'll try it.
Post Reply

Return to “Developers Discussion”