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