Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
User Rank Banners using CSS Details »»
User Rank Banners using CSS
Version: 1.0, by tpearl5 tpearl5 is offline
Developer Last Online: Aug 2022 Show Printable Version Email this Page

Category: New Posting Features - Version: 4.x.x Rating:
Released: 10-08-2014 Last Update: Never Installs: 7
Template Edits
Re-useable Code  
No support by the author.

I use the user rank system on one of my sites to give users in one or more usergroups a little flare. I didn't want to use graphics, which would add to the number of images being loaded, so I used CSS.

Here's how to set it up.

Add something like the following to additional.css:
HTML Code:
.user_banner {
	font-size: 12px;
	font-weight: bold;
	padding: 1px 5px;
	border: 1px solid transparent;
	-webkit-box-shadow: 1px 1px 3px rgba(0,0,0, 0.25);
	box-shadow: 1px 1px 3px rgba(0,0,0,0.25);
	color: #ffffff;
	border-color: #000000;
	position: relative;
	-webkit-border-radius: 2px;
	border-radius: 2px;
	text-align: center;
	margin-top: 5px;
	margin-left: 18px;
	width: 130px;
}

.admin {
	background: rgb(172, 0, 0) url(/images/buttons/newbtn_middle.png) repeat-x;
}

.mod {
	background: #ffffff url(/images/buttons/newbtn_middle.png) repeat-x;
	color: #000000;
}

.supermod {
	background: #000000 url(/images/buttons/newbtn_middle.png) repeat-x;
	color: #ffffff;
	border-color: #ffffff;
}

.sr_member {
	background: #cccccc url(/images/buttons/newbtn_middle.png) repeat-x;
	color: #000000;
}
Naturally you can adjust the colors to match your site.

Go to User Ranks > Add New User Rank
  • Number of times to repeat rank: 1
  • Choose the usergroup - in this example the code is for the super mods
  • Minimum Posts: whatever you want, but mine is setup to depend on usergroup, which in some cases may be set based on user upgrades anyway
  • Stack Rank: No
  • Display Type: Always
  • User Rank File Path: clear this field
  • OR you may enter text: enter something like the following -
    HTML Code:
    <div class="user_banner supermod">Super Mod</div>
You will need to create a new user rank for each banner that you want to use. You would just need to change the second half of the div class to match the name of the group, for example the sr_members would get <div class="user_banner sr_member">Sr Member</div>

The banners will stack if the user is in more than one group that meets the requirements set in the User Rank. (see screen shot below)

This will also work for 3.x versions.

Enjoy!

Screenshots

File Type: png vbulletin_user_banners.PNG (11.8 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
3 благодарности(ей) от:
HenryRocket, iamme_meisi, puertoblack2003

Comments
  #2  
Old 12-09-2014, 02:54 PM
billstelling's Avatar
billstelling billstelling is offline
 
Join Date: Apr 2011
Posts: 246
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice mod..
Reply With Quote
  #3  
Old 12-09-2014, 07:50 PM
Phillip Phillip is offline
Senior Member
 
Join Date: Apr 2014
Posts: 358
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Wondering if this could work for vB3 as well?
Reply With Quote
  #4  
Old 12-10-2014, 08:41 AM
Black Snow Black Snow is offline
 
Join Date: Jul 2012
Location: Scotland
Posts: 471
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by GhostX View Post
Wondering if this could work for vB3 as well?
States in the original post:

Quote:
This will also work for 3.x versions.
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 07:53 PM.


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.04092 seconds
  • Memory Usage 2,260KB
  • Queries Executed 20 (?)
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
  • (2)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
  • (4)post_thanks_box
  • (3)post_thanks_box_bit
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (4)post_thanks_postbit_info
  • (3)postbit
  • (1)postbit_attachment
  • (4)postbit_onlinestatus
  • (4)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_postinfo_query
  • fetch_postinfo
  • 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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete