![]() |
|
tweaking the last updated album thumbnails - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: General support (https://forum.zenphoto.org/forum-4.html) +--- Thread: tweaking the last updated album thumbnails (/thread-3587.html) |
tweaking the last updated album thumbnails - flu - 2008-08-25 Hi, I'm trying to get some custom thumbnails for my last updated albums and print them on the main page of my galley, so I try to tweak the image_album_statistics.php plugin but I can't manage to mix the getAlbumThumb() function and the printCustomAlbumThumbImage() function. Would you be kind enough to tell me what I have to change in this line : echo "<img src=\"".$tempalbum->getAlbumThumb()."\">\n"; (line 140 of image_album_statistics.php) to get a 75px x 75px square thumbnail for example (or maybe a simpler way to proceed...) ? Thank you for your time. (something else : I don't see the search form anymore till the forum upgrade. Is it normal ?) tweaking the last updated album thumbnails - acrylian - 2008-08-25 Hm, good idea, we probably should have that as an option... You would have to use `$tempalbum->getAlbumThumbImage()` and a image url like this: `WEBPATH.'/'.ZENFOLDER.'/i.php?a='.$tempalbum->name.'&i='.$tempalbum->getAlbumThumbImage()&cw=75&ch=75` More about these direct image processing options on top of `zp-core/i.php` tweaking the last updated album thumbnails - flu - 2008-08-25 Danke Acrylian ! Excuse me but... where am I supposed to add WEBPATH.'/'.ZENFOLDER.'/i.php?a='.$tempalbum->name.'&i='.$tempalbum->getAlbumThumbImage()&cw=75&ch=75 exactly ? As I'm not a coder (as you guess) this simple question is very important to me (anyway I can try to find it by myself but it will take a year getting 1 billion syntax errors). tweaking the last updated album thumbnails - flu - 2008-08-26 Well, I don't get it : I'm not sure how to incorporate this option into my function printAlbumStatisticItem. Could you please tell me how to make it work with it : ` function printAlbumStatisticItem($album, $option, $showtitle=false, $showdate=false, $showdesc=false, $desclength=40,$showstatistic='') { global $_zp_gallery; $albumpath = rewrite_path("/", "index.php?album="); $tempalbum = new Album($_zp_gallery, $album['folder']); echo "<li><a href=\"".$albumpath.pathurlencode($tempalbum->name)."\" title=\"" . htmlspecialchars(strip_tags($tempalbum->getTitle()),ENT_QUOTES) . "\">\n"; echo "<img src=\"".$tempalbum->getAlbumThumb()."\"></a>\n "; if($showtitle) { echo "<a href=\"".$albumpath.pathurlencode($tempalbum->name)."\" title=\"" . htmlspecialchars(strip_tags($tempalbum->getTitle()),ENT_QUOTES) . "\">\n"; echo $tempalbum->getTitle()."</a>\n"; } ` tweaking the last updated album thumbnails - acrylian - 2008-08-26 The code I posted should replace the `$tempalbum->getAlbumThumb()` in this line `echo "<img src=\"".$tempalbum->getAlbumThumb()."\"></a>\n ";` I definatly think about adding that as an option parameter some time, but, well, these functions have already a lot parameters... tweaking the last updated album thumbnails - flu - 2008-08-26 Thanks Acrylian. I'm sorry but I just get an error processing like that. I'm not sure to understand exactly where I have to put `WEBPATH.'/'.ZENFOLDER.'/i.php?a='.$tempalbum->name.'&i='.$tempalbum->getAlbumThumbImage()&cw=75&ch=75` exactly in the function printAlbumStatisticItem : ` function printAlbumStatisticItem($album, $option, $showtitle=false, $showdate=false, $showdesc=false, $desclength=40,$showstatistic='') { global $_zp_gallery; $albumpath = rewrite_path("/", "index.php?album="); $tempalbum = new Album($_zp_gallery, $album['folder']); echo "<li><a href=\"".$albumpath.pathurlencode($tempalbum->name)."\" title=\"" . htmlspecialchars(strip_tags($tempalbum->getTitle()),ENT_QUOTES) . "\">\n"; echo "<img src=\"".$tempalbum->getAlbumThumbImage()."\"></a>\n "; ` Sorry to ask again... tweaking the last updated album thumbnails - acrylian - 2008-08-26 Change `echo "<img src=\"".$tempalbum->getAlbumThumbImage()."\"></a>\n ";` to `echo "<img src=\"".WEBPATH."/".ZENFOLDER."/i.php?a=".$tempalbum->name."&i=".$tempalbum->getAlbumThumbImage()."&cw=75&ch=75\"></a>\n ";` Sorry there was a typo (beware of mixing single and doube quotes!). Also I did not try that myself yet, it should theoretically work... tweaking the last updated album thumbnails - flu - 2008-08-26 Thank you Acrylian. In fact I get this in my generated html code : `[img]/mywonderfullwebsite/zenphoto/zp-core/i.php?a=album-name/subalbum-name&i=Object&cw=75&ch=75[/img]` which doesn't print the thumbnail. When I directly paste the adress above (mywonderfullwebsite/zenphoto/zp-core/i.php?a=album-name/subalbum-name&i=Object&cw=75&ch=75) in my browser adress bar, I get : The Zenphoto object you are requesting cannot be found. Album: albums/album-name/subalbum-name Image: Object Theme page: index tweaking the last updated album thumbnails - acrylian - 2008-08-27 Ok, I had an error in my example. Since I think about adding it as an option, here we go again: Replace the line in question with this: ` $albumthumb = $tempalbum->getAlbumThumbImage(); echo "<img src=\"".WEBPATH."/".ZENFOLDER."/i.php?a=".$tempalbum->name."&i=".$albumthumb->name."&s=75&cw=75&ch=75\"></a>\n "; ` tweaking the last updated album thumbnails - flu - 2008-08-27 Woaw ! That did the trick ! Wunderbach ! Thank you, Acrylian ! |