Go Back   vb.org Archive > vBulletin Modifications > Archive > Modification Graveyard
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Staff Titles And Background Avatars Details »»
Staff Titles And Background Avatars
Version: 1.00, by Hasann Hasann is offline
Developer Last Online: Jun 2021 Show Printable Version Email this Page

Category: Mini Mods - Version: 3.7.x Rating:
Released: 03-09-2008 Last Update: Never Installs: 49
DB Changes Uses Plugins Template Edits
 
No support by the author.

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">
					&nbsp;<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">&nbsp;<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%">&nbsp;</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">
&nbsp;<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">
&nbsp;<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%">&nbsp;</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:

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

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #32  
Old 03-27-2008, 04:59 AM
GWLiaR GWLiaR is offline
 
Join Date: Mar 2008
Location: Mersin/TR
Posts: 139
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks.but i use postbit
Reply With Quote
  #33  
Old 03-30-2008, 01:26 AM
yoksito yoksito is offline
 
Join Date: Nov 2006
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Derekclarke View Post
Just been playing, and if i edit the Postbit template, the text to replace is not the same, but if i replace the code for the avatar....

the image is displayed... but it messes everything up...

in the staff posts

check the report post buttons, and the post text box.

I have the same problem, any solution?
Reply With Quote
  #34  
Old 04-03-2008, 03:51 AM
CMGU CMGU is offline
 
Join Date: Mar 2007
Location: Central America
Posts: 213
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thank u for the hack

*installed
Reply With Quote
  #35  
Old 04-03-2008, 04:17 AM
ssslippy ssslippy is offline
 
Join Date: Jan 2006
Posts: 877
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there anyway to make this on a per usergroup basis?
Reply With Quote
  #36  
Old 04-11-2008, 05:58 AM
Forum Lover Forum Lover is offline
 
Join Date: Jun 2007
Location: Sydney
Posts: 503
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hasann,

as default, if u click on avatars it will direct u at their profile.. but here, its not. can u make it please?

Kick ass kinda hack, BTW, clicked Install. he..he..
Reply With Quote
  #37  
Old 04-15-2008, 10:36 PM
macc's Avatar
macc macc is offline
 
Join Date: Feb 2008
Posts: 647
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello!

have vbulletin 3.7 rc-3 and use default style ... could not get this hack at work!

no avatar picture come in postbit and style was destroyed - wide i mean ...

regards

macc
Reply With Quote
  #38  
Old 04-24-2008, 10:05 AM
optrex optrex is offline
 
Join Date: Sep 2005
Posts: 344
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I need this to work with postbit, not postbit_legacy please
Reply With Quote
  #39  
Old 05-03-2008, 05:33 PM
under_takers under_takers is offline
 
Join Date: May 2007
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Salaam Bro, Hasann..
I'm facing this problem with this mod on my site. am applynig that to main admin acount. means. ID No# 1 and seeing this problem.

Quote:
Database error in vBulletin 3.7.0:

Invalid SQL:
UPDATE vb_user SET
### Bitfield: vb_user.adminoptions ###
adminoptions = IF(adminoptions & 1, adminoptions - 1, adminoptions),
adminoptions = IF(adminoptions & 2, adminoptions - 2, adminoptions),
usertitle = 'Super Administrators',
customtitle = 1,
birthday_search = '1983-10-27',
birthday = '10-27-1983',
referrerid = 0,
isstaffrank = '1',
staffrank = 'Xtreme Load King',
staffrank_opentag = '<font color=\"red\">',
staffrank_closetag = '</font>',
joindate = 1179916020,
lastactivity = 1209839340,
lastpost = 1209737640,
membergroupids = ''
WHERE userid = 1;

MySQL Error : Unknown column 'isstaffrank' in 'field list'
Error Number : 1054
Reply With Quote
  #40  
Old 05-04-2008, 06:47 AM
sundarmobiles sundarmobiles is offline
 
Join Date: Oct 2007
Posts: 104
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

after install am not getting the user option in admin panel any one help me to solve this i installed the product xml file and also edit all tat 4 templates still am not getting.............................
Reply With Quote
  #41  
Old 05-04-2008, 09:31 AM
xLYNZx xLYNZx is offline
 
Join Date: Nov 2006
Posts: 56
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have installed this, however, it does not show in the posts, only profiles. I have edited the templates as per instructions.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:14 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05380 seconds
  • Memory Usage 2,333KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (8)bbcode_html
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete