User Rank Styles in Memberlist

Mods that I have created will be here. Any and all support requests can be done within this forum.
Locked
DavidIQ
Site Admin
Posts: 619
Joined: Thu Sep 07, 2006 4:31 pm
Location: Earth
Contact:

User Rank Styles in Memberlist

Post by DavidIQ »

This version is slightly different from the one in the phpBB database in that you don't need to make any template edits. This would definitely benefit those that have multiple styles and don't want to go through the trouble of modifying the memberlist_body.tpl file for each template.

Code: Select all

############################################################## 
## MOD Title: Rank styles in memberlist 
## MOD Author: DavidIQ < david@davidiq.com > (David Colon) http://www.davidiq.com 
## MOD Description: This mod will display the color style for mods and admins in the memberlist. 
## MOD Version: 1.1.0 
## 
## Installation Level: Easy 
## Installation Time: 5 Minutes 
## File 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: If you don't want to have an extra row in your memberlist page 
## then this is the mod for you 
## 
############################################################## 
## MOD History: 
##
##   2005-11-02 - Version 1.0 
##      - Mod creation 
## 
##   2005-11-21 - Version 1.0.2 
##      - Final changes made for validation 
##
##   2006-10-27 - Version 1.1
##     - Integrated template edit into php file edit reducing edited files to 1
##
############################################################## 
## 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 

# 
#-----[ IN-LINE FIND ]------------------------------------------ 
# 
user_id, 

# 
#-----[ IN-LINE AFTER, ADD ]------------------------------------------ 
# 
 user_level, 

# 
#-----[ FIND ]------------------------------------------ 
# 
      $user_id = $row['user_id']; 

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 
      switch ($row['user_level']) 
      { 
         case ADMIN : 
            $username_text_decoration = '#' . $theme['fontcolor3']; 
            break; 
         case MOD : 
            $username_text_decoration = '#' . $theme['fontcolor2']; 
            break; 
         default : $username_text_decoration = ''; 
      } 

# 
#-----[ FIND ]------------------------------------------ 
# 
         'USERNAME' => $username, 
# 
#-----[ REPLACE WITH ]------------------------------------------ 
# 
                   'USERNAME' => '<font color="' . $username_text_decoration . '">' . $username . '</font>',

# 
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ 
# 
# EoM
Turbo!
Posts: 6
Joined: Wed Jan 10, 2007 8:14 pm

Post by Turbo! »

why do we need to edit the memberlist? i did the update but dont see much difrence
thecrewcorner.info <--help me with some custom templates :)
DavidIQ
Site Admin
Posts: 619
Joined: Thu Sep 07, 2006 4:31 pm
Location: Earth
Contact:

Post by DavidIQ »

See the memberlist for this forum.
Locked