Problem with duplicate votings and browsers
Posted: 22 August 2007 05:39 AM   [ Ignore ]
Newbie
Rank
Total Posts:  3
Joined  2007-08-22

I am kinda new to this module so it took me a while untill i got what i wanted from it. When it was done i noticed small problem which i cannot find solution to. I appologize in advance if this kind of problem is not fit for this forum.

I need users to click on pictures of number 1-5 and rate a song, and to not be able to rate same song more than once. There shouldnt be any registering, thus available for everyone to vote. Somehow i managed to make this work only in IE6, which is primary browser i work on (i know, my own mistake hehe). In firefox, IE7 and Opera, there is no limit to how many votes one person can make for the same song and i dont know how to correct this. I even tried puttting {if !duplicate}...{/if} around every exp:rating:form but still it only worked in IE6.

This is an example of my code (this is only for the first and second number, i have identical code for every number 1-5)

{exp:rating:form entry_id="{entry_id}" form_name="zpz" require_membership="no" anonymous="yes" status="open" allow_duplicates="no" return="{path=zpz-lista/index}"}
<input type="hidden" name="email" value="{email}" /><input type="hidden" name="name" value="anonymous" /><input type="hidden" name="zpzhit" value="1" />
<td>
<input type="image" src="http://75.126.4.10/~dobrevib/themes/rating_themes/default/images/star100-1.gif" name="zpzhit" class="zpzhit1" value="1" alt="1" title="1"><div style="display:none;"><textarea name="review" rows="10" cols="40">{title} - 1</textarea></div>
</td>
{/exp:rating:form}

{exp:rating:form entry_id="{entry_id}" form_name="zpz" require_membership="no" anonymous="yes" status="open" allow_duplicates="no" return="{path=zpz-lista/index}"}
<input type="hidden" name="email" value="{email}" /><input type="hidden" name="name" value="anonymous" /><input type="hidden" name="zpzhit" value="2" />
<td>
<input type="image" src="http://75.126.4.10/~dobrevib/themes/rating_themes/default/images/star100-2.gif" name="zpzhit" class="zpzhit1" value="2" alt="2" title="2"><div style="display:none;"><textarea name="review" rows="10" cols="40">{title} - 2</textarea></div>
</td>
{/exp:rating:form}

u can see this on http://75.126.4.10/~dobrevib/index.php/zpz-lista/

thank u in advance, any help is greatly apreciated.

Profile
 
 
Posted: 22 August 2007 10:01 AM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  701
Joined  2004-03-30

Marijana,

I understand your problem very well. And yes, this is the place to post it. Thank you for doing that.

What you’re needing is for the Rating module to set a cookie in the users browser once they have rated a given entry and to check for that cookie if they try to come back. We’ll be adding this feature soon. Until then, it will be difficult to achieve the bahavior you’re looking for. I’m sorry for the delay in that.

mk

 Signature 

Mitchell Kimbrough

Profile
 
 
Posted: 24 August 2007 03:11 AM   [ Ignore ]   [ # 2 ]
Newbie
Rank
Total Posts:  3
Joined  2007-08-22

Thank u for the fast reply.

Guess nothing left for me then to wait next update of the rating module.

Profile
 
 
Posted: 24 August 2007 10:19 AM   [ Ignore ]   [ # 3 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  701
Joined  2004-03-30

In the interim, you could write some Javascript that would set and read cookies.

mk

 Signature 

Mitchell Kimbrough

Profile
 
 
Posted: 27 August 2007 07:56 AM   [ Ignore ]   [ # 4 ]
Newbie
Rank
Total Posts:  3
Joined  2007-08-22

In the end, solution with login was accepted instead of cookies because cookies can be disabled in some browsers and i dont know if there is a way around that.

Thank u again for your replies.

Profile
 
 
Posted: 27 August 2007 08:09 AM   [ Ignore ]   [ # 5 ]
Sr. Member
Avatar
RankRankRankRank
Total Posts:  336
Joined  2005-07-09

Cookies can be disabled in all modern browsers, and there is no way against it as such. You can, of course, check whether cookies are accepted before allowing anyone to vote. I think registration is a good solution, though.

 Signature 

Ingmar Greil

Profile
 
 
   
 
 
‹‹ Force a rating?      Rating examples ››