coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: suwii on October 13, 2007, 08:45:01 AM

Title: Weird rating/votes
Post by: suwii on October 13, 2007, 08:45:01 AM
Hi
I'm wondering if anyone could help me out here...
Gallery is: http://a-scott.for-fan.org/gallery

*Number of views are working fine (except it doesn't register a view if I'm logged into my account - is that normal? But if I'm a guest then it registers!)
*Main problem is the rating - I try to rate both with my account and as a guest and they don't register. Yet there are 8 pictures which have been rated before so I don't know how that has become!? I've checked the 'Groups' menu and Guests and Registered Members/Administrators are able to rate. So I'm not too sure where I've gone wrong here..

Thanks for the help :)
Title: Re: Weird rating/votes
Post by: suwii on October 13, 2007, 09:26:13 AM
Ok I think it's got something to do with the referrer bit

// If referer is not displayimage.php we don't accept the vote
if (!eregi("displayimage",$_SERVER["HTTP_REFERER"])){
    header('Location: displayimage.php?pos=' . (- $pic));
    exit;
}


When I try to vote the page loads with the URL having that negative sign.......
so ok how do I allow those with referer's apart from displayimage.php to accept the vote? and/or how do i change it so my referer is displayimage.php?
Title: Re: Weird rating/votes
Post by: Sami on October 13, 2007, 09:53:02 AM
first of all please upgrade to most recent version (1.4.13) that could fix your issue as well
Title: Re: Weird rating/votes
Post by: suwii on October 13, 2007, 10:19:28 AM
umm i'm a bit new to this so how exactly do you upgrade? I've replaced the existing php files like ratepic.php/addfav.php but do i have to do all the folders and stuff? it's going to take ages? o.o
Title: Re: Weird rating/votes
Post by: Sami on October 13, 2007, 10:23:55 AM
It's not that hard and time consuming ,read this (http://coppermine-gallery.net/demo/cpg14x/docs/index.htm#14)
Title: Re: Weird rating/votes
Post by: suwii on October 13, 2007, 01:28:34 PM
ok i've updated it but it still won't work :(
How do I allow for referrer's apart from displayimage.php to rate?
Title: Re: Weird rating/votes
Post by: François Keller on October 13, 2007, 02:17:49 PM
hi,

it works as expected for me see here i had a vote for this picture http://a-scott.for-fan.org/gallery/displayimage.php?pos=-619 (http://a-scott.for-fan.org/gallery/displayimage.php?pos=-619)
clear your cookies and retry
QuoteNumber of views are working fine (except it doesn't register a view if I'm logged into my account - is that normal?
yes it's normal, admins views are not counted
Title: Re: Weird rating/votes
Post by: Sami on October 13, 2007, 03:42:51 PM
It's strange cause voting doesn't work any more !
did you applied any mod or plugin ?
Title: Re: Weird rating/votes
Post by: suwii on October 13, 2007, 03:51:59 PM
so not working for you Sami? :o
I didn't apply any mod or plugin at all!
Actually it works for me now coz I turned off my ZoneAlarm firewall - read somewhere on the net that that makes it a Hidden Referrer so I guess the hidden referrer thing was the thing that was the problem. But that means whenever I want to rate a photo I have to turn the firewall off :S annoying..hmm so is there anyway I can alter parts of the ratepic.php file to allow this?
wonder why it's not working for you Sami........ :o
Title: Re: Weird rating/votes
Post by: Sami on October 13, 2007, 03:55:03 PM
Um , that's okay , I'm using VPN connection that break referrer , sorry for confusion
it's working with regular connection now
Title: Re: Weird rating/votes
Post by: suwii on October 13, 2007, 04:16:04 PM
ah ok i see
so no tips as to how i can edit that ratepic.php file to allow hidden referrers to rate? hmmmm at least I know what the problem is now :) thanks for the help!
bit OT - another weird thing - turned the zonealarm firewall off and now i can't see my hit counter from statcounter.com but when i turn it back on I can see the counter...crazy stuff  ???
Title: Re: Weird rating/votes
Post by: suwii on October 14, 2007, 02:20:41 AM
ok what i did was I totally deleted that referrer part from ratepic.php and it works fine
is there any consequence of this though?
Title: Re: Weird rating/votes
Post by: Sami on October 14, 2007, 06:20:52 AM
Yes, now spammers can add rating from outside and destroy your rating result
Title: Re: Weird rating/votes
Post by: suwii on October 14, 2007, 06:42:34 AM
ah darn....hmmmm
so would you recommend that I keep that part in the script? Is there anyway I can edit it somehow....hmmm