Hasann |
03-09-2008 10:00 PM |
Staff Titles And Background Avatars
Personalised Staff Titles And Background Avatars (Per User Basis)
By HASANN Release Date: 10 March 2008
For distribution at vBulletin.org
WHAT DOES IT?
This will allow you to give your users (per user basis) a second title and background avatar only editable in the AdminCP > User Options
FEATURES
All features are per user basis- Enable Staff Title?: You can enable here users' staff title
- Staff Title: You can add here users' second staff title
- Staff Title HTML Markup: You can add here html markup html supported..
- Enable Staff Background Avatar: You can enable here users' background avatar
- Staff Background Avatar URL: You can add here for users' your own background avatar url
INSTALL INSTRUCTIONS
-> Import pruduct.xml file via Product Manager
-> Do Template Edits (4 edits)
(1. edit)
FIND IN (POSTBIT)_LEGACY TEMPLATE THIS CODE
HTML Code:
<if condition="$post['usertitle']"><div class="smallfont">$post[usertitle]</div></if>
AND ADD BELOW THIS CODE
HTML Code:
<if condition="$post['isstaffrank']">
<div class="smallfont">
<if condition="$post['staffrank_opentag']">$post[staffrank_opentag]</if>
<if condition="$post['staffrank']">$post[staffrank]</if>
<if condition="$post['staffrank_closetag']">$post[staffrank_closetag]</if>
</div>
</if>
(2. edit)
FIND IN (POSTBIT)_LEGACY TEMPLATE THIS CODE
HTML Code:
<if condition="$show['avatar']">
<div class="smallfont">
<br /><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a>
</div>
</if>
AND REPLACE WITH THIS CODE
HTML Code:
<if condition="$show['avatar']">
<!-- check for staff -->
<if condition="$post['isstaffbackavatar']">
<if condition="$post['staffbackavatar']">
<!-- I am staff so do this -->
<div class="smallfont"> <br />
<table cellpadding="4" cellspacing="0" border="0" width="175" height="70" align="center" background="$post[staffbackavatar]" nowrap="nowrap" no-repeat>
<tr>
<td width="48%"> </td>
<td><img src="$post[avatarurl]" height="60" width="60" align="center"></td>
</tr>
</table>
</div>
<else />
<!-- I am not staff so do this -->
<div class="smallfont">
<br /><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a>
</div>
</if>
<else />
<!-- I am not staff so do this -->
<div class="smallfont">
<br /><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a>
</div>
</if>
</if>
(3. edit)
FIND IN MEMBERINFO TEMPLATE THIS CODE
HTML Code:
<h1>$prepared[musername] $prepared[onlinestatus]</h1>
<if condition="$prepared['usertitle']">
<h2>$prepared[usertitle]</h2>
</if>
AND ADD BELOW THIS CODE
HTML Code:
<if condition="$userinfo['isstaffrank']">
<div class="smallfont">
<if condition="$userinfo['staffrank_opentag']">$userinfo[staffrank_opentag]</if><if condition="$userinfo['staffrank']">$userinfo[staffrank]</if>
<if condition="$userinfo['staffrank_closetag']">$userinfo[staffrank_closetag]</if>
</div>
</if>
(4. edit)
FIND IN memberinfo_block_ministats TEMPLATE THIS CODE
HTML Code:
<if condition="$prepared['avatarurl']">
<td><img src="$prepared[avatarurl]" alt="<phrase 1="$prepared[username]">$vbphrase[xs_avatar]</phrase>" $prepared[avatarsize] class="alt2" id="user_avatar" /></td>
</if>
AND REPLACE WITH THIS CODE
HTML Code:
<if condition="$prepared['avatarurl']">
<!-- check for staff -->
<if condition="$userinfo['staffbackavatar']">
<!-- I am staff so do this -->
<if condition="$userinfo['isstaffbackavatar']">
<tr valign="top">
<table cellpadding="4" cellspacing="0" border="0" width="175" height="70" align="center" background="$userinfo[staffbackavatar]" nowrap="nowrap" no-repeat>
<tr>
<td width="48%"> </td>
<td><img src="$userinfo[avatarurl]" height="60" width="60" align="center"></td>
</tr>
</table>
</tr>
<else />
<!-- I am not staff so do this -->
<td><img src="$prepared[avatarurl]" alt="<phrase 1="$prepared[username]">$vbphrase[xs_avatar]</phrase>" $prepared[avatarsize] class="alt2" id="user_avatar" /></td>
</if>
<else />
<!-- I am not staff so do this -->
<td><img src="$prepared[avatarurl]" alt="<phrase 1="$prepared[username]">$vbphrase[xs_avatar]</phrase>" $prepared[avatarsize] class="alt2" id="user_avatar" /></td>
</if>
</if>
If you need one staff background avatar: https://vborg.vbsupport.ru/
NOTE: Staff Background Avatars are automatically resized to 175x70 to fit the badge correctly, so nothing needs to be changed in the templates.
NOTE: Staff Avatars are automatically resized to 60x60 to fit the badge correctly, so nothing needs to be changed in the templates.
You are done, please click install if you use this.
Enjoy It ;)
|