Must be member for X days before can vote on polls.
This modification is in the archives.
Recently I ran a contest in which the members voted on the winner. Problem I ran into was that people were registering new names just to vote multiple times. I figured the best way to prevent this was to disallow new members from voting on polls for X amount of days. Being I ran the poll for 7 days I set my code to not allow members who have registered within the last 10 days from voting.
I thought I would share my work being I have gotten so much from others here. It's very simple and only requires modifying one file. Open poll.php and search for: Code:
// other permissions? Code:
$bbuserinfo['datejoined'] = vbdate($vboptions['dateformat'], $bbuserinfo['joindate']); $jointime = (TIMENOW - $bbuserinfo['joindate']) / 86400; // Days Joined Code:
if (!($forumperms & CANVIEW) OR !($forumperms & CANVOTE)) { print_no_permission(); } Code:
if (!($forumperms & CANVIEW) OR !($forumperms & CANVOTE) OR $jointime<10 ) { print_no_permission(); } Change $jointime<10 to how ever many days you wish to set it to. This means a user can not vote on a poll if they have not been a member for at least 10 days. I also added this line to my nopermission_loggedin phrase: <li>If you are trying to vote on a poll, you must be a member for at least 10 days before you can vote on polls.</li> Enjoy! Download No files for download. |
Similar Mods
Mini Mods Can't vote in own polls 1.0 | vBulletin 3.7 Add-ons |
Mini Mods Can't Vote Own Polls | vBulletin 3.6 Add-ons |