Motivote is the ultimate vote script. It has the features of every other vote script plus more. It works well on any sized device, so getting players to vote on their phones or tablets will be hassle-free.
Any site will work with no special configuration besides supplying the vote URL and your site ID. The callback URL you tell toplists will never change, so no more confusion. This is accomplished by searching each GET and POST parameter for our callback.
When your incentive tactic is set to "reward," you need to submit all the votes before you can claim your reward. Otherwise, each vote needs to be fulfilled individually. When it's set to "reward" and you vote for a site without redeeming a reward, it's saved for the user so that every vote receives a reward. In the final version, you'll be able to toggle this functionality on or off. For now, you can only toggle between the two tactics (each vote = reward or all votes = reward).
You can customize basically anything. Each installation will have a randomly generated security hash, so vote counterfeiting via fake callbacks won't be possible.
Starting vote checker server-sided:
Code:
new Motivote<Reward>(new RewardHandler(), "http://localhost/motivote/", "secret key given during installation").start();
Receiving rewards:
Code:
public class RewardHandler extends MotivoteHandler<Reward>
{
@Override
public void onCompletion(Reward reward)
{
if (reward.rewardName().equalsIgnoreCase("gold"))
{
//addItem(reward.username(), 995, reward.amount()); // note that amount is determined by the web server. you change all those settings in the admin cp.
inc.finalize();
}
System.out.println(reward.internalID() + " | Reward received for " + reward.username() + " (" + reward.rewardName() + ", " + reward.amount() + ")");
}
}
To upgrade:
Just copy the new files over, excluding config.php!
If you are creating/modifying themes, please make sure to put them in a unique directory. The default theme shouldn't be modified where it sits, the whole folder should be copied and you should work out of the new folder to avoid updates overwriting your customization.
Your server-sided key can be found in the preferences under "datakey."
If you lose your password, you can go into phpMyAdmin and run this query (change "!!your password here!!" to the password you want):
Code:
UPDATE `mv_preferences` SET `value` = MD5('!!your password here!!') WHERE `name` = 'admin_pass'