The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
I started a contest on my site wouldn't you know it I am seeing new members signup then vote on a poll. I'd like to set up a way to stop this and the simplest way would be to require a member to be registered for X amount of days before they can vote on a poll. This way if I run a poll for 7 days I can set it to not allow new members to vote until they have been a member for 8 days.
Anyone know how this can be done? Thanks in advance! |
#2
|
|||
|
|||
![]() Quote:
How, well set the usergroup settings for registered users to not be able to vote, and then make a new user group based of registered that CAN vote. Then make a promotion that runs after you have been there for X days. and have that put them in an additional group that you made. =3 |
#3
|
|||
|
|||
![]()
That would work but seem like alot of extra work needed. Changing usergroups just for this seems like too much.
Thanks. |
#4
|
|||
|
|||
![]()
aw, wouldn't be that much. We have a LOT of additional groups for priveledges.
![]() |
#5
|
|||
|
|||
![]()
Seems like it would be simpler to edit the permissions line in poll.php.
Code:
if (!($forumperms & CANVIEW) OR !($forumperms & CANVOTE)) { print_no_permission(); } I know thats all wrong because first you must determine the join date and todays date then see if they are more than the desired time frame. |
#6
|
|||
|
|||
![]()
Well I took the easy way out for now and used :
Code:
if (!($forumperms & CANVIEW) OR !($forumperms & CANVOTE) OR $bbuserinfo[posts]<1 ) { print_no_permission(); } I just want to prevent someone from registering new names just to vote for themselves. |
#7
|
|||
|
|||
![]()
OK, here we go...
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 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> |
#8
|
||||
|
||||
![]()
I know this is an old post, but I wanted to thank IndyWebDesign for the code. It was exactly what I needed. Many times people figure out the answer to their original question, but don't ever come back and let the rest of us know what it is.
|
#9
|
|||
|
|||
![]()
it's good, but we need it as a real hack, to set deffrint amount of days and posts to every poll.
|
![]() |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|