Page 1 of 1

FreeTag (possible) improvement and fix

Posted: Mon Jan 10, 2011 4:34 pm
by LazyBadger
When for (most) themes we have dynamic content in $head_subtitle, duplication of PLUGIN_EVENT_FREETAG_USING in .../plugin/tag/... URL seems at least ugly

Improvement
Can we'll have templated output of related tags somehow (as it done for Related)?

Fix
With this small changes output seems more correct (-1 string of H) and logical (class replacement)

Code: Select all

--- serendipity_event_freetag.php	Sun Jan 9 10:28:36 2011 UTC
+++ serendipity_event_freetag-new.php	Mon Jan 10 14:34:38 2011 UTC
@@ -1259,12 +1259,12 @@
         $tags = $this->getTagCloudTags($tag);
 
         echo '<div class="serendipity_Entry_Date freetag_cloud">';
-        echo '<h2 class="serendipity_date">';
+/*        echo '<h2 class="serendipity_date">';
         $tagTitle = is_array($this->displayTag) ? implode(' + ',$this->displayTag) : $this->displayTag;
         printf (PLUGIN_EVENT_FREETAG_USING, htmlspecialchars($tagTitle));
-        echo '</h2>';
+        echo '</h2>'; */
         echo '<div class="serendipity_freetag_taglist">';
-        echo '<p class="serendipity_freetag_taglist_related">' . PLUGIN_EVENT_FREETAG_RELATED_TAGS . '</p>' . "\n";
+        echo '<p class="serendipity_title">' . PLUGIN_EVENT_FREETAG_RELATED_TAGS . '</p>' . "\n";
 
         if (!empty($tags)) {
             $min = $this->get_config('min_percent', 100);

Re: FreeTag (possible) improvement and fix

Posted: Mon Jan 10, 2011 4:45 pm
by Timbalu
Hi

Not a good idea. At least in my plugin, based on bulletproof, this would break approved behaviour!

Ian

Re: FreeTag (possible) improvement and fix

Posted: Mon Jan 10, 2011 4:50 pm
by LazyBadger
Timbalu wrote:this would break approved behaviour!
In which area? H2 is too big in context, just p for section title deprecate tags block

Re: FreeTag (possible) improvement and fix

Posted: Mon Jan 10, 2011 5:01 pm
by Timbalu
Oops, I didnt scroll to the end, sorry.
Well, this replace with p is possible, but IMHO not needed. I dont see any duplication.
Lets see what the others say.

Ian

Re: FreeTag (possible) improvement and fix

Posted: Mon Jan 10, 2011 5:14 pm
by LazyBadger
Timbalu wrote: I dont see any duplication.
In case of using

Code: Select all

...
    <h2><a class="homelink2" href="{$serendipityBaseURL}">{$head_subtitle|@default:$blogDescription}</a></h2> 
...
in index.tpl filter by tag (unmodified version) will show text from PLUGIN_EVENT_FREETAG_USING string twice: in header and immediately below. Themes with removed $head_subtitle or with $head_subtitle==$blogDescription aren't affected

Re: FreeTag (possible) improvement and fix

Posted: Thu Jan 20, 2011 7:44 pm
by evanslee
I have just made a tweak to highlight the tags red when clicked on, it helps me to see which ones i have not yet chosen..

from

Code: Select all

echo "<a href=\"#tagListAnchor\" style=\"text-decoration: none\" onClick=\"addTag('$tag')\">$tag</a>, ";
to

Code: Select all

echo "<a href=\"#tagListAnchor\" style=\"text-decoration: none\" onClick=\"addTag('$tag');this.style.color='red'\">$tag</a>, ";
Regards,
Lee Evans