Banned user\memberlist mod

This forum is now closed as part of retiring phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

This forum is now closed due to phpBB2.0 being retired.
Post Reply
spackidagoosh
Registered User
Posts: 26
Joined: Mon Sep 18, 2006 5:01 pm

Banned user\memberlist mod

Post by spackidagoosh »

Does anyone know of a mod that will allow a banned\deleted user account to be removed from the forum memberlist?

Thanks
User avatar
Emufarmers
Registered User
Posts: 811
Joined: Tue Jul 18, 2006 11:12 am
Contact:

Post by Emufarmers »

If you delete an account, it will not be displayed on the memberlist.

I don't recall anything that hides banned members, but maybe I (or someone else) will find something.
User avatar
danopia
Registered User
Posts: 436
Joined: Thu Aug 31, 2006 6:12 pm
Location: Landisville, NJ
Name: Daniel Lamando
Contact:

Post by danopia »

Basicly, all you have to do is restructure to SELECT query in memberlist.php.
You probebly just have to add a WHERE clause.

*looks at database structure*

OK, you have do do a LEFT JOIN(?) with the phpbb_banlist table somehow with the field ban_userid.
Offically out of my area of knowledge. :(
Hackers are not criminals. Hackers are the only people out there to keep crackers and virus coders on the run. Hackers are misconstrued by the media, but in reality, they do not cause damage or steal. Hackers tell system administrators of the faults of their software, and keep the Internet safe from those who don't.

phpBB3 MODs: Simple Topic Calendar
alexi02
Registered User
Posts: 271
Joined: Fri Mar 05, 2004 2:15 am
Location: Australia
Contact:

Post by alexi02 »

I didn't know anything about LEFT JOIN, but searched around and it wasn't too hard. Here is the my mod which removes banned users from the members list. If you have other mods installed on memberlist.php try using v1.0.1

Code: Select all

##############################################################
## MOD Title: Remove Banned Users From Memberlist
## MOD Author: alexi02 < N/A > (Alejandro Iannuzzi) http://www.uzzisoft.com
## MOD Description: Removes banned users from being displayed on the memberlist
## MOD Version: 1.0.0
##
## Installation Level: Easy
## Installation Time: 1 Minute
## Files To Edit: memberlist.php
## Included Files: N/A
##
## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2
##############################################################
## For security purposes, please check: http://www.phpbb.com/mods/
## for the latest version of this MOD. Although MODs are checked
## before being allowed in the MODs Database there is no guarantee
## that there are no security problems within the MOD. No support
## will be given for MODs not found within the MODs Database which
## can be found at http://www.phpbb.com/mods/
##############################################################
## Author Notes:
##
##      Can't get any simpler than this.
##
##############################################################
## MOD History:
##
##  2006-09-19 - Version 1.0.0
##      - Initial Release (for phpBB 2.0.21)
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################

# 
#-----[ OPEN ]------------------------------------------ 
# 

memberlist.php 

# 
#-----[ FIND ]------------------------------------------ 
# 

$sql = "SELECT username, user_id, user_viewemail, user_posts, user_regdate, user_from, user_website, user_email, user_icq, user_aim, user_yim, user_msnm, user_avatar, user_avatar_type, user_allowavatar 
        FROM " . USERS_TABLE . " 
        WHERE user_id <> " . ANONYMOUS . " 
        ORDER BY $order_by"; 

# 
#-----[ REPLACE WITH]------------------------------------------ 
# 

$sql = "SELECT u.username, u.user_id, u.user_viewemail, u.user_posts, u.user_regdate, u.user_from, u.user_website, u.user_email, u.user_icq, u.user_aim, u.user_yim, u.user_msnm, u.user_avatar, u.user_avatar_type, u.user_allowavatar, b.ban_userid 
        FROM " . USERS_TABLE . " u LEFT JOIN " . BANLIST_TABLE . " b ON u.user_id = b.ban_userid 
        WHERE u.user_id <> " . ANONYMOUS . " AND ISNULL( b.ban_userid ) 
        ORDER BY $order_by";

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
Last edited by alexi02 on Tue Sep 19, 2006 2:03 am, edited 2 times in total.
User avatar
danopia
Registered User
Posts: 436
Joined: Thu Aug 31, 2006 6:12 pm
Location: Landisville, NJ
Name: Daniel Lamando
Contact:

Post by danopia »

alexi02 wrote: I didn't know anything about LEFT JOIN, but searched around and it wasn't too hard. Here is the my mod which removes banned users from the members list.

Code: Select all

...

Yea, that should work. I should brush up on SQL. :wink:
Hackers are not criminals. Hackers are the only people out there to keep crackers and virus coders on the run. Hackers are misconstrued by the media, but in reality, they do not cause damage or steal. Hackers tell system administrators of the faults of their software, and keep the Internet safe from those who don't.

phpBB3 MODs: Simple Topic Calendar
User avatar
RMcGirr83
Former Team Member
Posts: 21966
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Post by RMcGirr83 »

Not only should it work...it does! ;)
Post Reply

Return to “[2.0.x] MOD Requests”