summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Unterkircher <unki@netshadow.at>2008-06-08 07:36:22 +0200
committerAndreas Unterkircher <unki@netshadow.at>2008-08-17 14:52:38 +0200
commitaaa8698f7538163830b0cb89eb1881860ee0c71c (patch)
tree61ffb40628a7cc18432923d7ede23944a37799ef
parentf6b2d6438f1bb0df5fcc9159a38d47628466f80a (diff)
on-mouse-over of a tag in the available-tag-list, display amount of photos matching this tag
Signed-off-by: Andreas Unterkircher <unki@netshadow.at>
-rw-r--r--phpfspot.class.php23
1 files changed, 18 insertions, 5 deletions
diff --git a/phpfspot.class.php b/phpfspot.class.php
index 4bc3266..cb1b09c 100644
--- a/phpfspot.class.php
+++ b/phpfspot.class.php
@@ -841,6 +841,9 @@ class PHPFSPOT {
// 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;
@@ -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);
- // 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;
@@ -859,10 +862,20 @@ class PHPFSPOT {
$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>, ";
+ }
}
}