ZenphotoCMS Forum
printPopularImages() for current album - 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: printPopularImages() for current album (/thread-8008.html)



printPopularImages() for current album - hkdigit - 2010-12-29

Hi,

I try modify the template file album.php to display popular images based on current album by following function:

However, it display the popular images for all album. So any function return current album for $albumfolder parameter?

Another question:

Is it possible to show page number for HTML title?

e.g. http://www.hkgimages.com/pic/page/2/

HTML page title show : Page 2 - Hong Kong Images

Many thanks in advance.




printPopularImages() for current album - acrylian - 2010-12-29

  1. http://www.zenphoto.org/documentation/plugins/_zp-extensions---image_album_statistics.php.html#functionprintPopularImages

  2. Yes, http://www.zenphoto.org/documentation/functions/_template-functions.php.html#functiongetCurrentPage (the doc is misleading, it gets the current page number)




printPopularImages() for current album - hkdigit - 2010-12-29

Dear acrylian,

Thanks again for your reply.

  1. I still don't know how to pass the current albumfolder string to the function. Any function like getCurrnetAlbumfolder()?

string $albumfolder: folder of an specific album

I try using getAlbumId(), but got runtime error :

Example: http://www.hkgimages.com/pic/weather/page/2/

  1. It's working now. Thanks!



printPopularImages() for current album - acrylian - 2010-12-29

  1. Of course since getAlbumId() gets the id number of course. $_zp_current_album->name gets the folder name of the current album. See also our object model tutorial.



printPopularImages() for current album - hkdigit - 2010-12-29

1 It's working now. Thanks ^_^


Beside, it's not related w/ zenphoto, but the popular div seems overlap with commentcontent div... any hints how to fix it?

Ref: http://www.hkgimages.com/pic/food/