The simpler media website CMS
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:
<?php hitcounter("image",false); ?>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
Comments
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:
<?php echo "Views: " . getHitcounter(); ?>
Note that hits are not counted if you are logged in.
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