PDA

View Full Version : Banned Users List (with reason/date/who)


kidney
01 Apr 2002, 00:43
Here is a modification to a hack that already exist, but it adds by who the ban was made.

Here is an example of this hack
http://forum.dishwacker.com/showbanned.php

and here is the original hack
http://www.vbulletin.org/forum/showthread.php?s=&threadid=35979

Enjoy and let me if any problems occur

Floris
01 Apr 2002, 08:45
Can I limit this to only super/mods/admins can see this? I do not wish guests or registered members to see this.

vertex
01 Apr 2002, 12:57
great addon to supreem's hack, i believe i requested that = ] thanks, it would be better if only staff can see by who though.

Q8vbhacks
01 Apr 2002, 13:54
thanks for hack but i have this problem

Database error in vBulletin: Invalid SQL:
SELECT
userfield.field6, usergroup.title, user.username, user.userid, user.invisible, user.receivepm,
user.usergroupid, user.lastactivity, user.lastvisit, userfield.field7, userfield.field8
FROM usergroup
LEFT JOIN user ON (usergroup.usergroupid = user.usergroupid)
LEFT JOIN userfield ON (userfield.userid = user.userid)
WHERE usergroup.showgroup = 1 AND usergroup.usergroupid = 10

mysql error: Unknown column 'usergroup.showgroup' in 'where clause'
mysql error number: 1054

vertex
01 Apr 2002, 16:37
ok if i have the hack already by supreemball what is there to add thats different? is showbanned.php different?

kidney
02 Apr 2002, 02:55
Originally posted by Q8vbhacks
thanks for hack but i have this problem

Database error in vBulletin: Invalid SQL:
SELECT
userfield.field6, usergroup.title, user.username, user.userid, user.invisible, user.receivepm,
user.usergroupid, user.lastactivity, user.lastvisit, userfield.field7, userfield.field8
FROM usergroup
LEFT JOIN user ON (usergroup.usergroupid = user.usergroupid)
LEFT JOIN userfield ON (userfield.userid = user.userid)
WHERE usergroup.showgroup = 1 AND usergroup.usergroupid = 10

mysql error: Unknown column 'usergroup.showgroup' in 'where clause'
mysql error number: 1054

You must create your fields before anything else and then add the mod to the config.php.

If you still have send your files i'll look into it when I have time.

kidney
02 Apr 2002, 03:22
Originally posted by vertex
ok if i have the hack already by supreemball what is there to add thats different? is showbanned.php different?
Firts make sure that you create the extra and take down the ID that field and add to you config.php the following:
$bannedbyfieldid=7;

and the in the mod/user.php find:

$banuser=$DB_site->query_first("SELECT username,userid,usergroupid,customtitle,posts FROM user WHERE userid=$userid");
$ismod=$DB_site->query_first("SELECT moderatorid FROM moderator WHERE userid=$userid");

and replace it by:

$banby = $bbuserinfo['username'];
$banuser=$DB_site->query_first("SELECT username,userid,usergroupid,customtitle,posts FROM user WHERE userid=$userid");
$ismod=$DB_site->query_first("SELECT moderatorid FROM moderator WHERE userid=$userid");

in the same file look for:

$DB_site->query("UPDATE userfield SET field$banreasonfieldid='$banreason', field$banuntilfieldid='$banuntil', WHERE userid=$banuser[userid]");

and replace it with

$DB_site->query("UPDATE userfield SET field$banreasonfieldid='$banreason', field$banuntilfieldid='$banuntil', field$bannedbyfieldid='$banby' WHERE userid=$banuser[userid]");


and use my showbanned.php, and replace all the template with mine, it should be working fine after all that.



xiphoid

Can I limit this to only super/mods/admins can see this? I do not wish guests or registered members to see this.

That's on my todo list.....

voogru
21 Apr 2002, 00:50
i keep getting this


Database error in vBulletin 2.2.5:

Invalid SQL:
SELECT
userfield.field8, usergroup.title, user.username, user.userid, user.invisible, user.receivepm,
user.usergroupid, user.lastactivity, user.lastvisit, userfield.field, userfield.field9
FROM usergroup
LEFT JOIN user ON (usergroup.usergroupid = user.usergroupid)
LEFT JOIN userfield ON (userfield.userid = user.userid)
WHERE usergroup.showgroup = 1 AND usergroup.usergroupid = 10

mysql error: Unknown column 'userfield.field' in 'field list'

mysql error number: 1054

Date: Saturday 20th of April 2002 08:45:42 PM
Script: http://forums.voogru.com/showbanned.php
Referer:

voogru
21 Apr 2002, 00:59
ok, it works now but now when i ban someone it will not show up in the showbanned thing

voogru
21 Apr 2002, 01:20
n/m got it

inetd
12 May 2002, 10:30
What for it is necessary to create new group Banned if is Banned by Moderators?
If a moderator ban someone, it can write for as up to what date? The user leaves from ban automatically whether or not?

Thanks for replies

inetd
12 May 2002, 11:03
Hm
I banned users. But this ban don't show in showbanned.php and by Who field empty in user profile.
(i'm Admin on my board)
Super Moderator try ban too, and result the same. :(
Help me please

The Realist
08 Jun 2002, 18:58
Im getting the following. Done all as above, error is:

Invalid SQL:
SELECT
userfield.field5, usergroup.title, user.username, user.userid, user.invisible, user.receivepm,
user.usergroupid, user.lastactivity, user.lastvisit, userfield.field6, userfield.field
FROM usergroup
LEFT JOIN user ON (usergroup.usergroupid = user.usergroupid)
LEFT JOIN userfield ON (userfield.userid = user.userid)
WHERE usergroup.showgroup = 1 AND usergroup.usergroupid = 10

mysql error: Unknown column 'userfield.field5' in 'field list'

mysql error number: 1054


Anyone?

Running 2.2.4

The Realist
09 Jun 2002, 15:29
Solved the above DB error, but when we ban a member its not being displayed in the showbanned page.

Any ideas.

Chris M
10 Jun 2002, 11:11
Same here...

:(

Satan

Erwin
12 Jun 2002, 03:17
Easily fixed - make sure that the usegroupid of the banned group in showbanned.php is the same as the usergroupid of your own forum. Otherwise it won't show.

Chris M
16 Jun 2002, 10:27
I did...

It still doesnt show...

Satan