##############################################################
## MOD Title:		Extend rank color
## MOD Author:		Gendo < gendo@denturax.com > (Matthieu V.) http://www.denturax.com
## MOD Author:		BigZ  < bigz@denturax.com > (Romain R.) http://www.denturax.com
## MOD Description:
##			This mod gives the possibility to add colour ranks into "Who is online" 
##			page and into "Who is online" part in bottom of the index. You can 
##			create colour ranks via the ACP. You can also put in colour your various 
##			groups of users (phpBB Usergroups) on the index and the sight of 
##			viewonline.
##
##			UPDATE FROM RC4 TO RC5.
##
##
## MOD Version:		1.4.0 RC5
## 
## Installation Level:	Easy
## Installation Time:	~5 Minutes
## Files To Edit: (3)
## 			includes/page_header.php
##			admin/admin_groups.php
##			admin/admin_users.php
##
## Included Files: (2)
## 			admin/admin_ranks_whosonline.php
## 			templates/subSilver/admin/whosonline_ranks_edit_body.tpl
## 			templates/subSilver/admin/whosonline_ranks_list_body.tpl
##			language/lang_french/lang_erc.php
## 			
############################################################## 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
##############################################################
#
#-----[ SQL ]------------------------------------------
# 
ALTER TABLE `phpbb_whosonline_ranks` ADD `whosonline_lang_key` SMALLINT( 1 ) UNSIGNED DEFAULT '0' NOT NULL ;

#
#-----[ COPY ]------------------------------------------------
#
copy root/language/lang_english/lang_erc.php to language/lang_english/lang_erc.php
copy root/admin/admin_ranks_whosonline.php to admin/admin_ranks_whosonline.php
copy root/templates/subSilver/admin/whosonline_ranks_edit_body.tpl to templates/subSilver/admin/whosonline_ranks_edit_body.tpl
copy root/templates/subSilver/admin/whosonline_ranks_list_body.tpl to templates/subSilver/admin/whosonline_ranks_list_body.tpl

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

# 
#-----[ FIND ]----- 
# 
	 $whosonline_color .= "[ <span style=\"color:". $rank_row['whosonline_rank_color'] ."\"><b>". $rank_row['whosonline_rank_name']. "</b></span> ]&nbsp;&nbsp;";

# 
#-----[ REPLACE WITH ]----- 
#
		if ($rank_row['whosonline_lang_key'] && isset($lang[ $rank_row['whosonline_rank_name'] ]))	
		$rank_name = $lang[ $rank_row['whosonline_rank_name'] ];
		else
		$rank_name = $rank_row['whosonline_rank_name'];

		$whosonline_color .= "[ <span style=\"color:". $rank_row['whosonline_rank_color'] ."\"><b>". $rank_name . "</b></span> ]&nbsp;&nbsp;";

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

#
#-----[ FIND ]------------------------------------------
#
require('./pagestart.' . $phpEx); 

#
#-----[ AFTER, ADD ]------------------------------------------
#
include($phpbb_root_path . 'language/lang_' . $userdata['user_lang'] .    '/lang_erc.' .    $phpEx);

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

#
#-----[ FIND ]------------------------------------------
#
require('./pagestart.' . $phpEx); 

#
#-----[ AFTER, ADD ]------------------------------------------
#
include($phpbb_root_path . 'language/lang_' . $userdata['user_lang'] .    '/lang_erc.' .    $phpEx);

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