PDA

View Full Version : Terry's Show Banned Users List Hack


wrongful
10-06-2004, 10:00 PM
Well, this is my first major hack, and my first php script to boot. It's not my original idea since there were several versions of this hack that existed for previous versions of vB, but I don't believe that one has been made for vB3 yet.


Anyhow, enough talk. This is a list that shows the past 30 banned users on your forums. When I update the hack I will make this number configurable, but in the meantime it works great like it is.

When you ban a user you can fill in a reason and if applicable, a URL to the offending post. When the user is banned their name goes into a list that displays all of this information and more. All users except guests have permission to view this list.


I could keep talking, but it's pretty self explanatory and the screenshots should explain anything I haven't said. Like I said, I am pretty new to PHP, so if anyone has any suggestions or feedback, please let me know. I hope I didn't forget anything.


Also, don't forget to click install and enjoy!

Oblivion Knight
10-07-2004, 08:03 AM
This looks like a nice hack.. :)

alkatraz
10-07-2004, 09:48 AM
looks cool, thx!

nexialys
10-07-2004, 11:47 AM
this hack have some bugs: fiest, you put the table_prefix at the wrong place.. lol..:

SELECT " . TABLE_PREFIX . "userid, username, dateline, bannedpost, reason, sentbywhom, howlong FROM banlist ORDER BY banid DESC LIMIT 30have to be:SELECT * FROM " . TABLE_PREFIX . "banlist ORDER BY banid DESC LIMIT 30etc...

wrongful
10-07-2004, 12:42 PM
this hack have some bugs: fiest, you put the table_prefix at the wrong place.. lol..:

SELECT " . TABLE_PREFIX . "userid, username, dateline, bannedpost, reason, sentbywhom, howlong FROM banlist ORDER BY banid DESC LIMIT 30have to be:SELECT * FROM " . TABLE_PREFIX . "banlist ORDER BY banid DESC LIMIT 30etc...I have fixed this, and one other error that I noticed. If you have installed this hack up to this point it wouldn't hurt to redownload and replace showbans.php.

platnum
10-07-2004, 01:26 PM
Damnnnnnnnnn... I've been wanting something like this for my site!!!! w00t w00t.. Loving it!.. I'll install it in a few :D

platnum
10-07-2004, 01:48 PM
Installed :D.. Works like a charm.. I love it :D

integra99
10-07-2004, 04:19 PM
I wish the banlist was drawn from current bans by usergroup, and not having to make another table in the database to store bans. Any chances of having the same templates and setup, just pulling the usernames and id's, reasons, etc from the current ban list instead?

Also be nice to show the usergroup that the user is banned to, because some of us have more than one ban usergroup :D

nexialys
10-07-2004, 04:35 PM
i prefer that version than the Reason for Banning hack that was released long time ago, so it's not using the usernotes and is not bloating the script structure...

btw, without adding the username, we can LEFT JOIN the SELECT to have the username of each banned person, so the username is not hardcoded in the table, and you also then filter the usergroups as integra99 wants...

xug
10-10-2004, 11:11 PM
Yeah, make this work with the banned list we had before the point of installing this hack!
Further I love it so my members can see who,what,why instead of the team only, cool job, but please make it work with the original banned list.

integra99
10-11-2004, 11:47 AM
I'm not saying filter usergroups, I'm suggesting only displaying the current banned members versus creating a new database table and storing a list of bans.

TCattitude
11-24-2004, 02:41 PM
Yeah, make this work with the banned list we had before the point of installing this hack!
Further I love it so my members can see who,what,why instead of the team only, cool job, but please make it work with the original banned list.
Anyone can do this? :S

Oblivion Knight
12-28-2004, 08:00 AM
I'd love to see this hack built on.. :)

As others have said, using the existing banned list instead of creating a new one would be a good idea. Also, there should be a section for expired temporary bans and have the log moved there automatically when a user is unbanned. Some searching & sorting options and pagination would be good too.

shadiguy1
01-07-2005, 06:26 PM
how can we remove names form the list if we wanted too lol .. in case we decide to unban them lol.. or would we manually need to remove them.. u shoul try and incorporae something to remove the name form list if we wanted. Im sure if you got this far you can probbbaly add that. As im not a coder so i cant do it myself Thanks anyway for the great hack,

djjeffa
02-19-2005, 09:55 PM
how can we remove names form the list if we wanted too lol .. in case we decide to unban them lol.. or would we manually need to remove them.. u shoul try and incorporae something to remove the name form list if we wanted. Im sure if you got this far you can probbbaly add that. As im not a coder so i cant do it myself Thanks anyway for the great hack,
BUMP!!!!!!

