vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=228)
-   -   Miscellaneous Hacks - April Fools - Ban User (https://vborg.vbsupport.ru/showthread.php?t=174767)

Adrian Schneider 03-31-2008 10:00 PM

April Fools - Ban User
 
A slight modification of an in house experiment described here.

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

TECK 04-01-2008 06:40 AM

Haha, really cool AJ.

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

Quote:

Originally Posted by rungok (Post 1479811)
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.

Quote:

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

Quote:

Originally Posted by Acers (Post 1479860)
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

Maybe I didn't like my users. :) But yeah, modify to suit your needs. This was very last minute!

Quote:

Originally Posted by Magnumutz (Post 1479885)
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:
Quote:

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:
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:
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

Quote:

Originally Posted by nyqnzguju (Post 1480086)
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

Quote:

Originally Posted by Hasann (Post 1480088)
they will really banned for 3 days :D

Then No Point Lol My members Will be Pissed

Lynne 04-01-2008 03:29 PM

Quote:

Originally Posted by nyqnzguju (Post 1480089)
Then No Point Lol My members Will be Pissed

I changed mine to ban for hours. On line 55 of ban.php:
Code:

    $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

Quote:

Originally Posted by Lynne (Post 1480097)
I changed mine to ban for hours. On line 55 of ban.php:
Code:

    $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

Quote:

Originally Posted by valdet (Post 1480103)
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.
Code:

$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.

fly 04-01-2008 06:06 PM

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.

Code:

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


All times are GMT. The time now is 05:52 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
  • Page Generation 0.01422 seconds
  • Memory Usage 1,817KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (6)bbcode_code_printable
  • (10)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete