Voting reward system?

Deezi

I have a custom title
Nov 14, 2016
50
12
Hello,
I was wondering if there is a way to check if the user has voted in the last 24hours, and then make the voting system remember their IP & username so they can't do it unlimited time's on different accounts.. And when they vote, they recieve something in-client like a badge, or credits or something?

If this is possible, or if this has already been released on the forum, please tell me.

Have a nice day :)
 

JayC

Always Learning
Aug 8, 2013
5,493
1,398
yes it is possible, just make a return url go to a php page and give them what you want then redirect them to the client... OR make it go to the client page and have a variable called reward=1 and I believe findretros has a function you can test to see if they have voted based on their IP (not 100% sure <--)
 

Kodys

lmao
Oct 24, 2016
36
17
yes it is possible, just make a return url go to a php page and give them what you want then redirect them to the client... OR make it go to the client page and have a variable called reward=1 and I believe findretros has a function you can test to see if they have voted based on their IP (not 100% sure <--)
Yeah I'm pretty sure there is a function like that, called something along the lines HasClientVoted..?
I'd go about this by adding a new row to the users called LastVoted and using PHP check if the LastVoted date matches the current, if it does do nothing and if it doesn't set the LastVoted to the current date along with giving the rewards you want.
 

Haid

Member
Dec 20, 2011
363
448
remember their IP & username so they can't do it unlimited time's on different accounts
You can use the API to validate if a user has already voted.

If you implement that on your CMS correctly simply use the following on your rewards page.

Code:
<?php
if($FindRetros->hasClientVoted()) {
 
    // User has voted, execute your reward
   
}else{
 
    // User has not voted, no rewards, redirect to vote or whatever
   
}
?>

Note that people will still be able to abuse this with the abundant access to VPN's these days and I'm really not sure what the point in rewarding the vote is, it's not an optional thing; you can enforce voting?
 

Deezi

I have a custom title
Nov 14, 2016
50
12
yes it is possible, just make a return url go to a php page and give them what you want then redirect them to the client... OR make it go to the client page and have a variable called reward=1 and I believe findretros has a function you can test to see if they have voted based on their IP (not 100% sure <--)
Yeah I'm pretty sure there is a function like that, called something along the lines HasClientVoted..?
I'd go about this by adding a new row to the users called LastVoted and using PHP check if the LastVoted date matches the current, if it does do nothing and if it doesn't set the LastVoted to the current date along with giving the rewards you want.
I tried adding that earlier but it didn't work, so now I'm just looking for other possibilities :D

You can use the API to validate if a user has already voted.

If you implement that on your CMS correctly simply use the following on your rewards page.

Code:
<?php
if($FindRetros->hasClientVoted()) {
 
    // User has voted, execute your reward
  
}else{
 
    // User has not voted, no rewards, redirect to vote or whatever
  
}
?>

Note that people will still be able to abuse this with the abundant access to VPN's these days and I'm really not sure what the point in rewarding the vote is, it's not an optional thing; you can enforce voting?
I don't want to force it, I just want people to vote if they are actually enjoying my retro.
And the point of adding a reward system, is so I can reward the players who vote. It has nothing to do with making people vote more, or trying to get more people to vote for my retro, it's just to give something to them, for actually voting :D

Have a great day all 3 of you! :)
 

Users who are viewing this thread

Top