on-mouse-over of a tag in the available-tag-list, display amount of photos matching...
authorAndreas Unterkircher <unki@netshadow.at>
Sun, 8 Jun 2008 05:36:22 +0000 (07:36 +0200)
committerAndreas Unterkircher <unki@netshadow.at>
Sun, 17 Aug 2008 12:52:38 +0000 (14:52 +0200)
Signed-off-by: Andreas Unterkircher <unki@netshadow.at>
phpfspot.class.php

index 4bc3266d734731a10025f44d9c528d7f0193438e..cb1b09c3ab61df84b1da6b4e1f26557fd404eb6a 100644 (file)
@@ -841,6 +841,9 @@ class PHPFSPOT {
       // loop through our tag array
       foreach ($tags as $key => $value) {
 
       // loop through our tag array
       foreach ($tags as $key => $value) {
 
+         /* has the currently processed tag already been added to
+            the selected tag list? if so, ignore it here...
+         */
          if(isset($_SESSION['selected_tags']) && in_array($key, $_SESSION['selected_tags']))
             continue;
 
          if(isset($_SESSION['selected_tags']) && in_array($key, $_SESSION['selected_tags']))
             continue;
 
@@ -849,7 +852,7 @@ class PHPFSPOT {
          // multiply by the font-size increment ($size)
          // and add the $min_size set above
          $size = $min_size + (($value - $min_qty) * $step);
          // multiply by the font-size increment ($size)
          // and add the $min_size set above
          $size = $min_size + (($value - $min_qty) * $step);
-          // uncomment if you want sizes in whole %:
+         // uncomment if you want sizes in whole %:
          $size = ceil($size);
 
          $color = $min_sat + ($value - $min_qty) * $step_sat;
          $size = ceil($size);
 
          $color = $min_sat + ($value - $min_qty) * $step_sat;
@@ -859,10 +862,20 @@ class PHPFSPOT {
          $b = '88';
 
          if(isset($this->tags[$key])) {
          $b = '88';
 
          if(isset($this->tags[$key])) {
-            if($this->is_user_friendly_url())
-               $output.= "<a href=\"". $this->cfg->web_path ."/tag/". $key ."\" onclick=\"Tags('add', ". $key ."); return false;\" class=\"tag\" style=\"font-size: ". $size ."%; color: #". $r.$g.$b .";\">". $this->tags[$key] ."</a>, ";
-            else
-               $output.= "<a href=\"". $this->cfg->web_path ."/index.php?mode=showpi\" onclick=\"Tags('add', ". $key ."); return false;\" class=\"tag\" style=\"font-size: ". $size ."%; color: #". $r.$g.$b .";\">". $this->tags[$key] ."</a>, ";
+            if($this->is_user_friendly_url()) {
+               $output.= "<a href=\"". $this->cfg->web_path ."/tag/". $key ."\"
+                  onclick=\"Tags('add', ". $key ."); return false;\"
+                  class=\"tag\"
+                  style=\"font-size: ". $size ."%; color: #". $r.$g.$b .";\"
+                  title=\"Tag ". $this->tags[$key] .", ". $tags[$key] ." picture(s)\">". $this->tags[$key] ."</a>, ";
+            }
+            else {
+               $output.= "<a href=\"". $this->cfg->web_path ."/index.php?mode=showpi\"
+                  onclick=\"Tags('add', ". $key ."); return false;\"
+                  class=\"tag\"
+                  style=\"font-size: ". $size ."%; color: #". $r.$g.$b .";\"
+                  title=\"Tag ". $this->tags[$key] .", ". $tags[$key] ." picture(s)\">". $this->tags[$key] ."</a>, ";
+            }
          }
       }
 
          }
       }