PDA

View Full Version : Allow Mods a temporary ban of users


Hotte
06-06-2002, 10:00 PM
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.

Hotte
06-07-2002, 08:15 PM
Screenshot of entering a new ban

Hotte
06-07-2002, 08:16 PM
Screenshot of the banlist

Hotte
06-07-2002, 08:16 PM
Screenshot of a banned user

Lesane
06-07-2002, 08:38 PM
Pretty cool, i will try this one out. Thanks.

Keyser S?ze
06-07-2002, 09:10 PM
thats a real good hack, once i get it translated ill try installing it

GamerX
06-07-2002, 09:20 PM
Could you post up the translated please when you tralsate it?

Hotte
06-07-2002, 09:36 PM
The hack is now in english

Keyser S?ze
06-07-2002, 10:12 PM
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

MarkG
06-07-2002, 10:26 PM
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

Hotte
06-07-2002, 10:32 PM
hmmm
a temp ban is usefull, so that this user can think about that, what he has done. So why let him do anything?

MarkG
06-07-2002, 11:01 PM
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...

Boofo
06-07-2002, 11:12 PM
How would I make this so the Admin and Super Moderator can use it and only the moderators you select?

Hotte
06-07-2002, 11:20 PM
Originally posted by Boofo
How would I make this so the Admin and Super Moderator can use it and only the moderators you select?

In banuser.php @ line 10:

if ($bbuserinfo[userid]!=1 and !$ismod=$DB_site->query_first("SELECT * FROM moderator WHERE userid=$bbuserinfo[userid] and forumid=2")) {

change this to:


if (
$bbuserinfo[usergroupid]!=6
and $bbuserinfo[usergroupid]!=5
and $bbuserinfo[userid]!=x
and $bbuserinfo[userid]!=y
and $bbuserinfo[userid]!=z
{

$bbuserinfo[usergroupid]!=6 for the admin-group
$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.

Erwin
06-07-2002, 11:44 PM
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.

Hotte
06-07-2002, 11:48 PM
If you want a user ban some days or weeks increase the hours :) it works. calc.exe is a good friend then :)

Chris M
06-08-2002, 01:22 AM
This is an excellent hack...

*Installs*

Satan

ManagerJosh
06-08-2002, 06:12 AM
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)

RDX1
06-08-2002, 06:52 AM
well if you allow guests to view the board, all they have to do is logout

MarkG
06-08-2002, 07:15 AM
well if you allow guests to view the board, all they have to do is logouttrue, but that's not the most effective solution, is it? ;)
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

Hotte
06-08-2002, 09:52 AM
Originally posted by NerdNations
well if you allow guests to view the board, all they have to do is logout
Yes, but they don?t have a logout-link on the page :) If they want to view, the user has to delete the cookie manually and most user don?t do that.

Originally posted by MarkG
if you want ban in days and not hours, just add *24 after every 60*60 in the banuser.php
Don?t forget the /24 in action==edit at line 36

Boofo
06-08-2002, 11:41 AM
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. :)

Originally posted by Hotte
Don?t forget the /24 in action==edit at line 36 [/B]

ladyfyre
06-09-2002, 09:49 PM
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.

Smoothie
06-09-2002, 10:19 PM
You can add the link in your forums/mod/index.php file

Smoothie
06-09-2002, 10:21 PM
Look for codemakenavoption("Ban","user.php?action=find","|");
and add below:makenavoption("Temp Ban","banuser.php?","|");

Boofo
06-09-2002, 10:32 PM
Do you need to have the banuser.php in the mod directory then? And how would you link to it in the admin cp?

Originally posted by Smoothie
Look for codemakenavoption("Ban","user.php?action=find","|");
and add below:makenavoption("Temp Ban","banuser.php?","|");

Smoothie
06-09-2002, 10:42 PM
This hack I just learned can be quite harmful. What stops a mod, super mod, from banning an admin?

Boofo
06-09-2002, 11:00 PM
Any way to do a check to see if it is a mod, super mod or admin before it allows you to ban them? :)

Originally posted by Smoothie
This hack I just learned can be quite harmful. What stops a mod, super mod, from banning an admin?

ladyfyre
06-09-2002, 11:52 PM
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.

Boofo
06-09-2002, 11:59 PM
Did you add the necessary code to the phpinclude template? :)

Originally posted by ladyfyre
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.

Smoothie
06-10-2002, 12:01 AM
did you run the query on your database and add the template?

ladyfyre
06-10-2002, 12:05 AM
yes :)

Smoothie
06-10-2002, 12:41 AM
from the bottom of the install text:Hint:
In banuser.php at line 10:
if ($bbuserinfo[userid]!=1 and !$ismod=$DB_site->query_first("SELECT * FROM moderator WHERE userid=$bbuserinfo[userid] and forumid=2")) {

This is the permcheck if the user who tries accessing this file is authorized. In this case if the user ist not the administrator who was createn by the vbulletin-installation and is not a moderator of forumid 2, the script will quit. Change it to whatever you want. In Example to allow all moderators access delete lines 10-13 from the script.

I know, this hack is not "the best way" to code something, but it works :)Are you userid 1?

ladyfyre
06-10-2002, 01:04 AM
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?

Boofo
06-10-2002, 01:17 AM
Post #14 in this thread has the code to allow usergroups. :) That's what I am using.

Originally posted by ladyfyre
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?

Smoothie
06-10-2002, 01:41 AM
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.

ladyfyre
06-10-2002, 01:45 AM
That is what i was using. I just get back:

Parse error: parse error in /banuser.php on line 13

Code used is:


// HF-Mods perms

if_(

____$bbuserinfo[usergroupid]!=6

____and_$bbuserinfo[usergroupid]!=5

____and_$bbuserinfo[userid]!=44

____and_$bbuserinfo[userid]!723

____and_$bbuserinfo[userid]!=4267

{
cpfooter();
exit;
}


Line 13 is the one referring to usergroupid 6

Boofo
06-10-2002, 02:16 AM
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. :)

Originally posted by ladyfyre
That is what i was using. I just get back:

Parse error: parse error in /banuser.php on line 13

Code used is:


// HF-Mods perms

if_(

____$bbuserinfo[usergroupid]!=6

____and_$bbuserinfo[usergroupid]!=5

____and_$bbuserinfo[userid]!=44

____and_$bbuserinfo[userid]!723

____and_$bbuserinfo[userid]!=4267

{
cpfooter();
exit;
}


Line 13 is the one referring to usergroupid 6

Smoothie
06-10-2002, 02:25 AM
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.

Boofo
06-10-2002, 02:58 AM
Ok, you lost me here. What do I need to do where to do what? :)

Originally posted by Smoothie
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.

Smoothie
06-10-2002, 03:05 AM
In the banuser.php file, I think its around line 10, where it says userid 1. If thats your userid, that no one else will be able to run the script.

Boofo
06-10-2002, 05:54 AM
What about the ismod part in that same line? I just want to make it so the admin and the supermod and whichever userid I want to enter can use it. That code they gave me in the earlier post doesn't work. :)

Originally posted by Smoothie
In the banuser.php file, I think its around line 10, where it says userid 1. If thats your userid, that no one else will be able to run the script.

Smoothie
06-10-2002, 08:18 AM
It would be great if the person who created this hack could lend some assistance. :) I would like for my mods to be able to temp ban without the risk of one of them banning me. :(

Smoothie
06-11-2002, 02:37 AM
^bump^

Boofo
06-11-2002, 03:22 AM
What does the "bump" mean? I have always wondered that every time I see it. :)

Originally posted by Smoothie
^bump^

Hotte
06-11-2002, 03:39 PM
Originally posted by Smoothie
This hack I just learned can be quite harmful. What stops a mod, super mod, from banning an admin?

Nothing. But what stops a mod, super mod or admin from un-banning himself? The temp-ban doesn?t work on files in the mod oder adminfolder, so they are still able to access the banuser.php to unban.

