ZenphotoCMS Forum
Most popular hack - 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: Most popular hack (/thread-1912.html)



Most popular hack - Barbara - 2007-12-08

Is the Most popular hack supposed to work with 1.2 as well?
I've just tried to implement it in my gallery and here's what it says:
Fatal error: Call to undefined function zp_conf() in Cocuments and SettingsPERSONALDesktopxampphtdocsnewthemesdefaultcustom-functions.php on line 62




Most popular hack - sbillard - 2007-12-08

The hack has not been upgraded to v1.2 as capability is now integrated into zenphoto.

getAlbumStatistic($number, 'popular') and
printAlbumStatistic($number, 'popular')
now do this task.

These routines are available in the nightly zenphoto build: http://www.zenphoto.org/files/nightly/




Most popular hack - Barbara - 2007-12-08

Sweet! Just updated to the last nightly build. One problem though, sorry for the trouble.
I've been using this method to count my hits so when I call this new function I get this error:

`Zenphoto Error

MySQL Query ( SELECT id, title, folder, thumb FROM albums ORDER BY hitcounter DESC LIMIT 10 ) Failed. Error: Unknown column 'hitcounter' in 'order clause'`

What changes do I need to apply to make it work?




Most popular hack - sbillard - 2007-12-08

Sounds like you did not run the setup/upgrade program. You need to do that to create the hitcounter fields.




Most popular hack - Barbara - 2007-12-09

Whoops. Problem solved, thanks a lot.