From c2b94477b740ee563cc5e2a80cc641fd6c73318b Mon Sep 17 00:00:00 2001 From: Andreas Unterkircher Date: Sun, 8 Jun 2008 07:36:22 +0200 Subject: [PATCH] on-mouse-over of a tag in the available-tag-list, display amount of photos matching this tag Signed-off-by: Andreas Unterkircher --- phpfspot.class.php | 23 ++++++++++++++++++----- 1 file 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.= "cfg->web_path ."/tag/". $key ."\" onclick=\"Tags('add', ". $key ."); return false;\" class=\"tag\" style=\"font-size: ". $size ."%; color: #". $r.$g.$b .";\">". $this->tags[$key] .", "; - else - $output.= "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] .", "; + if($this->is_user_friendly_url()) { + $output.= "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] .", "; + } + else { + $output.= "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] .", "; + } } } -- 2.25.1