Lesane
06-12-2002, 08:13 AM
Originally posted by Smoothie
It would be great if the person who created this hack could lend some assistance. :) I would like for my mods to be able to temp ban without the risk of one of them banning me. :(

Not tested but it should work:

Find in banuser.php:

if ($action=="admininsert") {

Add under it:

$noadmin=$DB_site->query_first("SELECT * FROM user WHERE userid=$userid");
if ($noadmin[usergroupid]=="6") {
echo "Oops, you try to ban an admin wich is not allowed!";
echo "<br>Try again by clicking <a href=\"banuser.php?action=adminadd\" target=\"_blank\"><u>here</u></a>.";
cpfooter();
exit();
}

Smoothie
06-12-2002, 08:26 AM
I'll give it a go...thanks bro.

Smoothie
06-12-2002, 08:37 AM
Works! thanks Lasane. :)

Boofo
06-12-2002, 09:32 AM
Can it also be set up to not allow the super moderator or fellow moderators to be banned by one another but the Admin can still ban whomever he/she wants?

And how about having it send an e-mail notifiation to the Admin when someone attempts to ban the Admin, Supermod or Moerators (unless the Admin themselves did it), can that be done too?

(Wait a minute! What am i saying here, "can it be done"? This is Lesane we're talking to. As long as he's around, OF COURSE it can be done!) :)

Originally posted by Lesane


Not tested but it should work:

Find in banuser.php:

if ($action=="admininsert") {

Add under it:

$noadmin=$DB_site->query_first("SELECT * FROM user WHERE userid=$userid");
if ($noadmin[usergroupid]=="6") {
echo "Oops, you try to ban an admin wich is not allowed!";
echo "<br>Try again by clicking <a href=\"banuser.php?action=adminadd\" target=\"_blank\"><u>here</u></a>.";
cpfooter();
exit();
}

chris frolic
06-13-2002, 12:25 AM
Is there a way that this hack can use Board Time instead of Server time? My server is 2 timezones away and it's confusing when a ban is only for a few hours.

great hack by the way.

Erwin
06-19-2002, 11:31 PM
This is a great hack! Thanks a lot! It works well with some custom modifications! :)

Boofo
06-19-2002, 11:42 PM
Ok, Erwin, what modifications did you do that we need to know about? :)

Originally posted by Erwin
This is a great hack! Thanks a lot! It works well with some custom modifications! :)

Erwin
06-20-2002, 02:42 AM
I integrated it into my banning system. It's only relevant for my site. I renamed it and made it a "suspend" feature rather than call it banning, and added it into the postbit of threads for easy suspension and unsuspension. Made it all accessible from the admin, mod CPs, as well as via the staff forums. etc. etc. Just made it more functional. I do that with most hacks I install.

Silviu
07-02-2002, 06:51 PM
It is possible to allow a moderator to ban an user ONLY from his forum? I mean, there are many forums with many moderators, so if one bans an user, that user will not be able to see the rest of the forums for a specified period. Am i right?

This hack based on 'user access mask' will be a useful tool for me. This 'general banning' method is not quite appropiate for my forum.

Keyser S?ze
07-11-2002, 02:26 AM
Originally posted by Hotte


In banuser.php @ line 10:

if ($bbuserinfo[userid]!=1 and !$ismod=$DB_site->query_first("SELECT * FROM moderator WHERE userid=$bbuserinfo[userid] and forumid=2")) {

change this to:


if (
$bbuserinfo[usergroupid]!=6
and $bbuserinfo[usergroupid]!=5
and $bbuserinfo[userid]!=x
and $bbuserinfo[userid]!=y
and $bbuserinfo[userid]!=z
{



missing a ")" after the last userid (or group)

becareful :knockedout:

-edit-

another thing, i didnt even notice, u ban by userid (number) not user name, be careful on that

vwvitek
09-11-2002, 12:26 AM
Does anybody here know how to change this hack so that it provides REVERSED countdown in a specific forum? Example: User ABC is granted access to forum#15 for a period of 150 hours. After expiration of these 150 hours he cannot access forum#15 again, unless he gets new permission from mod.

ExAvIoUr
09-11-2002, 12:52 AM
Great hack m8, thanx for your hard work. :)

However, when I try to set a ban I get this after submitting:

Warning: Cannot add header information - headers already sent by (output started at /home/choicein/public_html/forums/admin/adminfunctions.php3:19) in /home/choicein/public_html/forums/mod/banuser.php3 on line 37

Can anyone offer some assistance as to where I went wrong?

line 37 that it refers to says:

Header("Location: ".$PHP_SELF); // so that F5 works

Thanx in advance. :)

ExAvIoUr
09-12-2002, 03:11 PM
would also like a direct link for the mods/admins on the site if someone can assist with that also. :)

