views seem to not register
|
designedfree4u
Joined: 2009-10-14
Posts: 12 |
Posted: Mon, 2009-10-19 15:34
|
|
when you use the imageblock and g2_link do the views still save to the database? its important that it does for my site because I changed the word views to votes. http://www.ratethepresidents.com/ Is there a way to grab the code that does this and put it into the page i'm redirecting too? |
|

Posts: 16501
We've already been over this. Clear your cookies and click an image, you'll see the view count increase. View counts are only counted once per visitor every 24 hours.
http://gallery.menalto.com/node/91831
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 16501
Oh wait, I see what you're doing. No, it doesn't count when you click on the page, but when you actually visit the image. For views to count, you have to visit the image, not just click on a link.
Edit your photo.tpl file to show the image and redirect from there and don't use your vote.html file.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 12
Ok I'll wait 24 hours, but I cleared my cookies and I thought I waited 24 hours. I cleared the database cach as well thinking this would do it. You would think that there would be some sort of a trick for developing so you wouldn't have to wait 24 hours.
Thanks for the help.
Posts: 12
Ok i'll try and edit that file.
Thank you
Posts: 12
So I'm trying to just add a javascript redirect on the photo.tpl page, but all i get is this
http://www.ratethepresidents.com/presidentshome/gallery/main.php?g2_itemId=22
Is there a way to redirect in a certain gallery language.
I have a php redirect as well but the page I'm editing is a is a .tpl
<?php
header( 'Location: http://www.ratethepresidents.com' ) ;
?>
Posts: 16501
If you're using JavaScript on the template pages you need to wrap it between literal tags:
{literal}
JAVA SCRIPT HERE
{/literal}
Read more about the literal tag and the Smarty language here:
http://www.smarty.net/manual/en/language.function.literal.php
PHP won't work in the template pages unless it's wrapped by PHP tags:
http://www.smarty.net/manual/en/language.function.php.php
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 12
Thanks a bunch