Member
Member
edasque   2008-02-14, 22:42
#1
If on the index page (in the albums loop ( <?php while (next_album()): ?> ) I want to display the hitcounter for each of the albums I list,

Viewed <?php echo hitcounter("album"); ?> times

doesn't work, right ? It displays not the context album but the parent (root album in this case). Any other way to do it ?
Member
Member
sbillard   2008-02-14, 23:10
#2
call hitcounter with the following parameters:

`$count = hitcounter('album', true, $album->getAlbumID());` where `$album` is the album for which you want the count.
Member
Member
edasque   2008-02-14, 23:12
#3
thanks sbillard. Always very helpful, I really appreciate it.
Administrator
Administrator
acrylian   2008-02-15, 10:24
#4
You could have found that info in our functions guide, too...:-) In fact I built in the album id just with that purpose in mind!
  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.