vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Mini Mods - Staff Titles And Background Avatars (https://vborg.vbsupport.ru/showthread.php?t=172599)

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">
                                        &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: 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 ;)

iyihost 03-10-2008 10:57 AM

good hack hasann thanks ;)

DJ_nus 03-10-2008 10:58 AM

thanks kanka very gut, downloaded :)

pipin 03-10-2008 10:59 AM

Very good idea. I will try it when i change to 3.7.

MuGiSouL 03-10-2008 11:03 AM

thanks man good

Hasann 03-10-2008 11:16 AM

thanks guys..
Please don't forgot to import product.xml file ;)

Feckie (Roger) 03-10-2008 12:13 PM

Hasann you are on a roll, keep it up..

lasto 03-10-2008 04:29 PM

this not work on 3.6.8 ?

Hasann 03-10-2008 04:35 PM

Quote:

Originally Posted by Feckie (Roger) (Post 1461441)
Hasann you are on a roll, keep it up..

thank you bro! my releases will continue
Quote:

Originally Posted by lasto (Post 1461602)
this not work on 3.6.8 ?

No, this will doesn't work with vB v3.6.8

justino 03-10-2008 10:39 PM

thanks Hasann.....

A legend even back in great ....

Congratulations for the excellent work has :)

Hasann 03-10-2008 10:45 PM

Quote:

Originally Posted by justino (Post 1461862)
thanks Hasann.....

A legend even back in great ....

Congratulations for the excellent work has :)

Thank you justino :D:up: Am I Legend Now :eek::D

shaynehammy 03-11-2008 12:55 AM

Anyway you can have the option to make the Staff title marquee?

Tolas 03-11-2008 12:56 AM

Nice!

This works the same with the New Post bits as well?

DarkSorrowz 03-11-2008 04:09 AM

Does anyone have some good backround pics? The one that he gave an as example is ok. But just not for me.. So if you have some can you post them? Please and thank you.

BuRaCh 03-11-2008 05:21 PM

wonderfull hack hasann
thanks friend;)

TomJames 03-11-2008 11:39 PM

Really like it, thanks!

Derekclarke 03-12-2008 07:07 PM

I have just installed.

Gone into my profile in Admin CP, and enabled the logo.

put the web url to the background logo in the box...

but it has not added the background logo?

any ideas?

Hasann 03-12-2008 07:30 PM

Quote:

Originally Posted by DarkSorrowz (Post 1462018)
Does anyone have some good backround pics? The one that he gave an as example is ok. But just not for me.. So if you have some can you post them? Please and thank you.

here are some staff avatar backgrounds I have made

http://www.gncforum.com/staffadmin.png

http://www.gncforum.com/staffsupporter.png

http://www.gncforum.com/staffdesigner.png

Quote:

Originally Posted by Tolas (Post 1461944)
Nice!

This works the same with the New Post bits as well?

yes it does work

Quote:

Originally Posted by Derekclarke (Post 1463227)
I have just installed.

Gone into my profile in Admin CP, and enabled the logo.

put the web url to the background logo in the box...

but it has not added the background logo?

any ideas?

what are you trying I don't understand you :confused:

Derekclarke 03-12-2008 08:32 PM

Quote:

Originally Posted by Hasann (Post 1463238)
what are you trying I don't understand you :confused:


I am trying to get the background image to appear.

This is my forum...
http://www.southwestscoobies.org.uk/...ad.php?t=10835

Username The M@trix

Staff Background Avatar URL
http://www.southwestscoobies.org.uk/images/staff.png

the background is not showing.

YdieresiS 03-13-2008 11:23 AM

I love this modification. And I love the style of the avatars. But can you make a staff background avatar for moderators, because I want to give them a background with moderator in it.

Or is it possible to post the sourcefile of these images? (eg PSD or EPS).

shaynehammy 03-13-2008 08:57 PM

Quote:

Originally Posted by shaynehammy (Post 1461943)
Anyway you can have the option to make the Staff title marquee?

Any answer to this?

YdieresiS 03-14-2008 08:54 AM

Just enter <MARQUEE> and </MARQUEE> in the Staff Title HTML Markup fields and it will be marquee. It's that easy.

Derekclarke 03-14-2008 09:01 PM

Just noticed.. the background is in Mini stats but not in the avatar that is shown in your posts

Hasann 03-14-2008 09:09 PM

Quote:

Originally Posted by Derekclarke (Post 1464864)
Just noticed.. the background is in Mini stats but not in the avatar that is shown in your posts

did you putting the code in postbit template? that doesn't work yet try the code put to the postbit_legacy template..

Derekclarke 03-16-2008 11:27 AM

Just checked and the Code is in the Postbit_legacy template.

I have just created a New Style sheet and integrated this hack only to it..

re-uploaded the product... and still it does not show in normal posts.

ShawneyJ 03-16-2008 11:57 AM

sweet :)

Derekclarke 03-16-2008 12:11 PM

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.

https://vborg.vbsupport.ru/

TasariMerkezi 03-17-2008 08:59 PM

thank you man

Derekclarke 03-24-2008 11:18 AM

Any Ideas?

YdieresiS 03-25-2008 08:58 AM

Quote:

Originally Posted by YdieresiS (Post 1463720)
I love this modification. And I love the style of the avatars. But can you make a staff background avatar for moderators, because I want to give them a background with moderator in it.

Or is it possible to post the sourcefile of these images? (eg PSD or EPS).

Have you looked at my question?

GWLiaR 03-27-2008 04:59 AM

thanks.but i use postbit

yoksito 03-30-2008 01:26 AM

Quote:

Originally Posted by Derekclarke (Post 1466079)
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.

http://www.southwestscoobies.org.uk/...-messed-up.jpg

I have the same problem, any solution?

CMGU 04-03-2008 03:51 AM

thank u for the hack

*installed

ssslippy 04-03-2008 04:17 AM

Is there anyway to make this on a per usergroup basis?

Forum Lover 04-11-2008 05:58 AM

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..

macc 04-15-2008 10:36 PM

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

optrex 04-24-2008 10:05 AM

I need this to work with postbit, not postbit_legacy please

under_takers 05-03-2008 05:33 PM

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

sundarmobiles 05-04-2008 06:47 AM

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.............................

xLYNZx 05-04-2008 09:31 AM

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


All times are GMT. The time now is 07:23 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01528 seconds
  • Memory Usage 1,849KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (8)bbcode_html_printable
  • (12)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete