From: <de...@de...> - 2007-06-12 09:23:31
|
Author: ArthurClemens Date: 2007-06-12 04:23:30 -0500 (Tue, 12 Jun 2007) New Revision: 14094 Modified: twiki/branches/MAIN/twikiplugins/TagMePlugin/data/TWiki/TagMePlugin.txt twiki/branches/MAIN/twikiplugins/TagMePlugin/lib/TWiki/Plugins/TagMePlugin.pm Log: Item4234: second fix for division by zero Modified: twiki/branches/MAIN/twikiplugins/TagMePlugin/data/TWiki/TagMePlugin.txt =================================================================== --- twiki/branches/MAIN/twikiplugins/TagMePlugin/data/TWiki/TagMePlugin.txt 2007-06-12 03:38:06 UTC (rev 14093) +++ twiki/branches/MAIN/twikiplugins/TagMePlugin/data/TWiki/TagMePlugin.txt 2007-06-12 09:23:30 UTC (rev 14094) @@ -4,7 +4,7 @@ Plugin to tag wiki content collectively in order to find content by tags and to get a meaningful page ranking. <div class="twikiNotification" style="padding:.5em 20px; margin:1em 0; background-color:#ffc;"> -__Note__: If you have upgraded !TagMePlugin and appear to have lost all your old tags: copy all your tag files from =pub/TWiki/TagMePlugin/= files to =pub/_work_areas/TagMePlugin/= and they should magically re-appear. +__Note__: (TWiki 4.2) If you have upgraded !TagMePlugin and appear to have lost all your old tags: copy all your tag files from =pub/TWiki/TagMePlugin/= files to =pub/_work_areas/TagMePlugin/= and they should magically re-appear. </div> %TOC% @@ -337,7 +337,7 @@ | Plugin Author: | TWiki:Main.TWikiContributor ([[http://www.structuredwikis.com/peter.html][blog]]) | | Copyright: | © 2006, Peter@Thoeny.org, [[http://www.structuredwikis.com/][StructuredWikis LLC]] | | License: | GPL ([[http://www.gnu.org/copyleft/gpl.html][GNU General Public License]]) | -| Plugin Version: | 11 June 2007 (V1.042) | +| Plugin Version: | 12 June 2007 (V1.043) | | Change History: | <!-- versions below in reverse order --> | | 11 Jun 2007: | Arthur Clemens: fixed sizing of tags with the same tag count; fixed CSS class for select box; updated documentation with "How to put tags on every page". | | 07 Jun 2007: | Arthur Clemens: removed dependency on (unreleased) TWiki 4.2. | Modified: twiki/branches/MAIN/twikiplugins/TagMePlugin/lib/TWiki/Plugins/TagMePlugin.pm =================================================================== --- twiki/branches/MAIN/twikiplugins/TagMePlugin/lib/TWiki/Plugins/TagMePlugin.pm 2007-06-12 03:38:06 UTC (rev 14093) +++ twiki/branches/MAIN/twikiplugins/TagMePlugin/lib/TWiki/Plugins/TagMePlugin.pm 2007-06-12 09:23:30 UTC (rev 14094) @@ -33,7 +33,7 @@ $alphaNum $doneHeader $normalizeTagInput $lineRegex $topicsRegex ); -$VERSION = '1.042'; +$VERSION = '1.043'; $RELEASE = 'TWiki 4'; $pluginName = 'TagMePlugin'; # Name of this Plugin @@ -487,7 +487,8 @@ my $largestItem = $ordered[$#ordered]; my $smallest = $order{$smallestItem}; my $largest = $order{$largestItem}; - my $sizingFactor = ($maxSize - $minSize) / ($largest - $smallest); + my $div = ($largest - $smallest) || 1; # prevent division by zero + my $sizingFactor = ($maxSize - $minSize) / $div; my $size = 0; my $tmpSep = '_#_'; $text = join( |