Announcement

Collapse
No announcement yet.

Banners (aka Ribbons)

Collapse
X
Collapse
First Prev Next Last
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Banners (aka Ribbons)

    This is part CSS and part module hack. It produces the effect of the Ribbons mod in vB4x. I call them banners in 5x.

    Before Click image for larger version

Name:	Clipboard01.jpg
Views:	244
Size:	1.3 KB
ID:	1216 and After Click image for larger version

Name:	Clipboard02.jpg
Views:	177
Size:	2.5 KB
ID:	1217

    In css_additional.css

    Code:
    /* Start Banners */
    .banner-image{
        display: block;
        float:right;
        position:relative;
    [COLOR=#008000]    top:-20px;
        right: -25px;[/COLOR]
    [COLOR=#0000FF]    width: 64px;
        height: 64px;[/COLOR]
    }
    /* End Banners */
    Then edit templates, locate display_contenttype_threadview_header

    At around Line 131 look for {vb:set schemaAuthor.itemprop, name}
    Place the new code below after this line and before <!-- REPLY -->

    Code:
        <vb:if condition="$userInfo['usertitle'] == 'Administrator' ">
            <img class="banner-image" src="/images/banner-Administrator.gif" />
    <vb:else />
        <vb:if condition="$userInfo['usertitle'] == 'Super Moderator' ">
            <img class="banner-image" src="/images/banner-supermod.gif" />
    <vb:else />
        <vb:if condition="$userInfo['usertitle'] == 'Moderator' ">
            <img class="banner-image" src="/images/banner-moderator.gif" />
    <vb:else />
        <vb:if condition="$userInfo['usertitle'] == 'V.I.P.' ">
            <img class="banner-image" src="/images/banner-VIP.gif" />
    <vb:else />
        <vb:if condition="$userInfo['usertitle'] == 'Banned Users' ">
            <img class="banner-image" src="/images/banner-BannedUser.gif" />
    </vb:if>
    </vb:if>
    </vb:if>
    </vb:if>
    </vb:if>
    Save the images into the root/images folder (or change the code to the folder you prefer).

    Note: This code keys off the users profile TITLE. If you change the title, such as Administrator to GOD, then the banner code must be updated too.
    Note 2: Change the position values and size values to tweak the placement to fit your theme.

    #2
    I really like the idea of displaying staff banners for some of our mods and employees. I just can't get this to work in 5.2.5. The template mod for display_contenttype_threadview_header is located around line 59 for me so I pasted the code as directed, but the banner is not visible.

    Do the steps differ in 5.2.5?

    Comment

    Users Viewing This Page

    Collapse

    There is 1 user viewing this forum topic.

    • Guest Guest

    Latest Posts

    Collapse

    Working...
    X
    Searching...Please wait.
    An unexpected error was returned: 'Your submission could not be processed because you have logged in since the previous page was loaded.

    Please push the back button and reload the previous window.'
    An unexpected error was returned: 'Your submission could not be processed because the token has expired.

    Please push the back button and reload the previous window.'
    An internal error has occurred and the module cannot be displayed.
    There are no results that meet this criteria.
    Search Result for "|||"