ZenphotoCMS Forum
hitcounter ? - 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: hitcounter ? (/thread-13148.html)



hitcounter ? - RichardB - 2018-10-09

I have read up all the old forum posts I could find about hitcounter - I can't find anything in the documentation.

the hitcounter plugin is enabled.

So far as I understand from those posts, inserting this code into image.php:

should record 'hits' into the image table of the database
and this code

should, at the same time, display the hit total for that image.

Inserting getHitcounter() works fine - except that the count is always 0

Inserting either of the hitcounter statements above into my image.php breaks the html page at that point.

Perl is my script language, so I may be doing something wrong with PHP but if so I can't see what it is.

Should there be some sort of include for hitcounter in my header.php?

Thank you,

Richard




hitcounter ? - fretzl - 2018-10-09

There is just one function to use i.e. getHitcounter().
If you want a hitcounter on your image.php you would need something like this:
``

Note that hits are not counted if you are logged in.




hitcounter ? - RichardB - 2018-10-09

Thank you so much - that (and the logged in ) explains it - in that case all is well with my site!

Much conflicting info in the forum.

Many thanks for your prompt help.

Richard