N9ne
10-20-2002, 07:45 PM
Erwin: I see you have modified this hack, please could you post up an updated super cool version? :D

From what I've seen, the hack would be better if it was like this:

You have a link in postbit, only viewable to those who can actually use it. Those who can use it should be those you give the right to use it...I want supermods and admins.

When you get to the ban screen, you should have a drop down with "minutes", "hours", "days", "weeks", "months" and even "years"...and then a box after to say how many of selected.

It should be made so those who CAN use this feature CANNOT ban anyone who CAN use this feature ;)

If Erwin doesn't want to do this, maybe someone else could? :)

Erwin
10-20-2002, 10:42 PM
Originally posted by Tha Rock
Erwin: I see you have modified this hack, please could you post up an updated super cool version? :D

I got your PM. :) My mods are customized specifically for my site, and won't make sense to anyone else's site. I don't have time to package it and release it as an add-on - the code is buried under a ton of modified hack, especially after several vB upgrades. :)

wolfman
11-07-2002, 02:24 AM
I like it but how does a mod get access to the users ID to do the ban?

Erwin
11-07-2002, 09:09 AM
I modified this hack to integrate it into the search feature in the Mod CP, using the username instead of the userid. It's not that hard to do. I can't post on how I did it, since it's all integrated with the rest of my banning system. But it can be done. :)

themonarch
11-13-2002, 03:53 AM
This is a great little hack! My only wish is to ban by username instead of the id...

CRego3D
11-13-2002, 03:54 AM
Erwin

Any way you can share this info ?, I am lookign for the same feature

Erwin
11-13-2002, 04:26 AM
Okay, this is what you do.

1) Upload banuser.php into your mod subdirectory

2) Edit your mod/user.php

Find:


echo "<tr><td nowrap><p>$user[username]</p></td>".iif($perms[ismoderator] or $ismod['canbanusers']==1, "<td nowrap><a href=\"user.php?action=ban&userid=$user[userid]\"><p>[ban]</p></a></td>", "").iif($perms[ismoderator] or $ismod['canviewprofile']==1, "<td nowrap><a href=\"user.php?action=viewuser&userid=$user[userid]\"><p>[view user]</p></a></td>", "")."</tr>\n";
}


Replace with:


echo "<tr><td nowrap><p>$user[username]</p></td>".iif($perms[ismoderator] or $ismod['canbanusers']==1, "<td nowrap><a href=\"user.php?action=ban&userid=$user[userid]\">[ban]</a><br><a href=\"banuser.php?action=adminadd&userid=$user[userid]\">[Temp Ban]</a></td>", "").iif($perms[ismoderator] or $ismod['canviewprofile']==1, "<td nowrap><a href=\"user.php?action=viewuser&userid=$user[userid]\">[view user]</a><br><a href=\"banuser.php?action=remove&userid=$user[userid]\">[Remove Temp Ban]</a></td>", "")."</tr>\n";
}


That's it!

Then what your mods can do is Search for a User using the normal search function in their Mod CP, and when they find the username, click on the "Temp Ban" or "Remove Temp Ban" links next to the username. And go from there!

My system is very different - so I can't test this, but it should work.

CRego3D
11-14-2002, 12:43 PM
Originally posted by Erwin
Okay, this is what you do.

[...]

That's it!

Then what your mods can do is Search for a User using the normal search function in their Mod CP, and when they find the username, click on the "Temp Ban" or "Remove Temp Ban" links next to the username. And go from there!

My system is very different - so I can't test this, but it should work.