rinkrat
02-20-2005, 01:04 AM
Zip file is bad?

djjeffa
02-22-2005, 10:25 PM
Zip file is bad?
worked for me?
just wish when you unbanned someone or when ther time was up they would be removed from the list

bigcurt
02-24-2005, 06:47 PM
Dude I love this hack if you would maybe just add what they were talking about it, it would be AWESOME..ER lol.

ged
03-04-2005, 09:41 AM
Yeah! This is a wonderful hack I think. Thank you wrongful. :)

bigcurt
03-05-2005, 12:36 AM
Well, I have it installed..but I am not sure how to make my banned users show up on this page someone PLEASE help me.

bigcurt
03-06-2005, 02:44 AM
Anyone?

bigcurt
03-07-2005, 03:13 AM
I really need help with this hack, I love it but I cant figure out how to get the users onto the page :(

bigcurt
03-08-2005, 12:12 AM
Anyone????

wrongful
03-08-2005, 07:36 PM
They should show up on the page when you ban them. Is that not happening?

bigcurt
03-09-2005, 11:27 PM
Nope :( :(

bigcurt
03-12-2005, 03:15 AM
Anyone, I really need this hack.

wrongful
03-13-2005, 06:59 PM
have you checked to make sure all the file edits were correct?

djjeffa
03-18-2005, 09:22 PM
anyway to make is show all who were banned not just the last 30? maybe like 50 a page?

Phrost
03-24-2005, 01:27 AM
Anyone know a way to increase the amount of text you can have in the text box?

djjeffa
03-27-2005, 12:59 AM
anyway to make is show all who were banned not just the last 30? maybe like 50 a page?
ok I found this
Find:
$getbanned = $DB_site->query("SELECT * FROM " . TABLE_PREFIX . "banlist ORDER BY banid DESC LIMIT 30");

replace with:
$getbanned = $DB_site->query("SELECT * FROM " . TABLE_PREFIX . "banlist ORDER BY banid DESC LIMIT 50");

but i would like to find a way to make pages.

djjeffa
03-31-2005, 12:38 AM
anyway to edit the list for like if we un ban someone?

garrynewman
03-31-2005, 03:30 PM
I added this so you can update the banlist by banning the user again (It deletes all entries for that user rather than having duplicates).

In: modcp/banning.php

After:

//Terry's Banned User List Hack

Add:


$DB_site->query("
DELETE FROM " . TABLE_PREFIX . "banlist WHERE userid=$user[userid]");

garrynewman
04-01-2005, 12:19 PM
And another - to remove them from the list when you remove their ban manually via the control panel..

In: modcp/banning.php

Before:

// check we got a record back and that the returned user is in a banned group

Add:

// garry: we don't care whether they're banned or not - just take
// them off the banlist of they're on it.

$DB_site->query("DELETE FROM " . TABLE_PREFIX . "banlist WHERE userid=$userid");

bigcurt
04-05-2005, 01:14 AM
I am still trying to get this to work I will pay a little for someone to get this to work 4 me please.

Redbbs Team
04-10-2005, 07:12 AM
thanks

mechanicvirus
04-26-2005, 11:50 PM
I'm having trouble with users who were banned but not anymore, they still show up on the list and I even tried that code.

djjeffa
04-27-2005, 01:51 AM
the duplacate user one works good on new bans but the unban one dont seem to be working also is there anyway to get in the db to clean up the old bans?

mechanicvirus
05-02-2005, 12:18 AM
Still no way to get it so it removes users that were unbanned?

rapcriminals
05-05-2005, 04:45 AM
installs ;)

MP3
05-05-2005, 08:54 AM
nice hack

frankenberrie
05-07-2005, 03:34 PM
I am also having issues where users that I unbanned still show on the list.. ANy ideas?

HeloHi
05-12-2005, 06:30 PM
ok I found this
Find:
$getbanned = $DB_site->query("SELECT * FROM " . TABLE_PREFIX . "banlist ORDER BY banid DESC LIMIT 30");

replace with:
$getbanned = $DB_site->query("SELECT * FROM " . TABLE_PREFIX . "banlist ORDER BY banid DESC LIMIT 50");

but i would like to find a way to make pages.

I would like to see this hack make pages as well, to keep a public record. After the limit is reached for it to create another page. :cool:

I am installing this though, just what I was looking for, thanks wrongful!

edit: Is there any way of making the style this shows up in anything but default? Where might I change that?

bigcurt
05-16-2005, 10:03 PM
Please wrongful help us make pages :) :).

the_red_chimp
07-06-2005, 08:11 PM
Database error in vBulletin 3.0.7:

Invalid SQL: CREATE TABLE banlist (
banid int(10) unsigned NOT NULL DEFAULT '' auto_increment,
userid smallint(5) NOT NULL DEFAULT '',
username varchar(50) NOT NULL DEFAULT '',
dateline int(10) unsigned NOT NULL DEFAULT '',
bannedpost varchar(255) NOT NULL DEFAULT '',
reason varchar(255) NOT NULL DEFAULT '',
sentbywhom varchar(50) NOT NULL DEFAULT '',
howlong int(10) unsigned NOT NULL DEFAULT '',
INDEX (banid, userid)
)

mysql error: Invalid default value for 'banid'

mysql error number: 1067

Date: Wednesday 06th of July 2005 02:10:21 PM
Script: website
Referer:
Username: Chimp
IP Address: 66.137.177.2

:(

Kirk Y
07-06-2005, 10:17 PM
Any way to make this show the users that are already banned? If it's supposed to be doing this, then it's not doing it for me.

Marco van Herwaarden
07-07-2005, 09:41 AM
Change:
banid int(10) unsigned NOT NULL DEFAULT '' auto_increment,

into:
banid int(10) unsigned NOT NULL auto_increment,

You can not have a default value for an auto-increment field in MySQL 4.1 and higher.

Nuckolsc.com
07-21-2005, 10:12 PM
Sorry to bring this thread back up, but I have a question. You know how it only store the lastest 30 people banned.. Is there a way to up that #? When I hit control + f in the code I found this: "banlist ORDER BY banid DESC LIMIT 30"); Could I change that to like 100 or something and still ahve it function right?

Marco van Herwaarden
07-22-2005, 05:00 AM
Probably yes.

GoTTi
07-28-2005, 09:10 AM
any1 figure out a way that the name is removed from the list after the user serves out his sentence?

MB Dreamz
07-31-2005, 03:26 AM
any1 figure out a way that the name is removed from the list after the user serves out his sentence?

I need this too! Thanks.

GoTTi
08-06-2005, 07:13 AM
any1 figure out a way that the name is removed from the list after the user serves out his sentence?

any1?

MB Dreamz
08-17-2005, 03:40 PM
Has anyone figured this out yet?

GoTTi
08-19-2005, 06:06 AM
ok so um......

i was installing the AWS hack, and the entire thing is the same as the Terry's Show Banned Users hack...well, the code pertaining to the banning.php file. whats this about?

one of yall need to give someone credit for that, cuz your stealing code to use it for your own benefit, and that sucks without giving credit.

Terry's Show Banned User List Hack: https://vborg.vbsupport.ru/showthread.php?t=70293
Advanced Warning System: https://vborg.vbsupport.ru/showthread.php?s=&threadid=71992

yall can see in the instructions its the same thing...if ya care...

so whats this about?

lucky64
09-20-2005, 12:26 AM
any1 figure out a way that the name is removed from the list after the user serves out his sentence?

Also interested in knowing if anyone has...also any chance of coding this for 3.5 rc3?

Mikecp421
10-21-2005, 08:06 PM
does this work for 3.0.8??

DISREGARD, I got it! Thanks

lucky64
10-21-2005, 10:24 PM
I'd like to see this a plugin for 3.5 :D

djjeffa
11-24-2005, 05:47 PM
I'd like to see this a plugin for 3.5 :D

yea bump!!
also i want to be able tou use my old list if posible lol

bigcurt
08-07-2006, 05:13 PM
I was going to try to port this over to 3.5/6 for you guys, but I am getting no reply from him on whether I am allowed to do it or not...so, we will see how things go.

HeloHi
10-22-2006, 07:14 PM
I was going to try to port this over to 3.5/6 for you guys, but I am getting no reply from him on whether I am allowed to do it or not...so, we will see how things go.

I know him from elsewhere on the internet. He doesn't have his license anymore. However, I also would like to see this ported over, I'll try and do something about it! :up:

wrongful
10-22-2006, 07:44 PM
I thought I had told someone that they could port this hack but I guess they never got around to it.

I hereby give anyone and everyone permission to port this hack to anything they want. I do not have plans to update it.

SnapOff Racing
12-13-2006, 08:08 AM
bump for this thread...i need this banned list on my site for 3.6.4 please :D

HeloHi
01-24-2007, 05:05 AM
bump for this thread...i need this banned list on my site for 3.6.4 please :D

this hack works for me on my 3.6.4

https://vborg.vbsupport.ru/showthread.php?t=103190