############################################################## 
## MOD Title:          Admins/mods color management
## MOD Author:         -=ET=- < space_et@tiscali.fr > (n/a) http://www.golfexpert.net/phpbb
## MOD Description:    This MOD allows to customizing the color of admin's
##                     and mod's names displayed in the Who is Online
##                     list on the index page, and to apply this new colors
##                     to the other places where this names are displayed.
##                     You can apply these new colors to the...
##                     - Forums moderators on the index page
##                     - Last Post column on the index page
##                     - Forums moderators on the viewforum page
##                     - Users browsing this forum list on the viewforum page
##                     - Author & Last Post column on the viewforum page
##                     - Username column on the memberlist page
##                     - Username on the viewtopic page
##                     - Users who have visited this site today list
##                       of the Last visit >=1.2.5 MOD
##                     - Username column on the topic_view_users
##                       page of the Who viewed a topic >= 1.0.0 MOD 
##                     - Author & Last Post column on the search page
## MOD Version:        2.0.1
## Compatibility:      2.0.4->2.0.6 (2.0.0->2.0.3 not tested)
##
## Installation Level: Easy
## Installation Time:  5 to 15 minutes (1mn by EasyMOD of Nuttzy)
## Files To Edit:      7, plus 7 optionals
##      admin/admin_styles.php
##      includes/page_header.php
##      templates/subSilver/overall_header.tpl
##      templates/subSilver/simple_header.tpl
##      templates/subSilver/subSilver.css
##      templates/subSilver/admin/page_header.tpl
##      templates/subSilver/admin/styles_edit_body.tpl
##
##      index.php (optional)
##      memberlist.php (optional)
##      search.php (optional)
##      viewforum.php (optional)
##      viewonline.php (optional)
##      viewtopic.php (optional)
##      templates/subSilver/memberlist_body.tpl (optional)
##
## Included Files:     2
##      a-m_color_db_update.php
##      optional_features/last_visit.txt
##		  
############################################################## 
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the 
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code 
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered 
## in our MOD-Database, located at: http://www.phpbb.com/mods/ 
############################################################## 
## Author Notes: 
## 
## This MOD was created and first developed by Dr DLP
## < UKC@wanadoo.fr >. But since the 1.2.1 release, he decided
## to stop developing this MOD so with it's agreement I now
## continue his job and fully take charge of it.
##
## 1. EasyMOD
## -----------
## This MOD is compatible and can be installed by EasyMOD
## of Nuttzy (but is not officially EasyMOD Compliant)!
## http://area51.phpbb.com/phpBB22/viewforum.php?sid=&f=15
##
## However, on alpha releases of EM and meanwhile beta or 
## final release some actions are NOT performed.
## You'll have to do them manually!
##
## 1.1 SQL commands are not performed
## -----------
## This MOD need a database update.
## Then, in any case if you install this MOD manually or using
## an alpha release of EM, please copying the *_db_update.php
## in your phpBB root directory, execute it with your navigator,
## and then delete it from the phpBB root directory.
##
## Please, do it NOW! Before editing phpBB files by EM or manually!!!
## Otherwise, you may have an error message during your next
## connection.
##
## 1.2 No module choice possible
## -----------
## EM has no feature that can take charge of optional module
## and give admins the choice to instal them or not.
## So if you want to install only some modules but not all, install
## the MOD manually.
## If you have the Last visit MOD already installed, you must
## install manually its specific module at the end of the MOD.
## For the Who viewed a topic 1.0.0 MOD, you just need to have installed
## the "Username column on the memberlist page" module.
##
## 2 How to use the MOD
## -----------
## This MOD add 2 new font colors (#5 for admins & #6 for mods)
## for each style in Style>Management in the ACP.
## So install the MOD, and go edit each style to set your colors
## in Font color 5 & Font color 6.
##
## 3 Official last version link
## -----------
## Meanwhile the phpBB group validation and as the MOD is not yet
## in the phpBB MOD database, check this official link for updates...
## http://www.golfexpert.net/phpBB
##
############################################################## 
## MOD History: 
## 
##   2003-11-13 - Version 2.0.1
##      - Fix db update queries for the English language: addslashes()
##      - Fix color display on Mozilla/Netscape in css definitions
##
##   2003-11-07 - Version 2.0.0
##      - Instructions rewrite for a-m_color_db_update.php use
##      - DB update file now provide with English, French, German,
##        Italian and Spanish translations
##      - DB queries updated to add a default name for the new font colors
##      - New CSS style add to simple_header.tpl & admin/page_header.tpl
##
##   2003-09-28 - Version 2.0.0 Release Candidate 1
##      - MOD fully rewrite to use CSS style
##      - MOD now fully multilingual - no more translation needed
##      - Add Author & Last Post column on the search page module
##      - Fix an issue with Fading links MOD
##
##   2003-08-02 - Version 1.6.0
##      - Add Username on the viewtopic page module
##      - MOD rewrite to be more EM compatible
##
##   2003-07-22 - Version 1.5.0
##      - Add Who viewed a topic specific module
##
##   2003-07-21 - Version 1.4.2
##      - Fix: colors not displayed for announcements in viewforum
##
##   2003-07-14 - Version 1.4.1
##      - The MOD can now be installed by EasyMOD of Nuttzy
##        (but is not yet an officially EasyMOD Compliant MOD)!
##      - Add "add" or "replacement" delimiters in .tpl files:
##          <!-- Start add - Admins/mods color management MOD -->
##          <!-- End add - Admins/mods color management MOD -->
##      - Add MOD history
## 
##   2003-07-01 - Version 1.4.0
##      - Add Forums moderators on the index page module
##      - Add Forums moderators on the viewforum page module
##      - Add Username column on the memberlist page module
## 
##   2003-06-20 - Version 1.3.1
##      - Add the second MOD author name
##      - Add MOD compatibility
##      - Add "add" or "replacement" delimiters:
##          // Start add - Admins/mods color management MOD
##          // End add - Admins/mods color management MOD
## 
##   2003-06-20 - Version 1.3.0
##      - Re-writing of the MOD to become modular
##      - Add Last Post column on the index page module
##      - Add Author & Last Post column on the viewforum page module
##      - Add Last visit 1.2.5 specific module
##      - AM_colors_db_update.php update (support English & French)
## 
##   2003-06-19 - Version 1.2.2
##      - Little spelling corrections
##      - Minor messages updates
##      - End the adaptation of the MOD to the phpBB MOD tutorial
##      - Fix minor instructions errors
##      - Simplify some "Find/replace with"
##      - Add AM_colors_db_update.php file to facilitate db update
##      - Add French translation
## 
##   2003-06-18 - Version 1.2.1
##      - This release and all previous ones were developt
##        by Dr DLP < UKC@wanadoo.fr >
##        I have no details of this MOD history part.
##
############################################################## 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
############################################################## 
#
#-----[ COPY ]------------------------------------------------
#
copy a-m_color_db_update.php to a-m_color_db_update.php

#
# This MOD need a database update.
# Then, as you must have now copied the a-m_color_db_update.php file
# in your phpBB root directory, run it with your navigator...
# http://wwww.yourWebSite.xxx/phpbbRootDir/a-m_color_db_update.php
#
# ...and then delete it from the phpBB root directory!!!
#
# Please, do it NOW! Before editing phpBB files by EM or manually!!!
# Otherwise, you may have an error message during your next
# connection.
#

# 
#-----[ OPEN ]------------------------------------------------ 
#
admin/admin_styles.php

# 
#-----[ FIND ]------------------------------------------------ 
#
$updated_name['fontcolor3_name'] =

# 
#-----[ AFTER, ADD ]------------------------------------------ 
#

// Start add - Admins/mods color management MOD
$updated['fontcolor5'] = $HTTP_POST_VARS['fontcolor5'];
$updated_name['fontcolor5_name'] = $HTTP_POST_VARS['fontcolor5_name'];
$updated['fontcolor6'] = $HTTP_POST_VARS['fontcolor6'];
$updated_name['fontcolor6_name'] = $HTTP_POST_VARS['fontcolor6_name'];
// End add - Admins/mods color management MOD

# 
#-----[ FIND ]------------------------------------------------ 
#
"L_FONTCOLOR_3"

# 
#-----[ AFTER, ADD ]------------------------------------------ 
#

// Start add - Admins/mods color management MOD
"L_FONTCOLOR_5" => str_replace("3", "5", $lang['fontcolor3']),
"L_FONTCOLOR_6" => str_replace("3", "6", $lang['fontcolor3']),
// End add - Admins/mods color management MOD

# 
#-----[ FIND ]------------------------------------------------ 
#
"FONTCOLOR3"

# 
#-----[ AFTER, ADD ]------------------------------------------
#

// Start add - Admins/mods color management MOD
"FONTCOLOR5" => $selected['fontcolor5'],
"FONTCOLOR6" => $selected['fontcolor6'],
// End add - Admins/mods color management MOD

# 
#-----[ FIND ]------------------------------------------------ 
#
"FONTCOLOR3_NAME"

# 
#-----[ AFTER, ADD ]------------------------------------------ 
#

// Start add - Admins/mods color management MOD
"FONTCOLOR5_NAME" => $selected['fontcolor5_name'],
"FONTCOLOR6_NAME" => $selected['fontcolor6_name'],
// End add - Admins/mods color management MOD

# 
#-----[ OPEN ]------------------------------------------------ 
#
includes/page_header.php

# 
#-----[ FIND ]------------------------------------------------ 
#
$theme['fontcolor3'] .

#
#-----[ IN-LINE FIND ]----------------------------------------
#
'fontcolor3'

#
#-----[ IN-LINE REPLACE WITH ]--------------------------------
#
'fontcolor5'

# 
#-----[ FIND ]------------------------------------------------ 
#
$theme['fontcolor2'] .

#
#-----[ IN-LINE FIND ]----------------------------------------
#
'fontcolor2'

#
#-----[ IN-LINE REPLACE WITH ]--------------------------------
#
'fontcolor6'

# 
#-----[ FIND ]------------------------------------------------ 
#
$theme['fontcolor3'] .

#
#-----[ IN-LINE FIND ]----------------------------------------
#
'fontcolor3'

#
#-----[ IN-LINE REPLACE WITH ]--------------------------------
#
'fontcolor5'

# 
#-----[ FIND ]------------------------------------------------ 
#
$theme['fontcolor2'] .

#
#-----[ IN-LINE FIND ]----------------------------------------
#
'fontcolor2'

#
#-----[ IN-LINE REPLACE WITH ]--------------------------------
#
'fontcolor6'

# 
#-----[ FIND ]------------------------------------------------ 
#
'T_FONTCOLOR3'

# 
#-----[ AFTER, ADD ]------------------------------------------ 
#

// Start add - Admins/mods color management MOD
'T_FONTCOLOR5' => '#'.$theme['fontcolor5'],
'T_FONTCOLOR6' => '#'.$theme['fontcolor6'],
// End add - Admins/mods color management MOD

# 
#-----[ OPEN ]------------------------------------------------ 
#
templates/subSilver/overall_header.tpl

# 
#-----[ FIND ]------------------------------------------------ 
#
/* The register, login, search etc links at the top of the page */

# 
#-----[ BEFORE, ADD ]----------------------------------------- 
#

/* Start add - Admins/mods color management MOD */
.admincolor         { color: {T_FONTCOLOR5}; }
.admincolor:link    { color: {T_FONTCOLOR5}; }
.admincolor:active  { color: {T_FONTCOLOR5}; }
.admincolor:visited { color: {T_FONTCOLOR5}; }
.modcolor           { color: {T_FONTCOLOR6}; }
.modcolor:link      { color: {T_FONTCOLOR6}; }
.modcolor:active    { color: {T_FONTCOLOR6}; }
.modcolor:visited   { color: {T_FONTCOLOR6}; }
/* End add - Admins/mods color management MOD */

# 
#-----[ OPEN ]------------------------------------------------ 
#
templates/subSilver/simple_header.tpl

# 
#-----[ FIND ]------------------------------------------------ 
#
/* The register, login, search etc links at the top of the page */

# 
#-----[ BEFORE, ADD ]----------------------------------------- 
#

/* Start add - Admins/mods color management MOD */
.admincolor         { color: {T_FONTCOLOR5}; }
.admincolor:link    { color: {T_FONTCOLOR5}; }
.admincolor:active  { color: {T_FONTCOLOR5}; }
.admincolor:visited { color: {T_FONTCOLOR5}; }
.modcolor           { color: {T_FONTCOLOR6}; }
.modcolor:link      { color: {T_FONTCOLOR6}; }
.modcolor:active    { color: {T_FONTCOLOR6}; }
.modcolor:visited   { color: {T_FONTCOLOR6}; }
/* End add - Admins/mods color management MOD */

# 
#-----[ OPEN ]------------------------------------------------ 
#
templates/subSilver/subSilver.css

# 
#-----[ FIND ]------------------------------------------------ 
#
/* The register, login, search etc links at the top of the page */

# 
#-----[ BEFORE, ADD ]----------------------------------------- 
#

/* Start add - Admins/mods color management MOD */
.admincolor         { color: {T_FONTCOLOR5}; }
.admincolor:link    { color: {T_FONTCOLOR5}; }
.admincolor:active  { color: {T_FONTCOLOR5}; }
.admincolor:visited { color: {T_FONTCOLOR5}; }
.modcolor           { color: {T_FONTCOLOR6}; }
.modcolor:link      { color: {T_FONTCOLOR6}; }
.modcolor:active    { color: {T_FONTCOLOR6}; }
.modcolor:visited   { color: {T_FONTCOLOR6}; }
/* End add - Admins/mods color management MOD */

# 
#-----[ OPEN ]------------------------------------------------ 
#
templates/subSilver/admin/page_header.tpl

# 
#-----[ FIND ]------------------------------------------------ 
#
/* The register, login, search etc links at the top of the page */

# 
#-----[ BEFORE, ADD ]----------------------------------------- 
#

/* Start add - Admins/mods color management MOD */
.admincolor         { color: {T_FONTCOLOR5}; }
.admincolor:link    { color: {T_FONTCOLOR5}; }
.admincolor:active  { color: {T_FONTCOLOR5}; }
.admincolor:visited { color: {T_FONTCOLOR5}; }
.modcolor           { color: {T_FONTCOLOR6}; }
.modcolor:link      { color: {T_FONTCOLOR6}; }
.modcolor:active    { color: {T_FONTCOLOR6}; }
.modcolor:visited   { color: {T_FONTCOLOR6}; }
/* End add - Admins/mods color management MOD */

# 
#-----[ OPEN ]------------------------------------------------ 
#
templates/subSilver/admin/styles_edit_body.tpl

# 
#-----[ FIND ]------------------------------------------------ 
#
{FONTCOLOR3_NAME}
</tr>

# 
#-----[ AFTER, ADD ]------------------------------------------ 
#

<!-- Start add - Admins/mods color management MOD -->
<tr>
	<td class="row1">{L_FONTCOLOR_5}:</td>
	<td class="row2"><input class="post" type="text" size="6" maxlength="6" name="fontcolor5" value="{FONTCOLOR5}"></td>
	<td class="row2"><input class="post" type="text" size="25" maxlength="100" name="fontcolor5_name" value="{FONTCOLOR5_NAME}">
</tr>

<tr>
	<td class="row1">{L_FONTCOLOR_6}:</td>
	<td class="row2"><input class="post" type="text" size="6" maxlength="6" name="fontcolor6" value="{FONTCOLOR6}"></td>
	<td class="row2"><input class="post" type="text" size="25" maxlength="100" name="fontcolor6_name" value="{FONTCOLOR6_NAME}">
</tr>
<!-- End add - Admins/mods color management MOD -->

############################################################## 
# Start - Changes for the Last Post column on the index page
#============================================================= 
# 
#-----[ OPEN ]------------------------------------------------ 
#
index.php

#
#-----[ FIND ]------------------------------------------------
#
case 'postgresql':
$sql =

#
#-----[ IN-LINE FIND ]----------------------------------------
#
u.user_id

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

#
#-----[ FIND ]------------------------------------------------
#
case 'oracle':
$sql =

#
#-----[ IN-LINE FIND ]----------------------------------------
#
u.user_id

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

#
#-----[ FIND ]------------------------------------------------
#
default:
$sql =

#
#-----[ IN-LINE FIND ]----------------------------------------
#
u.user_id

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

############################################################## 
# Start - Changes for forums moderators on the index page
# Index.php must still be open. If not, open or re-open it.
#============================================================= 
#
#-----[ FIND ]------------------------------------------------
#
$sql = "SELECT aa.forum_id, u.user_id

#
#-----[ IN-LINE FIND ]----------------------------------------
#
u.user_id

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

#
#-----[ FIND ]------------------------------------------------
#
$forum_moderators[$row['forum_id']][] = '<a href="' . append_sid("profile

# 
#-----[ BEFORE, ADD ]----------------------------------------- 
#

// Start add - Admins/mods color management MOD
switch ( $row['user_level'] ) {
case ADMIN:
	$forum_mod_color = 'class="admincolor"';
	break;
case MOD:
	$forum_mod_color = 'class="modcolor"';
	break;
default:
	$forum_mod_color = '';
	break;
}
// End add - Admins/mods color management MOD

#
#-----[ IN-LINE FIND ]----------------------------------------
#
<a

#
#-----[ IN-LINE REPLACE WITH ]--------------------------------
#
<a ' . $forum_mod_color . '

#
#============================================================= 
# End - Changes for forums moderators on the index page
############################################################## 


############################################################## 
# Continuation - Changes for the Last Post column on the index page
# Index.php must still be open. If not, open or re-open it.
#============================================================= 
#
#-----[ FIND ]------------------------------------------------
#
$topics = $forum_data[$j]['forum_topics'];

# 
#-----[ AFTER, ADD ]------------------------------------------ 
#

// Start add - Admins/mods color management MOD
switch ( $forum_data[$j]['user_level'] ) {
case ADMIN:
	$last_post_color = 'class="admincolor"';
	break;
case MOD:
	$last_post_color = 'class="modcolor"';
	break;
default:
	$last_post_color = '';
	break;
}
// End add - Admins/mods color management MOD

#
#-----[ FIND ]------------------------------------------------
#
$last_post .= ( $forum_data[$j]

#
#-----[ IN-LINE FIND ]----------------------------------------
#
<a

#
#-----[ IN-LINE REPLACE WITH ]--------------------------------
#
<a ' . $last_post_color . '

#
#============================================================= 
# End - Changes for the Last Post column on the index page
############################################################## 


############################################################## 
# Start - Changes for forums moderators on the viewforum page
#============================================================= 
# 
#-----[ OPEN ]------------------------------------------------ 
#
viewforum.php

#
#-----[ FIND ]------------------------------------------------
#
$sql = "SELECT u.user_id

#
#-----[ IN-LINE FIND ]----------------------------------------
#
u.user_id

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

#
#-----[ FIND ]------------------------------------------------
#
$moderators[] = '<a href="' . append_sid("profile

#
#-----[ BEFORE, ADD ]-----------------------------------------
#

// Start add - Admins/mods color management MOD
switch ( $row['user_level'] ) {
case ADMIN:
	$mod_color = 'class="admincolor"';
	break;
case MOD:
	$mod_color = 'class="modcolor"';
	break;
default:
	$mod_color = '';
	break;
}
// End add - Admins/mods color management MOD

#
#-----[ IN-LINE FIND ]----------------------------------------
#
<a

#
#-----[ IN-LINE REPLACE WITH ]--------------------------------
#
<a ' . $mod_color . '

#
#============================================================= 
# End - Changes for forums moderators on the viewforum page
############################################################## 


############################################################## 
# Start - Changes for the Author & Last Post columns on the viewforum page
# Viewforum.php must still be open. If not, re-open it.
#============================================================= 
#
#-----[ FIND ]------------------------------------------------
#
$sql =
FROM
WHERE
AND
AND
AND
AND t.topic_type = " . POST_ANNOUNCE . "

#
#-----[ IN-LINE FIND ]----------------------------------------
#
u2.user_id as id2

#
#-----[ IN-LINE AFTER, ADD ]----------------------------------
#
, u.user_level AS author_level, u2.user_level AS LP_author_level

#
#-----[ FIND ]------------------------------------------------
#
$sql =
FROM
WHERE
AND
AND
AND
AND
AND t.topic_type <> " . POST_ANNOUNCE . "

#
#-----[ IN-LINE FIND ]----------------------------------------
#
u2.user_id as id2

#
#-----[ IN-LINE AFTER, ADD ]----------------------------------
#
, u.user_level AS author_level, u2.user_level AS LP_author_level

#
#-----[ FIND ]------------------------------------------------
#
$topic_author =
$topic_author .=

#
#-----[ BEFORE, ADD ]-----------------------------------------
#

// Start add - Admins/mods color management MOD
switch ( $topic_rowset[$i]['author_level'] ) {
	case ADMIN:
		$topic_author_color = 'class="admincolor"';
		break; 
	case MOD:
		$topic_author_color = 'class="modcolor"';
		break; 
	default:
		$topic_author_color = '';
		break; 
}
// End add - Admins/mods color management MOD

#
#-----[ IN-LINE FIND ]----------------------------------------
#
<a

#
#-----[ IN-LINE REPLACE WITH ]--------------------------------
#
<a ' . $topic_author_color . '

#
#-----[ FIND ]------------------------------------------------
#
$last_post_author =

#
#-----[ BEFORE, ADD ]-----------------------------------------
#

// Start add - Admins/mods color management MOD
switch ( $topic_rowset[$i]['LP_author_level'] ) {
	case ADMIN:
		$last_post_author_color = 'class="admincolor"';
		break; 
	case MOD:
		$last_post_author_color = 'class="modcolor"';
		break; 
	default:
		$last_post_author_color = '';
		break; 
}
// End add - Admins/mods color management MOD

#
#-----[ IN-LINE FIND ]----------------------------------------
#
<a

#
#-----[ IN-LINE REPLACE WITH ]--------------------------------
#
<a ' . $last_post_author_color . '

#
#============================================================= 
# End - Changes for the Author & Last Post columns on the viewforum page
############################################################## 


############################################################## 
# Start - Changes for the Users browsing this forum: list on the viewforum page
#============================================================= 
# 
#-----[ OPEN ]------------------------------------------------ 
#
viewonline.php

# 
#-----[ FIND ]------------------------------------------------ 
#
'fontcolor3'

# 
#-----[ IN-LINE FIND ]---------------------------------------- 
#
'fontcolor3'

# 
#-----[ IN-LINE REPLACE WITH ]-------------------------------- 
#
'fontcolor5'

# 
#-----[ FIND ]------------------------------------------------ 
#
'fontcolor2'

# 
#-----[ IN-LINE FIND ]---------------------------------------- 
#
'fontcolor2'

# 
#-----[ IN-LINE REPLACE WITH ]-------------------------------- 
#
'fontcolor6'

#
#============================================================= 
# Start - Changes for the Users browsing this forum: list on the viewforum page
############################################################## 


############################################################## 
# Start - Changes for the Username column on the memberlist page
#============================================================= 
# 
#-----[ OPEN ]------------------------------------------------ 
#
memberlist.php

#
#-----[ FIND ]------------------------------------------------
#
$sql = "SELECT username

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

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

#
#-----[ FIND ]------------------------------------------------
#
$template->assign_block_vars('memberrow'

#
#-----[ BEFORE, ADD ]-----------------------------------------
#

// Start add - Admins/mods color management MOD
switch ( $row['user_level'] ) {
	case ADMIN:
		$viewprofile_color = 'class="admincolor"';
		break; 
	case MOD:
		$viewprofile_color = 'class="modcolor"';
		break; 
	default:
		$viewprofile_color = '';
		break; 
}
// End add - Admins/mods color management MOD

#
#-----[ FIND ]------------------------------------------------
#
'U_VIEWPROFILE' =>

#
#-----[ BEFORE, ADD ]-----------------------------------------
#

// Start add - Admins/mods color management MOD
'U_VIEWPROFILE_COLOR' => $viewprofile_color,
// End add - Admins/mods color management MOD

# 
#-----[ OPEN ]------------------------------------------------ 
#
templates/subSilver/memberlist_body.tpl

#
#-----[ FIND ]------------------------------------------------
#
{memberrow.U_VIEWPROFILE}

#
#-----[ IN-LINE FIND ]----------------------------------------
#
"{memberrow.U_VIEWPROFILE}" class="gen"

#
#-----[ IN-LINE REPLACE WITH ]--------------------------------
#
"{memberrow.U_VIEWPROFILE}" {memberrow.U_VIEWPROFILE_COLOR}

#
#============================================================= 
# End - Changes for the Username column on the memberlist page
############################################################## 


############################################################## 
# Start - Changes for the the Author & Last Post columns on the search page
#============================================================= 
# 
#-----[ OPEN ]------------------------------------------------ 
#
search.php

#
#-----[ FIND ]------------------------------------------------
#
$sql = "SELECT pt.post_text

#
#-----[ IN-LINE FIND ]----------------------------------------
#
u.user_id

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

#
#-----[ FIND ]------------------------------------------------
#
$sql = "SELECT t.*

#
#-----[ IN-LINE FIND ]----------------------------------------
#
u.user_id

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

#
#-----[ IN-LINE FIND ]----------------------------------------
#
id2

#
#-----[ IN-LINE AFTER, ADD ]----------------------------------
#
, u2.user_level as level2

#
#-----[ FIND ]------------------------------------------------
#
$poster =

#
#-----[ BEFORE, ADD ]-----------------------------------------
#

// Start add - Admins/mods color management MOD
switch ( $searchset[$i]['user_level'] ) {
	case ADMIN:
		$poster_color = 'class="admincolor"';
		break; 
	case MOD:
		$poster_color = 'class="modcolor"';
		break; 
	default:
		$poster_color = '';
		break; 
}
// End add - Admins/mods color management MOD

#
#-----[ IN-LINE FIND ]----------------------------------------
#
<a

#
#-----[ IN-LINE REPLACE WITH ]--------------------------------
#
<a ' . $poster_color . '

#
#-----[ FIND ]------------------------------------------------
#
$topic_author =

#
#-----[ BEFORE, ADD ]-----------------------------------------
#

// Start add - Admins/mods color management MOD
switch ( $searchset[$i]['user_level'] ) {
	case ADMIN:
		$topic_author_color = 'class="admincolor"';
		break; 
	case MOD:
		$topic_author_color = 'class="modcolor"';
		break; 
	default:
		$topic_author_color = '';
		break; 
}
// End add - Admins/mods color management MOD

#
#-----[ IN-LINE FIND ]----------------------------------------
#
<a

#
#-----[ IN-LINE REPLACE WITH ]--------------------------------
#
<a ' . $topic_author_color . '

#
#-----[ FIND ]------------------------------------------------
#
$last_post_author =

#
#-----[ BEFORE, ADD ]-----------------------------------------
#

// Start add - Admins/mods color management MOD
switch ( $searchset[$i]['level2'] ) {
	case ADMIN:
		$last_post_author = 'class="admincolor"';
		break; 
	case MOD:
		$last_post_author = 'class="modcolor"';
		break; 
	default:
		$last_post_author = '';
		break; 
}
// End add - Admins/mods color management MOD

#
#-----[ IN-LINE FIND ]----------------------------------------
#
<a

#
#-----[ IN-LINE REPLACE WITH ]--------------------------------
#
<a ' . $last_post_author . '

#
#============================================================= 
# End - Changes for the the Author & Last Post columns on the search page
############################################################## 


############################################################## 
# Start - Changes for the Username on the viewtopic page
#============================================================= 
# 
#-----[ OPEN ]------------------------------------------------ 
#
viewtopic.php

#
#-----[ FIND ]------------------------------------------------
#
$sql = "SELECT u.username

#
#-----[ IN-LINE FIND ]----------------------------------------
#
u.user_id

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

#
#-----[ FIND ]------------------------------------------------
#
$l_edited_by = '';
}

#
#-----[ AFTER, ADD ]------------------------------------------
#

// Start add - Admins/mods color management MOD
switch ( $postrow[$i]['user_level'] ) {
	case ADMIN:
		$poster = '<span class="admincolor">' . $poster . '</span>';
		break; 
	case MOD:
		$poster = '<span class="modcolor">' . $poster . '</span>';
		break; 
	default:
		break; 
}
// End add - Admins/mods color management MOD

#
#============================================================= 
# End - Changes for the Username on the viewtopic page
############################################################## 

# 
#-----[ SAVE/CLOSE ALL FILES ]-------------------------------- 
# 
# EoM 