View Full Version : Who was banned
GenSec
09-04-2001, 10:00 PM
I wanted to show the list of "banned by moderators" members on my board. With vB2.03 It's very simple.
Find in memberlist.php
if ($what=="datejoined") {
$orderby="joindate";
$direction="DESC";
}
Add the following below
if ($what=="banned") {
$condition="usergroupid=your_banned_usergroupid";
$orderby="lastpost";
$direction="DESC";
}
Change your_banned_usergroupid according with your data.
In my case your_banned_usergroupid=39
Then find in template "memberlist"
<td bgcolor="#DFDFDF"><smallfont><a href="memberlist.php?s=$session[sessionhash]&what=datejoined"><b>List by Date Joined</b></a></smallfont></td>
Add just right after
<td bgcolor="#DFDFDF"><smallfont><a href="memberlist.php?s=$session[sessionhash]&what=banned"><b>Banned</b></a></smallfont></td>
That' all folks!
It works here (http://www.2x2online.com/forum/memberlist.php?s=&what=banned)
P.S. Of course, you can use the same procedure to show any other of your usergroups in the memberlist.
Admin
09-05-2001, 04:23 PM
Good idea, good job! :)
GenSec
09-05-2001, 04:33 PM
Change in the same template "memberlist" in navbar
<normalfont><b><a href="index.php?s=$session[sessionhash]">$bbtitle</a> >
Members List</b></normalfont>
to:
<normalfont><b><a href="index.php?s=$session[sessionhash]">$bbtitle</a> >
Members List ($what)</b></normalfont>
and you will know what you see.
Originally posted by GenSec
Change your_banned_usergroupid according with your data.
In my case your_banned_usergroupid=39
i did all except this step cause i didn't understand what should i do ?!
anyway i tried to start the function and got this error msg :
Database error in vBulletin: Invalid SQL: SELECT COUNT(*) AS users
FROM user,userfield
WHERE usergroupid=your_banned_usergroupid AND
user.userid = userfield.userid
AND usergroupid NOT IN (1,3,4)
mysql error: Unknown column 'your_banned_usergroupid' in 'where clause'
mysql error number: 1054
Date: Tuesday 02nd of October 2001 01:50:40 AM
Script: memberlist.php?s=&what=banned
Referer:
help needed, any ideas ?
DarkReaper
10-02-2001, 12:14 AM
In the following line:
$condition="usergroupid=your_banned_usergroupid";
You myust change "your_banned_usergroupid" to the id of the usergroup you have named as "Banned Users" or whatever.
JJR512
10-02-2001, 05:11 AM
To find the usergroupid for your Banned by Moderators usergroup, go to your Admin CP, click the link to Modify under User Groups and Permissions, find the line in the list that says Banned by Moderators, and point to any of the links. In the status bar of your browser, at the end of the url it will say usergroup=xx, where xx is a number. This is the number you need to put inside the quotes for $condition=. In other words, if your Banned by Moderators usergroupid is 39, that line would be $condition="39".
GenSec
10-02-2001, 05:23 AM
Originally posted by Delu
i did all except this step cause i didn't understand what should i do ?!
help needed, any ideas ?
Go to your admin CP -> Users Groups and Permissons -> Modify
You will see the list of your usergroups. Take mouse on [edit] or [list all users] options and look at status bar of your browser. You will find the id's of your usergroups. Something like http://......edit&usergroupid=NN
Change the code to:
$condition="usergroupid=NN";
JJR512
10-02-2001, 05:25 AM
Are there maybe some additional instructions that you forgot to include in your post? Because this isn't working right for me. I have the number correct, I double and tripple checked. The problem is that when I click the Banned link, I get a list of all my members. All of them. I only have one banned member. But all my members are listed when I click Banned, only they are listed in a different order, but still, it's wrong.
JJR512
10-02-2001, 05:26 AM
GenSec, isn't your last post the same thing I posted 12 minutes earlier? :confused:
GenSec
10-02-2001, 06:01 AM
Originally posted by JJR512
GenSec, isn't your last post the same thing I posted 12 minutes earlier? :confused: Yes! It means that It took me more than 12 min. to type the reply :)
And about your problem. Nothing else need to do. Check your usergroupid's. In default 1,3,4 can't be used for banned and others
JJR512
10-02-2001, 06:12 AM
My usergroupid is 98. Unless I've gone blind...This says 98, right? http://216.118.105.52/forums/admin/user.php?s=&action=find&usergroupid=98
And this part from my memberlist.php is correct, right?
if ($what=="topposters") {
$orderby="posts";
$direction="DESC";
}
if ($what=="datejoined") {
$orderby="joindate";
$direction="DESC";
}
if ($what=="banned") {
$condition="98";
$orderby="lastpost";
$direction="DESC";
}
if ($orderby=="" or ($orderby!="username" and $orderby!="posts" and $orderby!="joindate" and $orderby!="lastpost")) {
$orderby="username";
}
And this bit in my memberlist template is correct, right?
<td bgcolor="{secondaltcolor}"><smallfont><a href="memberlist.php?s=$session[sessionhash]&what=datejoined"><b>List by Date Joined</b></a></smallfont></td>
<td bgcolor="{secondaltcolor}"><smallfont><a href="memberlist.php?s=$session[sessionhash]&what=banned"><b>Banned</b></a></smallfont></td>
What am I doing wrong?
Admin
10-02-2001, 06:16 AM
if ($what=="banned") {
$condition="usergroupid=98";
$orderby="lastpost";
$direction="DESC";
}
GenSec
10-02-2001, 06:19 AM
Originally posted by JJR512
$condition="98";
What am I doing wrong?
You should to write $condition="usergroupid=98";
That's all
JJR512
10-02-2001, 06:23 AM
OK, thanks! :)
Admin
10-02-2001, 06:27 AM
GenSec, isn't your last post the same thing I posted 3 minutes earlier? :D j/k ;)
Originally posted by GenSec
Go to your admin CP -> Users Groups and Permissons -> Modify
You will see the list of your usergroups. Take mouse on [edit] or [list all users] options and look at status bar of your browser. You will find the id's of your usergroups. Something like http://......edit&usergroupid=NN
Change the code to:
$condition="usergroupid=NN";
1. how can i know what is the number ??? NN=??????
2. how do i move user to this list ?
JJR512
10-02-2001, 06:46 AM
NN is a number that you will see at the very end of the hyperlink. You will see the hyperlink in your browser's status bar, as I explained in my own explanation in the message immediately preceding the one from which you just quoted.
If you do not have a status bar in your browser, see if there is one you can enable (in IE it may be turned off), or if you can't figure that out, then see if you can copy the link and paste it into the address bar or a text editor to see it. You can copy a link in IE, Internet Explorer, by pointing to it, right-click on it, and select Copy Shortcut.
10x 4 the help guys :)
all working :) :) :)
squawell
12-14-2001, 05:07 PM
this is i'm looking for
thankz~~
Kars10
07-23-2002, 12:26 PM
Great Hack!!
Thank you for sharing!! ;)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.