![]() |
|
Any action to enable Hit count ? - 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: Any action to enable Hit count ? (/thread-2895.html) |
Any action to enable Hit count ? - gregb34 - 2008-05-17 Hi, I have a problem with the "Hit counter". In the admin panel, hit counter for all albums and images stay at 0. Any idea of this problems ? Thanks Any action to enable Hit count ? - acrylian - 2008-05-17 You have to add the hitcounter function to your theme files to use it. Please take a look at our functions guide. Any action to enable Hit count ? - gregb34 - 2008-05-17 It's what i have did but not on the theme used by my gallerie Thanks ! Any action to enable Hit count ? - altaphista - 2008-05-26 I have the same problem in the Default theme, if I add `` in the code, or if I echo the value, it always stays at 0/zero. Any ideas? Any action to enable Hit count ? - acrylian - 2008-05-26 From our documentation: Any action to enable Hit count ? - altaphista - 2008-05-26 ah of course, thanx acrylian! I read over the passage "[i][b]Does not increment the hitcounter if the viewer is logged in as the gallery admin[/b][/i]" Any action to enable Hit count ? - plutusad - 2008-11-27 i'm sorry...can i get some slightly more detailed instructions on how to get the counters working? because i am completely lost. what do it mean that "add the hitcounter function to your theme files to use it"? Add what to where? and does the counter only keep track of hits on images? or also hits on albums? can i get hits for pages too? thanks a lot in advance and sorry for my ignorance. Any action to enable Hit count ? - acrylian - 2008-11-27 As written on the functions guide (sorry link above is outdated): Your theme files in this case are image.php and/or album.php then. If you are not familiar with Zenphoto themes at all please visit the theming tutorial on our user guide: If you have difficulties to read the functions guide: Note that the hitcounter will be enabled by default with the coming 1.2.2 version. If you use the Zenpage CMS plugin that has currently a separate hitcount function: Any action to enable Hit count ? - plutusad - 2008-11-27 hmmm...i am still not getting it right. this is what i have in my template-functions.php / / Does this look right? or does this code have to be in a different file? BTW i am using the default theme only. Any action to enable Hit count ? - acrylian - 2008-11-27 Sorry, I don't understand your issue right now. That is the function where it belongs. You need to add it to your theme files as shown above. Take a look at your theme files how it is done with other functions. Also please read the theming tutorial. Any action to enable Hit count ? - plutusad - 2008-11-27 thanks again for your help. i have read through the theming tutorial and i am guessing i need to pay attention to the "custom functions" section. From what i understand, i am suppose to insert into the image.php file (assuming i want the hit counter to count my image hits) and then create a new file called customfunctions.php with the above hit counter function in it. This is what i did, and i am sure i did something wrong because it's not working. Questions:
Thanks again for your time, and sorry again for my lack of knowledge in this. Any action to enable Hit count ? - acrylian - 2008-11-27 No problem with lacking knowledge but you should try to understand some things and maybe learn a little about php. You are on the wrong track right now. Custom functions are functions you create yourself. Hitcounter is a standard function that is already there. No need to include anything. Adding a function does actually mean to add the call for the functions, not the function definition itself... This is done with something like this ``. This is really not hard and there are lots of examples in the tutorial. Any action to enable Hit count ? - plutusad - 2008-11-27 Ah, great...i finally got it...and yes, i was TOTALLY on the wrong track and completely complicated the whole thing. I even got the hitcounter for Albums to work now too. LOL. Thanks again. Any action to enable Hit count ? - acrylian - 2008-11-27 Great..:-) Any action to enable Hit count ? - plutusad - 2008-11-27 Hmm, one more question. I can't get it to work for the "pages", "news", and "categories"...i understand you mentioned above it's different from zenphoto. But again, i don't understand. Thanks for the help. Any action to enable Hit count ? - acrylian - 2008-11-27 Info is here: http://zenpage-functions.maltem.de/zenpage/_zenpage-template-functions.php.html#functionzenpageHitcounter Any action to enable Hit count ? - plutusad - 2008-11-27 i have read that over a few times already...but it doesn't tell me what EXACTLY i have to do as these details is what i am lacking...i think all that is telling me is how to read (interpret) the function, but it doesn't tell me how to get the counters moving. Any action to enable Hit count ? - acrylian - 2008-11-28 It actually behaves exactly like the normal Zenphoto hitcounter. Place the function on the additional Zenpage theme files (pages.php, news.php) and set the option to match it. |