############################################### 
##   Hack Title:   Admin user info text.
##   Hack Version:   1.0.0
##   Author:      Antony Bailey 
##   Description:   Allows the admin to post info text on users, that only an admin can view. 
##   Compatibility:   2.0.4 
## 
##   Installation Level: Moderate
##   Installation Time: 10 minutes 
##   Files To Edit: 5 
##      admin_users.php
##      usercp_viewprofile.php
##      lang_main.php
##      user_edit_body.tpl
##      profile_view_body.tpl
## 
##   History: 
##      1.0.0:    Initial release.
## 
##   Author Notes: 
##      Only admins can see text, not even SuperMods/Junior admins or normal mods can view or post.
## 
##   Support:      http://www.phpbbhacks.com/forums 
##   Copyright:      2003 Admin user info text 1.0.0 - Antony Bailey 
## 
############################################### 
##   You downloaded this hack from phpBBHacks.com, the #1 source for phpBB related downloads. 
##   Please visit http://www.phpbbhacks.com/forums for support. 
############################################### 
## 
############################################### 
##   This hack is released under the GPL License. 
##   This hack can be freely used, but not distributed, without permission. 
##   Intellectual Property is retained by the hack author(s) listed above. 
############################################### 
#
#-----[ OPEN ]------------------------------------------
#

admin/admin_users.php

#
#-----[ FIND ]------------------------------------------
#
validate_optional_fields($icq, $aim, $msn, $yim, $website, $location, $occupation, $interests, $signature);


#
#-----[ IN-LINE FIND ]------------------------------------------
#
, $signature


#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, $infotext


#
#-----[ FIND ]------------------------------------------
#
$user_status = ( !empty($HTTP_POST_VARS['user_status']) ) ? intval( $HTTP_POST_VARS['user_status'] ) : 0;



#
#-----[ AFTER, ADD ]------------------------------------------
#
$infotext = ( !empty($HTTP_POST_VARS['infotext']) ) ? trim(strip_tags( $HTTP_POST_VARS['infotext'] ) ) : ''; 



#
#-----[ FIND ]------------------------------------------
#
$signature = stripslashes($signature);



#
#-----[ AFTER, ADD ]------------------------------------------
#
$infotext = stripslashes($infotext); 



#
#-----[ FIND ]------------------------------------------
#
SET " . $username_sql . $passwd_sql . "user_email = '" . str_replace("\'", "''", $email) . "', user_icq = '" . str_replace("\'", "''", $icq) . "', user_website = '" . str_replace("\'", "''", $website) . "', user_occ = '" . str_replace("\'", "''", $occupation



#
#-----[ IN-LINE FIND ]------------------------------------------
#
. $avatar_sql . "


#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, user_infotext = '" . str_replace("\'", "''", $infotext) . "'


#
#-----[ FIND ]------------------------------------------
#
$signature = stripslashes($signature);


#
#-----[ AFTER, ADD ]------------------------------------------
#
$infotext = stripslashes($infotext); 


#
#-----[ FIND ]------------------------------------------
#
$signature = $this_userdata['user_sig'];


#
#-----[ AFTER, ADD ]------------------------------------------
#
$infotext = $this_userdata['user_infotext']; 


#
#-----[ FIND ]------------------------------------------
#
$s_hidden_fields .= '<input type="hidden" name="signature" value="' . str_replace("\"", "&quot;", $signature) . '" />';


#
#-----[ AFTER, ADD ]------------------------------------------
#
$s_hidden_fields .= '<input type="hidden" name="infotext" value="' . str_replace("\"", "&quot;", $infotext) . '" />'; 



#
#-----[ FIND ]------------------------------------------
#
'ALLOW_AVATAR_NO' => (!$user_allowavatar) ? 'checked="checked"' : '',



#
#-----[ AFTER, ADD ]------------------------------------------
#
'INFOTEXT' => $infotext, 



#
#-----[ FIND ]------------------------------------------
#
'L_PROFILE_INFO_NOTICE' => $lang['Profile_info_warn'],



#
#-----[ AFTER, ADD ]------------------------------------------
#
'L_INFOTEXT' => $lang['infotext'], 



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


#
#-----[ FIND ]------------------------------------------
#
$search = '<a href="' . $temp_url . '">' . $lang['Search_user_posts'] . '</a>';


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

if($userdata['user_level'] == ADMIN) 
{ 
  $infotext = $profiledata['user_infotext']; 
} 
else 
{ 
  $infotext = ''; 
}



#
#-----[ FIND ]------------------------------------------
#
	'AVATAR_IMG' => $avatar_img,


#
#-----[ AFTER, ADD ]------------------------------------------
#
	'INFOTEXT' => ( $infotext ) ? $infotext : '&nbsp;', 


#
#-----[ FIND ]------------------------------------------
#
	'L_INTERESTS' => $lang['Interests'],


#
#-----[ AFTER, ADD ]------------------------------------------
#
	'L_INFOTEXT' => $lang['infotext'], 


#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_main.php


#
#-----[ FIND ]------------------------------------------
#

//
// That's all Folks!
// -------------------------------------------------


#
#-----[ BEFORE, ADD ]------------------------------------------
#
$lang['infotext'] = 'Private Staff Notes'; 


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

#
#-----[ FIND ]------------------------------------------
#
<tr>
	<td class="row1"><span class="gen">{L_SELECT_RANK}</span></td>
	<td class="row2"><select name="user_rank">{RANK_SELECT_BOX}</select></td>
</tr>

#
#-----[ AFTER, ADD ]------------------------------------------
#
<tr> 
	<td class="row1"><span class="gen">{L_INFOTEXT}: </span></td> 
	<td class="row2"><textarea name="infotext"style="width: 300px" rows="6" cols="30" class="post">{INFOTEXT}</textarea> 
</td> 
</tr>

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

#
#-----[ FIND ]------------------------------------------
#
<tr> 
	<td valign="top" align="right" nowrap="nowrap"><span class="gen">{L_INTERESTS}:</span></td>
	<td><b><span class="gen">{INTERESTS}</span></b></td>
</tr>

#
#-----[ AFTER, ADD ]------------------------------------------
#
<tr> 
	<td valign="top" align="right" nowrap="nowrap"><span class="gen">{L_INFOTEXT}:&nbsp;</span></td> 
	<td><b><span class="gen">{INFOTEXT}</span></b></td> 
</tr> 

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
#-----[ SQL ]------------------------------------------
#
ALTER TABLE phpbb_users ADD user_infotext text
#
# EoM