summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Unterkircher <unki@netshadow.at>2008-06-08 07:36:22 +0200
committerAndreas Unterkircher <unki@netshadow.at>2008-06-08 07:36:22 +0200
commitc2b94477b740ee563cc5e2a80cc641fd6c73318b (patch)
tree0ed3ff9f1586e9c6187811c88cba21af5d6f54e8
parent3d5877ab7f5b9cf885b74bbb881115050f8d5ed8 (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 ae58790..303c355 100644
--- a/phpfspot.class.php
+++ b/phpfspot.class.php
@@ -840,6 +840,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;
@@ -848,7 +851,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;
@@ -858,10 +861,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>, ";
+ }
}
}