Thank you .. now, when I click on "temp ban" it leads me to the page to temp ban it, but still askign for the iser id :( (just leads me to the ban link in banuser.php) .. did I missed something ?

Zelda-King
11-28-2002, 11:16 PM
When I perform a temp ban I get;

Warning: Cannot add header information - headers already sent by (output started at /home/virtual/site62/fst/var/www/html/bb/admin/adminfunctions.php:19) in /home/virtual/site62/fst/var/www/html/bb/mod/banuser.php on line 30

When I try to edit a ban I get;

Not Found
The requested URL /bb/mod/banuser.php.php was not found on this server.


--------------------------------------------------------------------------------

Apache/1.3.22 Server at www.domainname.net Port 80

Just why am I transfered to an URL ending with php.php?

(Other than this, it does initially work).

For the record, I'm using vBulletin ver 2.2.9.

nimzie
12-03-2002, 12:40 AM
I'm new to this php stuff.

The instructions say to add error_nopermission_tempban template. Is that to say error_nopermission_tempban.php? In what directory?
I'm not sure what a template is..

Will this allow admins to be banned - or can I just not give the link to mods - and not put it in index.php?

Zelda-King
12-21-2002, 12:09 AM
You don't put that template in the directory. Go to your admin cp and look down the left hand column near the bottom for 'templates'. .php files are put in the directory (FTP, whatever), but not templates.

BlackDeath
12-24-2002, 09:41 AM
Originally posted by Erwin
I integrated it into my banning system. It's only relevant for my site. I renamed it and made it a "suspend" feature rather than call it banning, and added it into the postbit of threads for easy suspension and unsuspension. Made it all accessible from the admin, mod CPs, as well as via the staff forums. etc. etc. Just made it more functional. I do that with most hacks I install.

lol, sounds like you're bragging to me. hehehe. :D

BlackDeath
12-24-2002, 10:33 AM
Originally posted by CRego3D


Thank you .. now, when I click on "temp ban" it leads me to the page to temp ban it, but still askign for the iser id :( (just leads me to the ban link in banuser.php) .. did I missed something ?

yeah. im getting the same issue. maybe there's a template change?

BlackDeath
12-24-2002, 10:43 AM
ok. no it can't be in the template. i think it's probably something that needs to be changed in banuser.php but i have no clue what that would look like. someone needs to redo this entire hack and make it work properly because i couldn't get it to work unless i changed various things around by getting ideas from the people who've posted. as it is, this hack is pretty useless because unless i'm mistaken, how can a mod get a user's id#? only admins can get that.

BlackDeath
12-24-2002, 10:47 AM
Originally posted by Hotte


Nothing. But what stops a mod, super mod or admin from un-banning himself? The temp-ban doesn?t work on files in the mod oder adminfolder, so they are still able to access the banuser.php to unban.

i'd say hopefully you would not choose a person that would do such a thing as a mod. :)

BlackDeath
12-29-2002, 08:49 AM
can someone fix this so mods can see usernames instead of user id's...

Anatolia
01-29-2003, 01:49 AM
Very cool hack!
nice work!
every thing is working fine bit I get a HTTP 404 - File not found Internet Explorer Error when I do an [edit] then [submit]
I can see in the browser address this: /vb/admin/banuser.php.php
so there are to .php extension!
any idea

Anatolia

Keyser S?ze
02-23-2003, 08:33 PM
Originally posted by Erwin
Okay, this is what you do.

1) Upload banuser.php into your mod subdirectory

2) Edit your mod/user.php

Find:
[--]

That's it!

Then what your mods can do is Search for a User using the normal search function in their Mod CP, and when they find the username, click on the "Temp Ban" or "Remove Temp Ban" links next to the username. And go from there!

My system is very different - so I can't test this, but it should work.

works, but the only problem is that it does not ask me for a reason or number of hours, just seems to let mods ban the user indefinntly


-----------------------

also, to everyone that replied after erwin posted this, i think u are missing, that his modification does not change the temp ban link, if u go thru that, its the same old way of using the user id, u must use the "quick search" on the main page, to find a user, and from there it will ask do u want to ban them? also it will have a link to just go to there user information

-----------------------

