The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
User cant post in specific hour
Hello ,
i'm running forum for kids , and i have problem the each night there are ppl that put porn pics in the forum , and all the mods are asleep . what im asking is if anyone can make a small hack that will prevent group X from posting between 24:00 to 9:00 or something like that . is that possible ? thanks Ben |
#2
|
||||
|
||||
They cant be a large group of (sick) people doing this, probably it's one person. So I suggest tracking his posts, capture his IP and ban the IP range for an effective solution. Also enabling moderation for new users can help. So does approving new members while they register (together with "who might this new user be?" hack).
But here is the hack anyway. And IMO it's a little bit better than you asked because it does not reject the posts but just put them into moderation so you wont lose legitimate posts either. You can approve/reject posts in the morning.. Edit newthread.php, find: PHP Code:
PHP Code:
Insert the same code to newreply.php after line: PHP Code:
By the way, time is calculated according to your server time so set banned hours accordingly. Enjoy! Logician Ps. he can still send pms though, so you better get him and ban his IP. |
#3
|
|||
|
|||
i think there is something wrong with this part :
(int)date("H", time())>0 AND (int)date("H", time())<9 this just doesnt work |
#4
|
||||
|
||||
no I cant see anything wrong with that code. What's the problem?Give me the exact line you applied to your board and plz be more specific about term "not working".. Gives an error or smt?
And you are aware that time banning will work according to your server time, right? So you must set the allowed times considering the time zone of your server not your own. |
#5
|
|||
|
|||
I've no idea whats going on .. when i posted the replay , it didnt work , when i checked agian after seeing your replay it worked , now its not working agian ..
i checked the server time and the usergroupid the code i have is Quote:
thanks alot Ben |
#6
|
||||
|
||||
(int)date("H", time())>21 AND (int)date("H", time())<9
this clause can never be 1 when date(H)>21 it is never <9 if ($bbuserinfo[usergroupid]==46 AND ((int)date("H", time())>21 OR (int)date("H", time())<9)) should be the right if-clause |
#7
|
||||
|
||||
and of course you are testing if it's working by using a useraccount with usergroupid=46, right?
If you are sure about a) usergroupid is correct (Is it really 46???) b) You testing it with an account with the same usergroup id c) times set according to server time try this: Before the hack add: PHP Code:
|
#8
|
||||
|
||||
Xenon is right.
I got stuck to my own code which was designed according to the hours you asked in your first message and didnt notice you changed the hours there. If you want to use hours from 21.00 to 09.00, use Xenon's code.. if it's 00.00-09.00, my code (in the first post) will do the trick.. |
#9
|
|||
|
|||
Ok , Its working now
Thanks Alot to both of you Ben |
#10
|
||||
|
||||
you're welcome
Logician, we're a good team |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|