View Full Version : Miscellaneous Hacks - April Fools - Ban User
Adrian Schneider
03-31-2008, 10:00 PM
A slight modification of an in house experiment described here (https://vborg.vbsupport.ru/showthread.php?t=154318).
Users are prompted with the option to ban any user they choose for a period within 3-30 days. Upon submitting, there is a half second pause, then the username switches with their own name followed with another half second pause, before the script finally submits. Don't worry -- the user input here is completely ignored.
The entered username is completely ignored, and the user submitting the form is banned for the period they entered.
Refer to attached screenshots for more info.
It's up to you to link to this file, and you can also view ban.php?do=view for a list of banned users.
... you may want to unban some of these users the next day. No pressure though.
Freezerator
04-01-2008, 06:38 AM
I love you :D
Hasann
04-01-2008, 06:39 AM
Very nice idea Adrian :D
Freezerator
04-01-2008, 06:50 AM
An error here?
<!--
Database error in vBulletin 3.6.4:
Invalid SQL:
INSERT INTO userban
(userid, usergroupid, displaygroupid, customtitle, usertitle, adminid, bandate, liftdate, reason)
VALUES (1568, 15, 15, 0, 'Junior Member', 1, 1207036109, 1207295309, 'Haha!! Fooled you!!'
);
MySQL Error : Duplicate entry '1568' for key 1
Error Number : 1062
Date : Tuesday, April 1st 2008 @ 08:48:29 AM
Script : http://xxxxxx.net/forum/ban.php
Referrer : http://xxxxxx.net/forum/ban.php
IP Address : 80.127.xxxxx
Username : Freezer
Classname : vB_Database
-->
Adrian Schneider
04-01-2008, 06:52 AM
They changed something since when I originally wrote it... who is the user that was banned?
Adrian Schneider
04-01-2008, 06:56 AM
OK I updated the script to use REPLACE instead of INSERT... will get back to you as to the cause.
Freezerator
04-01-2008, 07:01 AM
Hmm, it works on other users, i tried with an ex admin account, maybe that has someting to do with it.
Sofar it's working well expect that one error.
2 users banned already :D
Freezerator
04-01-2008, 07:03 AM
The update removed the error, thanks!
rungok
04-01-2008, 07:09 AM
Cool idea. Does it work on 3.6.8?
Freezerator
04-01-2008, 07:09 AM
Cool idea. Does it work on 3.6.8?
Works on 3.6.4
rungok
04-01-2008, 07:26 AM
When does the option turn up. Right after login for all users?
Adrian Schneider
04-01-2008, 07:29 AM
It's up to you to link to this file, and you can also view ban.php?do=view for a list of banned users.
rungok
04-01-2008, 07:43 AM
Ok. Then I will just send an email-blast with link to all users. I'm looking forward to this. LOL
Adrian Schneider
04-01-2008, 07:53 AM
I recommend an announcement of some sort... but email works I suppose.
Be creative.
Dear (Joe),
We have noticed you have been a good guy lately, we want to award you with something. <snip>
Acers
04-01-2008, 08:29 AM
A suggestion, I did on my site after changing the code a little.
Change the days to hours.
Tinker the code to progressively increase ban period based on the period selected :D (Although best to keep in hours rather than days, days is too much :)
Great idea btw :D
Magnumutz
04-01-2008, 09:05 AM
Ok, i might be a bit slow... but does this actually ban the user?
Cuz that would rock =))
Adrian Schneider
04-01-2008, 09:06 AM
A suggestion, I did on my site after changing the code a little.
Change the days to hours.
Tinker the code to progressively increase ban period based on the period selected :D (Although best to keep in hours rather than days, days is too much :)
Great idea btw :DMaybe I didn't like my users. :) But yeah, modify to suit your needs. This was very last minute!
Ok, i might be a bit slow... but does this actually ban the user?
Cuz that would rock =))You bet! Let them sweat.
Magnumutz
04-01-2008, 09:14 AM
I'm gonna send a mass PM to the users =))
KURTZ
04-01-2008, 11:28 AM
Rotfl!
Magnumutz
04-01-2008, 02:06 PM
30 of my users got banned :)
Lynne
04-01-2008, 03:18 PM
I switched it to hours and put a notice at the top of my site:
TTD Offsite - Today the TTD Staff will be off having a barbecue (thank you to all the donators on this site!). We'll be having a little beer, and a little wine, along with some fine food courtesy of Mr. Aaron and Ms. Heather. We will be checking in every once in a while, but I'm not sure what our state-of-mind will be like at the time, if you know what I mean! So, while we are gone, we have allowed a couple of trusted users, Mr. Wolf, and Mr. Possessed, and Mr. {insert username here} to watch over the users and if you misbehave, you may find yourself banned by them since they now have banning priveledges. So.... Be Good!I've so far, in one hour, we have had 8 users ban themselves. I haven't had any comments yet on my subtle hint that we were using donations (our site runs on donations) to have the barbecue.
Thank you for this!
edit to add:
I created a new plugin, April Fools, at postbit_display_complete with the following code:eval('$template_hook[postbit_userinfo_left] .= " ' . fetch_template('postbit_april_fools') . '";');
and then created a new template, postbit_april_fools, with the following code:
<div class="smallfont"><a href="/forums/ban.php">Temporarily Ban $post[username]</a></div>
That inserted the link into the postbit for them to ban the users.
nyqnzguju
04-01-2008, 03:18 PM
will they actually be banned or its just a trick... cuz i don't wanna be sitting there unbanning people
Hasann
04-01-2008, 03:20 PM
will they actually be banned or its just a trick... cuz i don't wanna be sitting there unbanning people
they will really banned for 3 days :D
nyqnzguju
04-01-2008, 03:21 PM
they will really banned for 3 days :D
Then No Point Lol My members Will be Pissed
Lynne
04-01-2008, 03:29 PM
Then No Point Lol My members Will be Pissed
I changed mine to ban for hours. On line 55 of ban.php:
$liftdate = TIMENOW + (3600 * $days);3600 seconds= 60 seconds/min * 60 minutes
I will click Lift Ban on them in a few hours anyway.
valdet
04-01-2008, 03:33 PM
I changed mine to ban for hours. On line 55 of ban.php:
$liftdate = TIMENOW + (3600 * $days);3600 seconds= 60 seconds/min * 60 minutes
I will click Lift Ban on them in a few hours anyway.
How can we tweak so it bans them for few minutes and to display the message that they are banned for xx minutes..
Lynne
04-01-2008, 03:42 PM
How can we tweak so it bans them for few minutes and to display the message that they are banned for xx minutes..
I tried to spell out where the number comes from.... If you want to do:
days = leave as is at 86400
hours = 3600
minutes = 60
Just change the bolded number depending on what you want.
$liftdate = TIMENOW + (3600 * $days);
valdet
04-01-2008, 04:44 PM
I just placed a huge link on my site and now there's a BAN frenzy going on. :) :) I made it so it only bans them for few minutes.
Is there anyway that forum/ban.php?do=view link saves the list so we can make a Hall of Fame/Shame afterwards. Right now it does not save the names after the ban is lifted so I need to refresh often to see who is banned.
This would be even better..
samraz972
04-01-2008, 05:01 PM
I wishsomehow this could have been sent thru everyone on my forum thru private messages!
Kestryll
04-01-2008, 05:44 PM
Hi,
I am terribly new to this type of stuff but this looks too good to pass up!
Just to be clear, if I change the line Lynne mentioned to read this:
$liftdate = TIMENOW + (60 * $days);
they will be banned for minutes as opposed to days?
For example someone bans somebody else for 5 days it will in reality ban them for 5 minutes, is that correct?
Also how do you install this?
I've not played with any of these so I'm really new at this.
Thanks!
rungok
04-01-2008, 06:05 PM
A bit late now, but a good idea would be to display the user they actually tried to ban on each line (on the view-page) to annoy the senders even more.
Oops, don't accidentally install this on 3.6.
Magnumutz
04-01-2008, 06:15 PM
It works on 3.6 as well.
About 1 hour ago, i had 40 of my members banned :D
But now i unbanned them and let them know :)
cheat-master30
04-01-2008, 07:12 PM
So far working good, and currently about two people were silly enough to try and ban someone...
Reeve of shinra
04-01-2008, 07:12 PM
This is the most hilarious hack I have ever seen.
Mega props, we've knocked off 10 members in about 2mins.
Audentio
04-01-2008, 07:35 PM
This really screwed my board up.
Unable to add cookies, header already sent.
File: /home/audentio/public_html/forums/includes/config.php
Line: 1
Cant view threads, I cant get into the acp, nothing. WTF did this mod do?
Adrian Schneider
04-01-2008, 07:37 PM
Remove whitespace at the top of your config.php file. It has nothing to do with this mod.
Audentio
04-01-2008, 07:40 PM
I didn't touch the config.php file, and there is no blank space at the top.
pete_brady
04-01-2008, 08:41 PM
quality stuff
EnIgMa1234
04-01-2008, 08:53 PM
I didn't touch the config.php file, and there is no blank space at the top.That error says otherwise :/
PoetJA-1975
04-01-2008, 09:51 PM
This is just INSANE lol - I think Members would be mad as hell actually - And it's real banning?!?!? Yep = INSANITY - but crazy as hell - I think I'll pass on this one - but thanx for sharing LOL
Jacquii.
Lynne
04-01-2008, 10:33 PM
This is just INSANE lol - I think Members would be mad as hell actually - And it's real banning?!?!? Yep = INSANITY - but crazy as hell - I think I'll pass on this one - but thanx for sharing LOL
Jacquii.
I changed mine to hours (as I wrote) and lessened the amount of time they could do it for. Some of the users actually came back and then went and banned themselves again. I have some silly users!
Adrian Schneider
04-01-2008, 10:36 PM
When I did it last year, the other admin complained because half the site was banned. And so was he. lol
:)
I still think it's funnier if you leave them banned!
cheat-master30
04-01-2008, 10:58 PM
I removed this because people were literally going insane and calling it broken.
Roxie
04-02-2008, 01:11 AM
This worked well for us. Members ended up IMing or texting me asking me to let them back in. Luckily they are all very good sports! I wish more people had fallen for it. But after everything else I pulled, they were too scared to even click the link. lol
Hornstar
04-02-2008, 07:58 AM
I removed this because people were literally going insane and calling it broken.rofl. I can just imagine my members doing the same and blamming me for it being broken when in fact they just got fooled lol
PoetJA-1975
04-02-2008, 02:31 PM
I changed mine to hours (as I wrote) and lessened the amount of time they could do it for. Some of the users actually came back and then went and banned themselves again. I have some silly users!
LOL - Did they not understand they were banning themselves?!?!? HAHAHAHAHA! Crazy lol
Jacquii.
Lynne
04-02-2008, 03:20 PM
This was a big success on my board. I had several users ban themselves and I also had several PMs from users saying thank you for thinking they were a "trusted user" and giving them the banning power while we were gone on our BBQ. :)
Theoldwiz
04-02-2008, 10:44 PM
Lynne if I do your change will all banned times be changed, or just for this mod? (I know its a bit late)
Thanks!
Lynne
04-02-2008, 10:48 PM
Lynne if I do your change will all banned times be changed, or just for this mod? (I know its a bit late)
Thanks!
Just for this mod. You are editing the ban.php page which was included with this hack and is the page users get sent to 'ban' someone.
leginag
04-03-2008, 05:25 AM
The mod was fun and it was funny seeing ppl complaining in our chat box.
However, there is an issue when I am trying to unban them.
When they get 'banned', their primary group just gets changed to "COPPA users awaiting moderation", but when I search for users in that usergroup, it says there aren't any in there.
So I just can't go an unban them all easily. I now have to get them to report to me that they were banned. :s which is a pain cos there are some hundred+ ppl
Is there something I am missing? How can I mass-unban everyone?
Lynne
04-03-2008, 02:33 PM
You can see all banned users in Users > View Banned Users. The top of the list shows all users that are just temporarily banned.
What makes you think they are being moved to the COPPA group if when you go to view the users in that group you see none?
It works on 3.6 as well.
About 1 hour ago, i had 40 of my members banned :D
But now i unbanned them and let them know :)
It didn't for me. It threw the users in another group I created years ago for another project. Additionally, it doesn't show me who is in that group. Meaning, I have people banned and don't know who they are. I even tried running a SQL query to see who was in my group 31. It shows no users, yet I removed another member out of the group today.
Yeah, this thing totally screwed my 3.6.8 install, but its my fault for not seeing that this was a 3.7 hack...
I just hope and pray that the unban part works and they will be able to get back on the forum. :(
leginag
04-03-2008, 10:11 PM
You can see all banned users in Users > View Banned Users. The top of the list shows all users that are just temporarily banned.
What makes you think they are being moved to the COPPA group if when you go to view the users in that group you see none?
When I go to view banned users, there aren't any of the users that were banned.
But when I go look at the individual user profile they say they are in the COPPA group, and I have to change that to registered user. But when I look at the COPPA group, there isn't anyone in there:S It's like..phantom user group!
Lynne
04-03-2008, 10:18 PM
When I go to view banned users, there aren't any of the users that were banned.
But when I go look at the individual user profile they say they are in the COPPA group, and I have to change that to registered user. But when I look at the COPPA group, there isn't anyone in there:S It's like..phantom user group!
Looking in the code, you can see he bans them to usergroup 8. If you deleted that group or changed it in anyway from the Default Banned Group it was defined to be by vBulletin, then I would imagine that could cause the problems you are seeing. Perhaps you deleted the group, so they are stuck in some usergroup 8 that doesn't exist.
When I go to view banned users, there aren't any of the users that were banned.
But when I go look at the individual user profile they say they are in the COPPA group, and I have to change that to registered user. But when I look at the COPPA group, there isn't anyone in there:S It's like..phantom user group!
You must have installed this hack on 3.6.x, like me. I'm screwed until these banned members somehow get in contact with me. :(
edit: And yes, I don't have a usergroup 8...
editedit: Wait! Maybe I can run a sql query looking for group 8. brblulz
editeditedit: That returned nothing either. Maybe I got everyone, or they are still in limbo...
oh, and the SQL query I used was
Query
SELECT * FROM user WHERE usergroupid='8'
tbrown7552
04-30-2008, 05:40 AM
maybe im retarded or it was never mentioned but where does the .php file go?
maybe im retarded or it was never mentioned but where does the .php file go?
I haven' t used it, but you most likely should copy it to forum root.
I am now banned...How do i unban my self...i set it to 60*$days and i am passed the time it gave me to unban
actually i am one hour passed...:'
edit ---
lol now its gone
youradhere4222
05-09-2008, 04:14 AM
It's up to you to link to this file, and you can also view ban.php?do=view for a list of banned users.
Two questions:
I'm going to my domain as: http://www.mydomain.com/forum/ban.php?do=view and I'm getting a 404 error message.
If I find this, can I make it so that registered users can view this list?
peterpigman
05-24-2008, 10:55 AM
How do you modify this to make it work in minutes or hours rather than days? Also to change the April fools text.
nm I figured it out.
Merjawy
08-04-2008, 11:42 AM
This is crazy lol.. I really think this is crazy.. I am laughing here lol. I love it.
too bad I can't use it on my site ...
great work and nice idea
Megatr0n
08-04-2008, 01:05 PM
Where do you upload the ban.php file too?
PamelaE
03-02-2009, 09:45 PM
Not long until April. Can we see who people chose to ban? That would be fantastico if it added it to their profile page.
Is that possible? Also does this work on 3.8?
thompson
03-26-2009, 11:44 AM
very funny.
Yellow Slider
03-27-2009, 10:00 AM
can someone please phrase the mod?
thanks.
Nadavy
03-27-2009, 10:53 PM
Where do I look at the 'victim list' ?
Bounce
03-29-2009, 03:35 PM
Where do I look at the 'victim list' ?
http://www.yourdomain.com/forum/ban.php?do=view
Jebadiah04
03-30-2009, 04:12 PM
My ban list is growing by the minute LOLOL best mod ever possibly
here it is
http://www.nwuonline.com/forums/ban.php?do=view
thank you so much for this
Jebadiah04
03-30-2009, 04:14 PM
is there anyway to change the out come from days to hours?
SuperJETT
03-31-2009, 12:47 PM
I have this ready for tomorrow. I changed it to minutes instead of days (change 86400 to 60 in ban.php) and edited the restore banned users task to run every minute instead of every hour.
This should be fun!
hurricane_sh
03-31-2009, 02:04 PM
Will this work on 3.8?
LordDB
03-31-2009, 04:09 PM
has any user got this to work on vB 3.6.0 only...if so, can you kindly post it here/changes, plz? Thx :)
BansheeDK
03-31-2009, 10:51 PM
When I go to the victim list, none of the banned users show up. Anybody have any idea how come?
BlueNinjaGo
04-01-2009, 11:10 AM
No instructions? Really?
Because I uploaded the php file and installed the product... now what?
I don't see options for this anywhere in ACP. Now what?
bartek24m
04-01-2009, 11:28 AM
nice :) i install it and change lift ban to 10 * $days
LordDB
04-01-2009, 11:38 AM
No instructions? Really?
Because I uploaded the php file and installed the product... now what?
I don't see options for this anywhere in ACP. Now what?
as stated in the main post...just point your URL like this:
http://www.yourdomain.com/forum/ban.php
BlueNinjaGo
04-01-2009, 11:43 AM
Thank you. Somehow I read through all the posts and didn't see that. I kept seeing people ask how to view already banned users, and might have mistaken that post for one of those.
RadioErewan
04-01-2009, 12:06 PM
Good joke! 30 users baned and counting :-)
Feign
04-01-2009, 12:47 PM
Nice...a moderator was first. lol
RocCityDad
04-01-2009, 01:26 PM
i am confused how you link this... any help on actual implementing this.
TIA
LordDB
04-01-2009, 01:31 PM
i am confused how you link this... any help on actual implementing this.
TIA
read here:
https://vborg.vbsupport.ru/showpost.php?p=1781677&postcount=78
RocCityDad
04-01-2009, 01:34 PM
read here:
https://vborg.vbsupport.ru/showpost.php?p=1781677&postcount=78
yeah I get that, but I get an error page...
where do I actually put the ban.php file, i thought it was under /forum on the server
maybe it doesn't work in 3.8?
RocCityDad
04-01-2009, 01:46 PM
haha nevermind.. figured out.. thanks
ZomgStuff
04-01-2009, 06:52 PM
This is great, thanks!
Just letting everyone know it works on 3.8.1
SuperJETT
04-02-2009, 11:25 AM
It worked great for me, even got one of my admins and a supermod as well. Over 80 people did it.
BlueNinjaGo
04-02-2009, 02:45 PM
The mod worked well, my members didn't... The first couple figured something was up so they entered their own name, or other stuff like "April Fools" and got banned... then I got the first one to get banned to try to convince a few others to "get revenge" for him, so that got a few. But overall, most users were upset at the idea they might get banned for no reason and started getting upset.
People take the internet WAAAAY to seriously. Anyways, thanks for a great mod and I can't wait to see what you think of next year.
SuperJETT
04-03-2009, 11:28 AM
I think it really depends on how you present it. I made a post, stickied it, and added BAN THIS USER under everyone's post counts.
Here's my thread with all the replies: http://www.x-h2o.com/showthread.php?t=53167
Here's my initial post (I have the [you] mod installed also so that converts to their username):
Several of us (admins, moderators, etc) are kind of burned out lately and wanting to take a break. We haven't really had time to find/train replacements, and since we like to be 'By Riders, For Riders', we feel this is a good time to let the members 'self-moderate'.
So, a good portion of members including [you] have been given user banning rights. Hopefully they will use it properly and not go overboard, but we'll see. If it doesn't work out, we'll change back and find some new moderators.
www.x-h2o.com/ban.php (http://www.x-h2o.com/ban.php) should be accessible to you if you have this permission and there is a link under each person's avatar.
Darin - SuperJETT
merk_aus
06-03-2009, 04:49 AM
haha love it! I am going to install this along with your Fantasy Cricket script when you send it to me since I have paid for it :D
tobe12
02-04-2010, 04:38 PM
The mod was fun and it was funny seeing ppl complaining in our chat box.
However, there is an issue when I am trying to unban them.
When they get 'banned', their primary group just gets changed to "COPPA users awaiting moderation", but when I search for users in that usergroup, it says there aren't any in there.
So I just can't go an unban them all easily. I now have to get them to report to me that they were banned. :s which is a pain cos there are some hundred+ ppl
Is there something I am missing? How can I mass-unban everyone?
I am having the same issue and I don't remember even installing this mod. Any suggestions?
tobe12
02-04-2010, 04:39 PM
You can see all banned users in Users > View Banned Users.
Thank you
BirdOPrey5
11-21-2010, 04:41 PM
Nice... I made some edits... changed it actually ban from 10 to 120 MINUTES (although it still says "Days" so if someone bans someone for 30 days it really becomes 30 minutes... should keep anyone from being annoyed too much.
Even when the "fun" is over I think I'll keep it for people who feel the need to ban themselves, like a self imposed "cool off" period.
Thanks :up:
EddyMaxx
12-27-2010, 08:26 PM
Nice... I made some edits... changed it actually ban from 10 to 120 MINUTES (although it still says "Days" so if someone bans someone for 30 days it really becomes 30 minutes... should keep anyone from being annoyed too much.
Even when the "fun" is over I think I'll keep it for people who feel the need to ban themselves, like a self imposed "cool off" period.
Thanks :up:
Hey Joe... What did you change to make to minutes instead of days?
BirdOPrey5
12-27-2010, 08:34 PM
In the .php file find the line:
$liftdate = TIMENOW + (86400 * $days);
86400 is the number of seconds in 1 day (60 * 60 * 24)... Change it to the number of seconds in one minute (60) to make the ban in minutes rather than days.
Just keep in mind the scheduled task that unbans people I think runs only once every hour by default so a "5 minute" ban will last until the scheduled task runs after the ban is up.
EddyMaxx
12-27-2010, 08:43 PM
Thanks man.
Digital Jedi
12-27-2010, 08:45 PM
This is just wrong on so many levels.
...
I'll let you know how it turns out.
bornoffire
04-01-2012, 04:15 PM
Does anyone know how to get this to work on 4.0+?
Dark Pulse
08-19-2012, 07:20 AM
I would absolutely love this if it could be updated for vBulletin 4.x.
Yes, I'm already planning how to screw with my users next year. I'm a mean-spirited guy, what can I say? :p
SoftWareRevue
10-11-2012, 05:21 PM
What if we were to move the user to a group that isn't a banned group? Would this still move them back when time's up or manually via the page?
BirdOPrey5
10-11-2012, 10:39 PM
No.
Killer Squirrel
03-30-2013, 07:48 AM
Is this useable for 4.1?? I would LOVE to do it! I am looking for something like this does anyone have any ideas if this cant be used for 4.1?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.