The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Temporary New Thread Forum Permissions
Hi. I am working on some code that permits a user without access rights to post a new thread in a forum for a limited time period based by decrementing a field in the user table. I have created a new table that consists of a transactionid, a userid, a forumid and a unix timestamp.
When the user attempts a new thread the code looks to see if the forum has a newthread_access_cost set in the forum. If it does, it pops up a vbphased error message that gives the user the option to use their virtual currency to post a newthread. It also checks to see if the time against the allowed posting time and resets the users accessmasks back to zero. I have most of the code working, except I am a bit confused about setting and resetting access masks for a user. Is this correct? Quote:
|
#2
|
||||
|
||||
If you only need the access once to create the thread I probably wouldn't even bother to set access masks - just set the bit you need?
|
#3
|
|||
|
|||
Quote:
The way I have configured is that the forum table has two fields, one field is newthread_access_cost and the other is newthread_access_period. Generally, access is for about an hour, or 360 in unixtime. So, the user can post anytime for an hour as long as NOW - timestamp_of_first_access < newthread_access_period. That is why I thought it would be good to set/unset the access mask. Cheers. |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|