vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=246)
-   -   New Posting Features - User Rank Banners using CSS (https://vborg.vbsupport.ru/showthread.php?t=314799)

tpearl5 10-08-2014 10:00 PM

User Rank Banners using CSS
 
1 Attachment(s)
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!

billstelling 12-09-2014 02:54 PM

Nice mod..

Phillip 12-09-2014 07:50 PM

Wondering if this could work for vB3 as well?

Black Snow 12-10-2014 08:41 AM

Quote:

Originally Posted by GhostX (Post 2526507)
Wondering if this could work for vB3 as well?

States in the original post:

Quote:

This will also work for 3.x versions.


All times are GMT. The time now is 08:59 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.00936 seconds
  • Memory Usage 1,725KB
  • 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
  • (2)bbcode_html_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete