Member
Member
Fotoman   2010-07-06, 11:23
#1

Hi!

I use the current release of ZP and current zenpage as my theme. I made the modifications to show the hitcounter in image.php, album.php & gallery.php.

It works fine, if I'm in admin mode. If I log out and come back as a normal visitor, I don't see any hitcounter for image, album or gallery at all. Funny, if I switch then from german to english, I see all the hitcounters.

How come & why?
Fotoman

Administrator
Administrator
acrylian   2010-07-06, 11:42
#2

Calling it via the object model should work always.

Member
Member
Fotoman   2010-07-06, 11:54
#3

What means?
I called it up in the php code like this (is that right?) and it appears below every picture as logged in as admin or changing the language from german to english.

Take a look: http://www.strickwerk-productions.com/foto

hitcounter plug in 1.30 is enabled. Multilanguage is enabled. footer chnged also when changing language or adimin/visitor.

???

Administrator
Administrator
acrylian   2010-07-06, 12:23
#4

Hm, that is actually right. I have no idea what is happening there, that function is neither tied to loggin stuff nor to multilingual. Any specific custom code around those parts?

Member
Member
Fotoman   2010-07-06, 12:27
#5

Well, just the center div-tag, line 78 to 98 i.e. of image.php


  (Dieses Bild wurde schon  mal angesehen. Klicken Sie es an, um es in der Lightbox zu sehen.) 

Same in album & gallery.
Well, I'm not good in PHP. Maybe I made a mistake.

Administrator
Administrator
acrylian   2010-07-06, 12:34
#6

Looks actually good, I will try to reproduce it later.

Btw, you should update you HTML-knowledge a little, `` are both deprecated tags and should be avoided..;-)

Member
Member
Fotoman   2010-07-06, 12:46
#7

Hey, thanks, yes that would be nice. Counters are not the most important thing. An yes, i'll promise to use css instead. (But it still works so fine! :-)

Member
Member
Fotoman   2010-07-06, 12:59
#8

Okay,
I found out, what made the difference. It's the static html cache.

If I switch it off in the plugins and purge the folder cache_html by ftp the site reloads perfectly. If I switch it on again, the problem occurs.
...

Administrator
Administrator
acrylian   2010-07-06, 13:20
#9

Ok, I should have thought about this... But that is of course meant that way, cached is cached...;-)

Member
Member
Fotoman   2010-07-06, 13:36
#10

Okay, chached is cached, right. But shouldn't it be permanent? Cached with counters if they were on?! So they are off with the cache & on without. Hm. Okay, but now I know.

Thanks for your help!
FM

Administrator
Administrator
acrylian   2010-07-06, 13:48
#11

No, the reason is that for loggedin admins nothing is cached to prevent security issues as password protected or unpublished albums would also be cached. It is therefore only cached and used from cache for normal visitors.

Member
Member
Fotoman   2010-07-06, 13:58
#12

Okay, I see.
That means: donig all you have to do with the code as admin while cache is off. So you make sure to see all the changes you've made. Than, in a last step, turning on the caching and logoff.

I'll try that.

Administrator
Administrator
acrylian   2010-07-06, 14:02
#13

Not exactly. The html cache and also the rss cache are disabled automatically if you are logged in. You don't need to enable/disable anything. All you need to do is to clear the cache so that your normal visitors see any possible changes.

Member
Member
Fotoman   2010-07-06, 14:07
#14

Okay, got it. Now it all works well. Thanks again for you patience and help. Love that ZP and your theme. Made a donation!

Greetz,
FM

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.