Member
Member
hkdigit   2010-12-29, 14:17
#1
Hi,

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

<?php printPopularImages(5, '', FALSE, FALSE, FALSE, 0, '', 75, 75, TRUE, FALSE) ?>

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.
Administrator
Administrator
acrylian   2010-12-29, 14:38
#2
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)
Member
Member
hkdigit   2010-12-29, 15:01
#3
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 :

<?php printPopularImages(5, getAlbumId( ), FALSE, FALSE, FALSE, 0, '', 75, 75, TRUE, FALSE) ?>

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

2. It's working now. Thanks!
Administrator
Administrator
acrylian   2010-12-29, 15:21
#4
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.
Member
Member
hkdigit   2010-12-29, 16:32
#5
#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/
  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.