Hi at zenphoto forums!
I just saw that's possible to have a hit counter for the images, galleries on the page. How can that be done? I saw that I can reset the counter on the admin page but it does not appear on my site. I'm using 1.2.5 and default theme with some modifications. There's no "enable hit couter" button as far as I see.
I just tried this: http://www.zenphoto.org/support/topic.php?id=4812#post-28263 , but the counter does not show up.
What do I have to do to make the hit counter appear? I noticed that it's already included but needs to be activated.
Thanks for help,
FM
Hi sbillard!
Thanks for the quick answer. Nope, it doesn't appear.
I placed it between the div tags in line 57/58 in the image.php of my (default) theme. So it should be below the image before the comment form, right?
Honestly I must admit that I know HTML, but my knowledge in php is pretty llimited.
Is it really echo getHitcounter(); or is it
``
My best regards,
FM
Sorry no, there is no space between the question mark and the "php". Pasting code here is a little tricky. The counter's just not showing up. Can I check some other things that are connected to the counter appearence in the page?
Looks like this: http://img18.imageshack.us/img18/6766/zwischenablage01xso.jpg
I believe you that it works. It's just not working on my page, so I try to find out why ...
I has. I just has 10 hits. In the database, too. No error logs. As I see the php doesn't make it to the hatml generated page. Have you a page, where I can have a look at the hit counter?
One more question to make shure we're talking about the same thing: Is the hit counter the thing with the stars taht float to yellow wenn hovering them? The rating tool like "I give three of five stars for that image." or is the hit ounter - tht I don't see - something that tells me "100 People have already seen this picture", so it pints out "100" below the image?
I'd name the first one rating tool the other one hit counter.
Okay, seen that.
For that theme it appears on the image page.
They realized it by a special part by an extra customfunctions.php.
`
`
I placed that in my image.php and index.php. Still no positve result.
Where is getHitcounter declared, so that it can be echoed on the page?
I'm still on it.
So, if you select the Effervescence+ theme, do the hitcounters show up in the footer? getHitcounter() is declared in the template-functions.php script. Zenphoto Functions Guide in the User Guide section of the Zenphoto WEB site which would have told you this.)
The above code will echo something so long as you are on an image or album page. So if you are not seeing any output only two things can be wrong. You are not on an image or album page or you have place the code somewhere that is being hidden. I suggest you look at the page HTML to see if the text is there.
You must be making some basic error. As I said above, the echo statement will display something even if it does not display the counter. Since you get nothing. You must not be actually doing what you think you are doing.
So, be sure that you are making the changes to the theme you are actually running, etc.
NOW!
I got it. You're right, sbillard. I was editing the wrong theme AND didn't made any modification due to the album layout theme.
The album layout theme was set to [blank] = no theme selected.
I made my changes to the image.php and album.php on ..\default.
As the album indecated "zenpage-dault" as the choosen theme I thought I was right. But as I had choosen [blank] to any album as selected theme, it didn't made it to the page.
Now after I recognized tthat there's a 'default' theme and a 'zenpage-default' theme I finally realized that I was editing 'default' all the time and not 'zenpage-default'. Setting every album to 'zenpage-default' and editing the image.php and album.php of THIS theme in ..\zenpage-default brought the counter on the page.
Thanks for the directions!
Now I have to struggle setting it up to the right appearence layout.
Greetz,
FM