From d902cdfd067b6ae1356c537b4d5605307f3ed524 Mon Sep 17 00:00:00 2001 From: Andreas Unterkircher Date: Thu, 7 Jun 2007 15:09:29 +0000 Subject: show additional infos in the image preview bubble git-svn-id: file:///var/lib/svn/phpfspot/trunk@40 fa6a889d-dae6-447d-9e79-4ba9a3039384 --- phpfspot.class.php | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'phpfspot.class.php') diff --git a/phpfspot.class.php b/phpfspot.class.php index 5b18be5..ab5cb9e 100644 --- a/phpfspot.class.php +++ b/phpfspot.class.php @@ -239,6 +239,32 @@ class PHPFSPOT { } // showPhotoIndex() + public function showBubbleDetails($photo, $direction) + { + if($direction == "up") + $direction = "bubbleimg_up"; + else + $direction = "bubbleimg_down"; + + $details = $this->get_photo_details($photo); + + $image_url = "phpfspot_img.php?idx=". $photo ."&width=200"; + + $filesize = filesize($this->translate_path($details['directory_path']) ."/". $details['name']); + $filesize = rand($filesize/1024, 2); + + $img = getimagesize($this->translate_path($details['directory_path']) ."/". $details['name']); + + $this->tmpl->assign('file_size', $filesize); + $this->tmpl->assign('width', $img[0]); + $this->tmpl->assign('height', $img[1]); + $this->tmpl->assign('file_name', $details['name']); + $this->tmpl->assign('image_id', $direction); + $this->tmpl->assign('image_url', $image_url); + $this->tmpl->show("bubble_details.tpl"); + + } + } ?> -- cgit v1.2.3-18-g5258