PDA

View Full Version : Miscellaneous Hacks - April Fools - Ban User


Adrian Schneider
01 Apr 2008, 08:34
A slight modification of an in house experiment described here (http://www.vbulletin.org/forum/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
01 Apr 2008, 08:38
I love you :D

Hasann
01 Apr 2008, 08:39
Very nice idea Adrian :D

TECK
01 Apr 2008, 08:40
Haha, really cool AJ.

Freezerator
01 Apr 2008, 08:50
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
01 Apr 2008, 08:52
They changed something since when I originally wrote it... who is the user that was banned?

Adrian Schneider
01 Apr 2008, 08:56
OK I updated the script to use REPLACE instead of INSERT... will get back to you as to the cause.

Freezerator
01 Apr 2008, 09:01
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
01 Apr 2008, 09:03
The update removed the error, thanks!

rungok
01 Apr 2008, 09:09
Cool idea. Does it work on 3.6.8?

Freezerator
01 Apr 2008, 09:09
Cool idea. Does it work on 3.6.8?

Works on 3.6.4

rungok
01 Apr 2008, 09:26
When does the option turn up. Right after login for all users?

Adrian Schneider
01 Apr 2008, 09:29
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
01 Apr 2008, 09:43
Ok. Then I will just send an email-blast with link to all users. I'm looking forward to this. LOL

Adrian Schneider
01 Apr 2008, 09:53
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
01 Apr 2008, 10:29
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
01 Apr 2008, 11:05
Ok, i might be a bit slow... but does this actually ban the user?
Cuz that would rock =))

Adrian Schneider
01 Apr 2008, 11:06
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
01 Apr 2008, 11:14
I'm gonna send a mass PM to the users =))

KURTZ
01 Apr 2008, 13:28
Rotfl!

Magnumutz
01 Apr 2008, 16:06
30 of my users got banned :)

Lynne
01 Apr 2008, 17:18
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
01 Apr 2008, 17:18
will they actually be banned or its just a trick... cuz i don't wanna be sitting there unbanning people

Hasann
01 Apr 2008, 17:20
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
01 Apr 2008, 17:21
they will really banned for 3 days :D

Then No Point Lol My members Will be Pissed

Lynne
01 Apr 2008, 17:29
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
01 Apr 2008, 17:33
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
01 Apr 2008, 17:42
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
01 Apr 2008, 18:44
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
01 Apr 2008, 19:01
I wishsomehow this could have been sent thru everyone on my forum thru private messages!

Kestryll
01 Apr 2008, 19:44
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
01 Apr 2008, 20:05
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.

fly
01 Apr 2008, 20:06
Oops, don't accidentally install this on 3.6.

Magnumutz
01 Apr 2008, 20:15
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
01 Apr 2008, 21:12
So far working good, and currently about two people were silly enough to try and ban someone...

Reeve of shinra
01 Apr 2008, 21:12
This is the most hilarious hack I have ever seen.


Mega props, we've knocked off 10 members in about 2mins.

Audentio
01 Apr 2008, 21:35
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
01 Apr 2008, 21:37
Remove whitespace at the top of your config.php file. It has nothing to do with this mod.

Audentio
01 Apr 2008, 21:40
I didn't touch the config.php file, and there is no blank space at the top.

pete_brady
01 Apr 2008, 22:41
quality stuff

EnIgMa1234
01 Apr 2008, 22:53
I didn't touch the config.php file, and there is no blank space at the top.That error says otherwise :/

PoetJA-1975
01 Apr 2008, 23:51
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
02 Apr 2008, 00:33
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
02 Apr 2008, 00:36
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
02 Apr 2008, 00:58
I removed this because people were literally going insane and calling it broken.

Roxie
02 Apr 2008, 03:11
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
02 Apr 2008, 09:58
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
02 Apr 2008, 16:31
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
02 Apr 2008, 17:20
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
03 Apr 2008, 00:44
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
03 Apr 2008, 00:48
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
03 Apr 2008, 07:25
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
03 Apr 2008, 16:33
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?

fly
03 Apr 2008, 17:10
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 Apr 2008, 00:11
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 Apr 2008, 00:18
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.

fly
04 Apr 2008, 01:11
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
30 Apr 2008, 07:40
maybe im retarded or it was never mentioned but where does the .php file go?

jerx
30 Apr 2008, 08:36
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.

Xorn
09 May 2008, 04:13
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
09 May 2008, 06:14
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
24 May 2008, 12:55
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
04 Aug 2008, 13:42
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
04 Aug 2008, 15:05
Where do you upload the ban.php file too?

PamelaE
02 Mar 2009, 23:45
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
26 Mar 2009, 13:44
very funny.

Yellow Slider
27 Mar 2009, 12:00
can someone please phrase the mod?
thanks.

Nadavy
28 Mar 2009, 00:53
Where do I look at the 'victim list' ?

Bounce
29 Mar 2009, 17:35
Where do I look at the 'victim list' ?

http://www.yourdomain.com/forum/ban.php?do=view

Jebadiah04
30 Mar 2009, 18:12
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
30 Mar 2009, 18:14
is there anyway to change the out come from days to hours?

SuperJETT
31 Mar 2009, 14:47
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
31 Mar 2009, 16:04
Will this work on 3.8?

LordDB
31 Mar 2009, 18:09
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
01 Apr 2009, 00:51
When I go to the victim list, none of the banned users show up. Anybody have any idea how come?

BlueNinjaGo
01 Apr 2009, 13:10
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
01 Apr 2009, 13:28
nice :) i install it and change lift ban to 10 * $days

LordDB
01 Apr 2009, 13:38
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
01 Apr 2009, 13:43
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
01 Apr 2009, 14:06
Good joke! 30 users baned and counting :-)

Feign
01 Apr 2009, 14:47
Nice...a moderator was first. lol

RocCityDad
01 Apr 2009, 15:26
i am confused how you link this... any help on actual implementing this.

TIA

LordDB
01 Apr 2009, 15:31
i am confused how you link this... any help on actual implementing this.

TIA

read here:
http://www.vbulletin.org/forum/showpost.php?p=1781677&postcount=78

RocCityDad
01 Apr 2009, 15:34
read here:
http://www.vbulletin.org/forum/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
01 Apr 2009, 15:46
haha nevermind.. figured out.. thanks

ZomgStuff
01 Apr 2009, 20:52
This is great, thanks!

Just letting everyone know it works on 3.8.1

SuperJETT
02 Apr 2009, 13:25
It worked great for me, even got one of my admins and a supermod as well. Over 80 people did it.

BlueNinjaGo
02 Apr 2009, 16:45
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
03 Apr 2009, 13:28
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
03 Jun 2009, 06:49
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
04 Feb 2010, 18:38
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
04 Feb 2010, 18:39
You can see all banned users in Users > View Banned Users.

Thank you

BirdOPrey5
21 Nov 2010, 18:41
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
27 Dec 2010, 22:26
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
27 Dec 2010, 22:34
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
27 Dec 2010, 22:43
Thanks man.

Digital Jedi
27 Dec 2010, 22:45
This is just wrong on so many levels.

...

I'll let you know how it turns out.

bornoffire
01 Apr 2012, 18:15
Does anyone know how to get this to work on 4.0+?

Dark Pulse
19 Aug 2012, 09:20
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
11 Oct 2012, 19:21
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
12 Oct 2012, 00:39
No.

Killer Squirrel
30 Mar 2013, 08:48
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?