another question, i have more user groups than just registerd, like i have some private forums for special members and sometimes they can be naughty too, so how can i add more user groups to this hack to be banable? thanks

ImportPassion
03-08-2003, 09:51 PM
I have updated this so mods that are allowed to ban can and can only ban regular users (2).
There was no point reinventing the wheel here. I just took the code from the prefectly good banning function that is already in vbb.
I also linked it to the mod ban section, so when you search for a user to ban, like you do to perm ban someone anyways, you click on temp ban and the userid is automatically input, no need to worry about usernames etc, but that can easily be changed.

have a look.

Larry@IOG
04-06-2003, 01:39 AM
Ok I installed this hack and the update. I can not find where I temp ban users of my site. I do not see any changes

Larry

lioncool1589
04-06-2003, 03:29 AM
how come i dont see option to temp ban user in control panel

Larry@IOG
04-06-2003, 04:17 AM
Yesterday at 11:29 PM lioncool1589 said this in Post #80 (https://vborg.vbsupport.ru/showthread.php?postid=378128#post378128)
how come i dont see option to temp ban user in control panel


Me either my mods I turned on see it but when they click it it just shows a white page


Larry

lioncool1589
04-07-2003, 04:24 AM
when i click on temp ban why i get empty page nothing show up

lioncool1589
04-07-2003, 05:19 AM
Warning: Cannot modify header information - headers already sent by (output started at /home/virtual/site26/fst/var/www/html/forum/admin/adminfunctions.php:19) in /home/virtual/site26/fst/var/www/html/forum/mod/banuser.php on line 33

how i fix this error

Keyser S?ze
04-20-2003, 05:09 AM
look at this post right here guys :)

https://vborg.vbsupport.ru/showthread.php?s=&threadid=39584&perpage=15&display=&pagenumber=2

anyways, this is a great hack, i think the person that made it has left the planet :(

needs some updating tho

AZone
06-23-2003, 02:24 AM
1. What about two .php extensions? (see first post on this page)
2. How to ban not only for hours, but also up to 5 days?

midnightz
07-08-2003, 01:41 AM
Ok, We needed this for somebody and cleaned up some code and rewrote some as well a little. This version will allow you to temp ban users with no problems. I didnt add a hack to add it to the admin style drop down menu for mods. (searched but couldnt find that hack).

This is set to ban for hours, I will add one tomorrow for days or just do the math :)

Hope it works for you :bunny:

Need to reattach found one small bug still left

TheDPQ
09-15-2003, 03:09 AM
Hrm, interesting. When i try to edit it trys to load banuser.php.php
Edit: Fixed with ereg()

Also:Warning: Cannot modify header information - headers already sent by (output started at /home/mvhost/public_html/test/admin/adminfunctions.php:19) in /home/mvhost/public_html/test/mod/banuser.php on line 43

Line 43:
Header("Location: ".$PHP_SELF); // so that F5 works

I see a few people had this problem here but nothing was posted as to how to fix it.
Edit: I don't know PHP or VB very well so i just kicked in a javascript redirect since i don't think i'm going to get much help here. If you have another/better solution let me know

Athmo
09-18-2003, 09:03 AM
How did you fix that banuser.php.php problem?

I have no idea what to change....

sKuLLo
11-04-2003, 06:35 PM
Yeah, how can we fix the problems listed on previous messages?

TheDPQ
11-04-2003, 08:15 PM
Edit: Fixed with ereg()

Sheesh i gave ya the answer. I didn't know PHP at the time either but i figured it out. =P Learning how to research and problem solve yourself will get you farther then just waiting for someone to hand you the answer.

doformheader(ereg_replace (".php", "", $PHP_SELF),"update"); //added eReg. was getting banuser.php.php - 9.15.03 by TheDPQ

Theres probably a better solution, but i didn't care to nitpick the code and findout where its already adding the extra .php. Its brute-force, but it works.

FYI i was on a private testing board. So while it didn't break, it didn't really get tested out either.

sKuLLo
11-16-2003, 02:41 PM
where to put this code?

SilverBoy
01-24-2004, 08:32 PM
Is there any update??