FreeTag (possible) improvement and fix

Creating and modifying plugins.
Post Reply
LazyBadger
Regular
Posts: 176
Joined: Mon Aug 25, 2008 12:25 pm
Location: Russia
Contact:

FreeTag (possible) improvement and fix

Post 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);
Attachments
serendipity_event_freetag.zip
Diff for serendipity_event_freetag.php
(624 Bytes) Downloaded 282 times
Quis custodiet ipsos custodes?
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: FreeTag (possible) improvement and fix

Post by Timbalu »

Hi

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

Ian
LazyBadger
Regular
Posts: 176
Joined: Mon Aug 25, 2008 12:25 pm
Location: Russia
Contact:

Re: FreeTag (possible) improvement and fix

Post 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
Quis custodiet ipsos custodes?
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: FreeTag (possible) improvement and fix

Post 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
LazyBadger
Regular
Posts: 176
Joined: Mon Aug 25, 2008 12:25 pm
Location: Russia
Contact:

Re: FreeTag (possible) improvement and fix

Post 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
Quis custodiet ipsos custodes?
evanslee
Regular
Posts: 28
Joined: Tue Jul 27, 2010 3:21 pm

Re: FreeTag (possible) improvement and fix

Post 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
Post Reply