freetags bug: small caps after edit

Creating and modifying plugins.
Post Reply
Josh
Regular
Posts: 110
Joined: Mon Jul 18, 2005 3:02 pm
Location: Berlin
Contact:

freetags bug: small caps after edit

Post by Josh »

When I create an entry I insert tags. I start each tag with a capitalized letter. The entry is published with tags, that start with a capitalized letter.

However, when I click on "edit" to modify something I wrote in an entry, the tags are automatically changed to small caps and I have to change them all again before hitting "save."

I am using the latest version of the freetags plugin.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: freetags bug: small caps after edit

Post by garvinhicking »

This is actually intentional to prevent authors using upper- or lowercased tags, that would lead to duplicate tags. So the plugin tries to only apply lowercasing everywhere to have a central tagging nomenclature.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Josh
Regular
Posts: 110
Joined: Mon Jul 18, 2005 3:02 pm
Location: Berlin
Contact:

Post by Josh »

Thank you.

So far I did not have any problem with duplication.

Here http://atlanticreview.org/plugin/freetag/Germany
you will see both entries tagged "germany" and "Germany".

The side bar shows only "Germany" and does not show "germany."

It just does not look very good that some tags start with an lower case and other start with an uppercase.

I guess it would require too much work to have each tag start with an uppercase. Okay, I can get used to lowercases.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

You might be able to easily tweak this with some javascripting/PHP.

You can edit your serendipity_event_freetag.php file and search for all occurences of "strtolower". Remove those (as well as the leading "(" and trailing ")" of the function call.

Then search for ".toLowerCase()" and completely strip that.

But the easier way would be to adjust yourself to lowercase tags ;)

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply