################################################################################### 
## 
## Hack Title:    Custom User Rank 
## Hack Version:  2.0.7 (ex phpBB 2.0.4)
## Author:        Acid
## Support:	  http://www.phpbbhacks.com/forums/
##
## Description:   Update instructions (from version 2.0.6 to 2.0.7).
##
## File to edit:	1
##			includes/usercp_register.php
## 
################################################################################### 
## 
## Notes: 
## First always make a backup from the files that you're going to edit. 
## 
################################################################################### 
# 
#-----[ OPEN ]------------------------------------------ 
# includes/usercp_register.php 
# 
#-----[ FIND ]---------------------------------------------------
# 
if ($mode == 'register' && ($userdata['session_logged_in'] || $username == $userdata['username']))
{
	message_die(GENERAL_MESSAGE, $lang['Username_taken'], '', __LINE__, __FILE__);
}

# 
#-----[ BELOW, ADD ]---------------------------------------------------
# 
if ( $userdata['user_posts'] >= $board_config['allow_custom_rank'] && $userdata['session_logged_in'] && $mode != 'register' && $userdata['user_allow_rank'] == '1' )
{
        $allow_custom_rank = TRUE;
}


# 
#-----[ FIND (just a quote) ]---------------------------------------------------
# 
			$sql = "UPDATE " . USERS_TABLE . "

# 
#-----[ IN-LINE FIND ]---------------------------------------------------
# 
, user_custom_rank = '" . str_replace("\'", "''", $custom_rank) . "'

# 
#-----[ IN-LINE REPLACE ]---------------------------------------------------
# 
$user_title

# 
#-----[ FIND again (just a quote) ]---------------------------------------------------
# 
			$sql = "UPDATE " . USERS_TABLE . "

# 
#-----[ ABOVE, ADD ]---------------------------------------------------
# 
$user_title = ( $allow_custom_rank ) ? ', user_custom_rank = \''.str_replace("\'", "''", $custom_rank).'\'' : '';[/code]


# 
#-----[ FIND ]---------------------------------------------------
# 
	if ( $userdata['user_posts'] >= $board_config['allow_custom_rank'] && $userdata['session_logged_in'] && $mode != 'register' && $userdata['user_allow_rank'] == '1' )
	{
	        $template->assign_block_vars('custom_rank', array(

# 
#-----[ REPLACE WITH ]---------------------------------------------------
# 
	if ( $allow_custom_rank )
	{
	        $template->assign_block_vars('custom_rank', array(


################################################################################### 
################################################################################### 
################################################################################### 