![]() |
Allow Mods a temporary ban of users
Hi
I´ve wrote a little hack upon request of my "Main"-Moderators. This hack allows them to temporary ban a given user per Userid. Simply userid, reason and how many hours. The banned user will see a modified no-permission screen when he tries to login. The User can automaticly access the board again, when the entered time is over. For the other hackers: Feel free to modify the hack and distribute a "better" version of this if you want. Sry for my bad english. |
Screenshot of entering a new ban
|
Screenshot of the banlist
|
Screenshot of a banned user
|
Pretty cool, i will try this one out. Thanks.
|
thats a real good hack, once i get it translated ill try installing it
|
Could you post up the translated please when you tralsate it?
|
The hack is now in english
|
see, im looking at it thinking "am i loosing my mind", cuz its in english,
looks like a good hack, having some forum issues right now so ill install it tomarrow |
GREAT hack
BUT the banned user is totally cut off from the forum i'd like it that he could do whatever i'm allowing the banned users group to do |
hmmm
a temp ban is usefull, so that this user can think about that, what he has done. So why let him do anything? |
well we have a different style of bans on our forums: they last from 1 day to 2 weeks and the restriction is on posting. reading the forums as well as using the pm system is allowed
currently we have to use a thread in a private forum to keep a log of these bans. this hack would be great if it moved the user to and from the banned users group... |
How would I make this so the Admin and Super Moderator can use it and only the moderators you select?
|
Quote:
if ($bbuserinfo[userid]!=1 and !$ismod=$DB_site->query_first("SELECT * FROM moderator WHERE userid=$bbuserinfo[userid] and forumid=2")) { change this to: PHP Code:
$bbuserinfo[usergroupid]!=5 for the supermoderators $bbuserinfo[userid]!=x-z for the userid?s for the moderators you select If the moderators are all in 1 usergroup (and only them, no one else) you can use the way with the usergroupid. |
This is an interesting hack. I will look into it soon. It would be good if the hack allows for ban periods of days or weeks. But I suppose you can just work it out by working out the number of hours.
|
If you want a user ban some days or weeks increase the hours :) it works. calc.exe is a good friend then :)
|
This is an excellent hack...
*Installs* Satan |
Using this hack is very good. Big problem is when they see the error, they will freak out.
I suggest a countdown, or a statement that says you have been banned for a certain number of minutes/hrs/etc I don't think a countdown is good, but just a plain statement saying how long he has been banned. Something like this prevents users from leaving the forums (which is something you do not want happening) |
well if you allow guests to view the board, all they have to do is logout
|
Quote:
plus, i want to leave the ability to pm... if you want ban in days and not hours, just add *24 after every 60*60 in the banuser.php |
Quote:
Quote:
|
Is there a way to add an option to ban them for hours, days, weeks or months? Some reasons for banning may be more severe than others. :)
Quote:
|
Ok...i have looked and looked and looked...and still am just not seeing it....
Where is the link to allow the bans to be set? I mean...there has to be some interface into the existing scripts....if i try to go straight to the script itself, it gives me just a blank grey screen. So where are the links supposed to be? There are none mentioned in the install file. |
You can add the link in your forums/mod/index.php file
|
Look for code
PHP Code:
PHP Code:
|
Do you need to have the banuser.php in the mod directory then? And how would you link to it in the admin cp?
Quote:
|
This hack I just learned can be quite harmful. What stops a mod, super mod, from banning an admin?
|
Any way to do a check to see if it is a mod, super mod or admin before it allows you to ban them? :)
Quote:
|
Nope...that isn't the answer.
I know how to make those types of links, but did as you said, and it still just gives me a blank grey page. Since i am not editing the banuser.php at all, then i can't have mis-installed it..... Something is just not working right here. |
Did you add the necessary code to the phpinclude template? :)
Quote:
|
did you run the query on your database and add the template?
|
yes :)
|
from the bottom of the install text:
Quote:
|
ok...that was it...
i tried using the format above to change it to look up for the usergroup for Admins and SuperModerators, but the only way it works is if i set it to allow the userid or else delete the permissions completely :( any idea why the usergroup solution is bombing? |
Post #14 in this thread has the code to allow usergroups. :) That's what I am using.
Quote:
|
Yea, I can't allow mods/supermods to use this until someone can post an update to the code to disallow banning of admins. The way it works now is any mod/supermod that has permissions to temp ban, can also temp ban an admin.
|
That is what i was using. I just get back:
Parse error: parse error in /banuser.php on line 13 Code used is: PHP Code:
Line 13 is the one referring to usergroupid 6 |
That doesn't seem to work here now. I went back to the original file and it works that way. I ran it from the admin directory though. I don't want any mods playing with it until I can get it working so no one can ban the admin. :)
Quote:
|
If you just insert your own userid, you can still run it from your mod/index.php This way it can be run from your forums options drop down box in the forum, bottom right. No one will be able to ban you, because it looks for that userid, and if its not the same one as the person trying to access the file, the script will not run.
|
Ok, you lost me here. What do I need to do where to do what? :)
Quote:
|
All times are GMT. The time now is 03:16 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|