Loading...
 
Features / Usability

Features / Usability


freetags_most_popular module bug with multiple-word tags

posts: 43 United States

To replicate:

  1. Assign freetags_most_popular to a column.

  2. Tag enough wiki pages with the same two-word combo (e.g. "design control") that it shows up in the module.

  3. Click on that tag in the module.


This will open tiki-browse_freetags.php?tag=design%20control , which will show the words in the Tags search box without quotes. The results will not show pages tagged with "design control", but instead will show pages tagged with either "design" or "control".

Now, by contrast, if you click on the "design control" tag in the cloud displayed on tiki-browse_freetags.php and click "Go", it will open tiki-browse_freetags.php?tag=%22design+control%22, which will display the correct results.

The possible workarounds here of (a) cramming the words together into one, or (b) sticking to single-word tags, are not particularly appealling. We enforce the all-lowercase rule, so removing the spaces makes the tag hard to read without ))CamelCase((. And there are many useful multiple-word tags in our company vocabulary that are applied differently than each single-word component.

So, hopefully the module can be modified to handle such tags the same way that tiki-browse_freetags.php does.

- ))MacLeod((

posts: 43 United States
Rick Sapir / Tiki for Smarties wrote:
How did you get your freetags to accept spaces? The docs give no indication that this is even possible. :-(


Sure they do:

Tags page in doc.tw.o wrote:
The syntax of a tag is defined by the admin setting. Tags are separated by space(s). If you want to enter a tag with a space - if the admin setting allows it, you must enclose it into double quotes. Example: in the module freetag, if you enter: "computer science" ibm pc, you will add 3 tags "computer science", "ibm" and "pc"



- ))MacLeod((

posts: 43 United States
Rick Sapir / Tiki for Smarties wrote:
How did you get your freetags to accept spaces? The docs give no indication that this is even possible. :-(


Ah, I should also specify that I'm adding these multiple-word tags via the freetag ("Folksonomy") module, and not in the wiki page edit form.

- ))MacLeod((

posts: 43 United States
MacLeod wrote:
Ah, I should also specify that I'm adding these multiple-word tags via the freetag ("Folksonomy") module, and not in the wiki page edit form.


Oh, hell. I just realized that if you apply a multiple-word tag to a page via the "Folksonomy" module, and then edit that page, they become one-word tags. Clearing out the tags field in the edit form doesn't help, it just removes all the tags. Damnation.

ricks99, your underscore approach looks like the way to go. We need to update the Tags page on doc.tw.o, though, to revise the instructions I quoted earlier.

*sigh*... I've got a bunch of tags to update...

- ))MacLeod((

posts: 289 United States

Are there any reasons why I couldn't use a dash ('-') instead of an underscore? It's just my personal preference but I tend to associate underscore with system type uses such as variables or file names etc. Using the dash or hyphen is more logical to me as it suggests that two words belong together (as in the grammatical use of the symbol).

It's not really that important, and again I stress that it's a purely personal preference thing, I don't perceive one to be superior over the other. I just know that particularly with URL encoding certain symbols should probably be avoided, so the dash might not actually be the best choice even though I would prefer it.