![]() |
|
Hook for index.php - 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: Hook for index.php (/thread-6859.html) |
Hook for index.php - wongm - 2010-04-01 In the main index.php file, there is the following lines: $hc = $_zp_current_image->get('hitcounter')+1; I am working on a plugin that keeps track of the most popular weekly and monthly images, and have added extra DB fields hitcounter_week and hitcounter_month. I had initially incremented these counters from a function in my theme file, but when the static_html_cache plugin is enabled, the 'normal' hitcounter is incremented (because it is called from index.php) but the other hitcounters are not. Is there a way to hook into a page load before the static_html_cache plugin gets onto it? Hook for index.php - acrylian - 2010-04-01 How about making a custom version of the static html cache plugin and add your addition there for now? sbillard will surely later know more if this can be done via a filter (which escapes me right now). Hook for index.php - sbillard - 2010-04-01 There is currently no "filter" for page loads, but certainly one could be added. You should create a ticket with what you would require of such a filter. |