Back to vBulletin 3.0 Add-Ons

Must be member for X days before can vote on polls.
Mod Version: 1.00, by WreckRman2

This modification is in the archives.
vB Version: 3.0.3 Rating: (0 vote - 0 average) Installs: 3
Released: 28 Aug 2004 Last Update: Never Downloads: 0
Not Supported  

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?
Add below it:

Code:
$bbuserinfo['datejoined'] = vbdate($vboptions['dateformat'], $bbuserinfo['joindate']);
$jointime = (TIMENOW - $bbuserinfo['joindate']) / 86400; // Days Joined
Directly below that look for:

Code:
 if (!($forumperms & CANVIEW) OR !($forumperms & CANVOTE))
{
print_no_permission();
}
Change to:

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

vblts.ru supports vBulletin®, 2022-2024