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)
-   -   Forum Home Enhancements - Usergroup Legend on Mouseover (https://vborg.vbsupport.ru/showthread.php?t=259854)

SuperTaz 03-12-2011 08:11 PM

This does not change the colors of your users. This only shows the colors that you want for each usergroup.

In order to change your usergroup colors, you have to do this:

Go to your Admincp > Click on Usergroups dropdown menu > Usergroup Manager > Click on "GO" next to the usergroup you want to change > Look for Username HTML Markup and add this:

For the first box add, you can change the color:
Code:

<span style="font-weight: bold; color: red;">
For the second box add:
Code:

</span>
Save.

Then, on my mod, you change the color to the one you chose for each usergroup as shown above.

commonwealth 03-12-2011 11:56 PM

oh perfect, thanks a ton for that!

Fire112 03-13-2011 09:06 PM

1 Attachment(s)
when convenient for me not someone has an idea?

SuperTaz 03-14-2011 12:31 AM

Quote:

Originally Posted by Fire112 (Post 2173011)
when convenient for me not someone has an idea?

What version of vBulletin are you using?

Fire112 03-14-2011 06:23 AM

I have 4.1.2

SuperTaz 03-15-2011 01:56 AM

Can you pm me the URL of your site so I can take a look at it? The only thing I can think of is that the style that you have it on is not a 4.1.2 style.

Fire112 03-15-2011 07:20 AM

here is my forumhome

PHP Code:

{vb:stylevar htmldoctype}
<
html xmlns="http://www.w3.org/1999/xhtml"<vb:if condition="$vboptions['enablefacebookconnect']"xmlns:fb="http://www.facebook.com/2008/fbml"</vb:if> dir="{vb:stylevar textdirection}" lang="{vb:stylevar languagecode}" id="vbulletin_html">
<
head>
    {
vb:raw headinclude}
    <
title>{vb:raw vboptions.bbtitle}</title>

    <
vb:if condition="$vboptions['storecssasfile']">
    {
vb:cssfile forumhome-rollup.css}
    <
vb:else />
    {
vb:cssfile forumbits.css,forumhome.css,widgets.css,sidebar.css,options.css,tagcloud.css}
    </
vb:if>

    <!--[if 
lt IE 8]>{vb:cssfile forumbits-ie.css,sidebar-ie.css,options-ie.css}<![endif]-->
    <
vb:if condition="$show['sidebar']">
    <
script type="text/javascript" src="{vb:stylevar yuipath}/animation/animation-min.js?v={vb:raw vboptions.simpleversion}"></script>
    <
script type="text/javascript">
        var 
sidebar_align '{vb:raw show.sidebarposition}';
        var 
content_container_margin parseInt('{vb:math {vb:stylevar forum_sidebar_width}+{vb:math {vb:stylevar padding}*2}}');
        var 
sidebar_width parseInt('{vb:stylevar forum_sidebar_width}');
    </
script>
    <
script type="text/javascript" src="{vb:raw vboptions.bburl}/clientscript/vbulletin-sidebar.js?v={vb:raw vboptions.simpleversion}"></script>
    </
vb:if>
    {
vb:raw headinclude_bottom}
</
head>
    <
body>

    {
vb:raw header}

    {
vb:raw navbar}

    <
div id="pagetitle">
        <
h1>{vb:raw vboptions.bbtitle}</h1>
        <
p id="welcomemessage" class="description">{vb:rawphrase welcome_to_the_x, {vb:raw vboptions.bbtitle}}</p>
    </
div>

    <
vb:if condition="$show['sidebar']">
    <
div id="content_container"<vb:if condition="$show['sidebarposition'] == 'left'"> class="contentright"</vb:if>>
        <
div id="content">
    </
vb:if>
    <!-- 
main -->
        {
vb:raw template_hook.forumhome_above_forums}
    <
ol id="forums" class="floatcontainer">
        {
vb:raw forumbits}
    </
ol>
        {
vb:raw template_hook.forumhome_below_forums}
    <!-- /
main -->

    {
vb:raw forumhome_markread_script}

    {
vb:raw ad_location.board_after_forums}

    <!-- 
what's going on box -->
<script type="text/javascript">
<!--

setup_memberlegend = function(tobj)
{
    prefix = ''
    suffix = ''

    if (tobj.getAttribute('
ital'))
    {
        prefix += '
<em>'
        suffix += '
</em>'
    }

    if (tobj.getAttribute('
undr'))
    {
        prefix += '
<u>'
        suffix += '
</u>'
    }

    if (tobj.getAttribute('
bold'))
    {
        prefix += '
<b>'
        suffix += '
</b>'
    }

    if (tobj.getAttribute('
line'))
    {
        prefix += '
<s>'
        suffix += '
</s>'
    }

    if (tobj.getAttribute('
clr'))
    {
        prefix += '
<span style="color:' + tobj.getAttribute('clr') + ';">'
        suffix += '
</span>'
    }



    fetch_object('
memberlegend').innerHTML = prefix + tobj.getAttribute('group') + suffix
}

-->
</script>
    <div id="wgo" class="collapse wgo_block block">
        <h2 class="blockhead">{vb:rawphrase whats_going_on}</h2>
        <div class="blockbody formcontrols floatcontainer">
            {vb:raw template_hook.forumhome_wgo_pos1}
            <vb:if condition="$show['
loggedinusers']">
            <!-- logged-in users -->
            <div id="wgo_onlineusers" class="wgo_subblock section">
                <h3 class="blocksubhead"><img src="{vb:stylevar imgdir_misc}/users_online.png" alt="{vb:rawphrase currently_active_users}" /></h3>
                <div class="wgo_new_blk1">
                                     <div class="wgo_infolist_blk">
                    <p>{vb:rawphrase there_are_x_y_online_link, {vb:raw totalonline}, {vb:raw session.sessionurl}} <span class="shade">{vb:rawphrase x_members_and_y_guests, {vb:raw numberregistered}, {vb:raw numberguest}}</span></p>
                    <p>{vb:rawphrase most_users_ever_online_was_x_y_at_z, {vb:raw recordusers}, {vb:raw recorddate}, {vb:raw recordtime}}</p>
                                     </div>
                                     <div class="wgo_userlist_blk">
                    <vb:if condition="$activeusers">
                    <ol class="commalist" id="wgo_onlineusers_list">
                        <vb:each from="activeusers" value="loggedin">
                            <li> {vb:stylevar dirmark}<a class="username" href="{vb:link member, {vb:raw loggedin}}">{vb:raw loggedin.musername}</a>{vb:raw loggedin.invisiblemark}{vb:raw loggedin.buddymark}</li>
                        </vb:each>
                    </ol>
                    </vb:if>
                                     </div>
                </div>
            </div>
            <!-- end logged-in users -->
<!-- Usergroup Legend --> 
<div id="wgo_legend" class="wgo_subblock section">
<h3 class="blocksubhead"><img src="{vb:stylevar imgdir_misc}/forum_stats.png" alt="{vb:rawphrase usergroup_legend, 

{vb:raw vboptions.bbtitle}}" />{vb:rawphrase usergroup_legend, {vb:raw vboptions.bbtitle}}</h3>
</div>
            <div>
               <div style="float:left; width:18px; height:2px"></div>
                <div style="float:left;">&nbsp;</div>
        <div class="alt2" style="float:left;height:12px;width:12px;padding:0px;" group="T&T Admin" 

clr="#ff0000" bold="y" onmouseover="setup_memberlegend(this)" onmouseout="fetch_object('
memberlegend').innerHTML = 

''">
            <div style="height:12px;width:12px;background:#ff0000;"></div>
        </div>
                <div style="float:left;">&nbsp;</div>
        <div class="alt2" style="float:left;height:12px;width:12px;padding:0px;" group="T&T Mod" 

bold="y" clr="#008000" onmouseover="setup_memberlegend(this)" onmouseout="fetch_object('
memberlegend').innerHTML = 

''">
            <div style="height:12px;width:12px;background:#008000;"></div>
        </div>
                <div style="float:left;">&nbsp;</div>
        <div class="alt2" style="float:left;height:12px;width:12px;padding:0px;" group="T&T Support" 

bold="y" clr="#0000ff" onmouseover="setup_memberlegend(this)" onmouseout="fetch_object('
memberlegend').innerHTML = 

''">
            <div style="height:12px;width:12px;background:#0000ff;"></div>
        </div>
                <div style="float:left;">&nbsp;</div>
        <div class="alt2" style="float:left;height:12px;width:12px;padding:0px;" group="T&T Kunden" bold="y" 

clr="#ffff00" onmouseover="setup_memberlegend(this)" onmouseout="fetch_object('
memberlegend').innerHTML = ''">
            <div style="height:12px;width:12px;background:#ffff00;"></div>
        </div>
                <div style="float:left">&nbsp;</div>
                    <div class="alt2" style="float:left;height:12px;width:12px;padding:0px;" group="Banned Member" 

ital="y" line="y" clr="#8b008b" onmouseover="setup_memberlegend(this)" onmouseout="fetch_object

('
memberlegend').innerHTML = ''">
            <div style="height:12px;width:12px;background:#8b008b;"></div>
        </div>
        <div style="float:left;width:10px;height:1px;">&nbsp;</div>
        <div style="float:left;" id="memberlegend"></div>
         </div>
<br><br>
<!-- End Usergroup Legend -->
            </vb:if>
            {vb:raw template_hook.forumhome_wgo_pos2}
            <vb:if condition="$show['
upcomingevents']">
            <div id="wgo_events" class="wgo_subblock section">
                <h3 class="blocksubhead"><img src="{vb:stylevar imgdir_misc}/event.png" alt="{vb:rawphrase todays_events}" /></h3>
                           <div class="wgo_new_blk1">
                <ol>
                    {vb:raw upcomingevents}
                </ol>
                           </div>
            </div>
            </vb:if>
            {vb:raw template_hook.forumhome_wgo_pos3}
            <vb:if condition="$show['
birthdays']">
            <!-- today'
s birthdays -->
            <
div id="wgo_birthdays" class="wgo_subblock section">
                <
h3 class="blocksubhead"><img src="{vb:stylevar imgdir_misc}/birthday.png" alt="{vb:rawphrase todays_birthdays}" /></h3>
                            <
div class="wgo_new_blk1">
                <
ol class="commalist">
                    {
vb:raw birthdays}
                </
ol>
                            </
div>
            </
div>
            <!-- 
end today's birthdays -->
            </vb:if>
            {vb:raw template_hook.forumhome_wgo_pos4}
            <div id="wgo_stats" class="wgo_subblock section">
                <h3 class="blocksubhead"><img src="{vb:stylevar imgdir_misc}/forum_stats.png" alt="{vb:rawphrase x_statistics, {vb:raw vboptions.bbtitle}}" /></h3>
                <div class="wgo_new_blk1">
                    <dl>
                        <dt>{vb:rawphrase threads}</dt>
                            <dd>{vb:raw totalthreads}</dd>
                        <dt>{vb:rawphrase posts}</dt>
                            <dd>{vb:raw totalposts}</dd>
                        <dt>{vb:rawphrase members}</dt>
                            <dd>{vb:raw numbermembers}</dd>
                        <vb:if condition="$show['
activemembers']">
                                                <dt>{vb:rawphrase active_members}</dt>
                                                         <dd>{vb:raw activemembers}</dd>
                                                </vb:if>
                    </dl>
                    <p>{vb:rawphrase welcome_to_our_newest_member_x, {vb:link member, {vb:raw newuserinfo}}, {vb:raw newuserinfo.username}}</p>
                    {vb:raw template_hook.forumhome_wgo_stats}
                </div>
            </div>
            <div id="wgo_legend" class="wgo_subblock section">
                <h3 class="blocksubhead"><img src="{vb:stylevar imgdir_misc}/legend.png" alt="{vb:rawphrase icon_legend}" /></h3>
                <div class="wgo_new_blk1">
                    <dl id="icon_legends" class="icon_legends">
                        <dt><img src="{vb:stylevar imgdir_statusicon}/forum_new-16.png" alt="{vb:rawphrase new_posts_forum}" /></dt><dt>{vb:rawphrase new_posts_forum}</dt>
                        <dt><img src="{vb:stylevar imgdir_statusicon}/forum_old-16.png" alt="{vb:rawphrase no_new_posts_forum}" /></dt><dt>{vb:rawphrase no_new_posts_forum}</dt>
                        <dt><img src="{vb:stylevar imgdir_statusicon}/category-16.png" alt="{vb:rawphrase category_forum}" /></dt><dt>{vb:rawphrase category_forum}</dt>
                        <dt><img src="{vb:stylevar imgdir_statusicon}/forum_link-16.png" alt="{vb:rawphrase link_forum}" /></dt><dt>{vb:rawphrase link_forum}</dt>
                    <vb:if condition="$vboptions['
pt_hasprojectforums']">
                        <dt><img src="{vb:stylevar imgdir_statusicon}/project_new-16.png" alt="{vb:rawphrase project_forum}" /></dt><dt>{vb:rawphrase project_forum}</dt>
                    </vb:if>
                    </dl>
                </div>
            </div>
            {vb:raw template_hook.forumhome_wgo_pos5}
        </div>
    </div>
    <!-- end what'
s going on box -->

    {
vb:raw ad_location.board_below_whats_going_on}
    <
vb:if condition="$show['sidebar']">
        </
div>
    </
div>

    <
div id="sidebar_container"<vb:if condition="$show['sidebarposition'] == 'left'"> class="sidebarleft"</vb:if>>
        <
a id="sidebar_button_link" href="#">
            <
vb:if condition="$show['sidebarposition'] == 'left'">
            <
img id="sidebar_button" src="{vb:stylevar imgdir_misc}/tab-collapsed-left.png" alt="" />
            <
vb:else />
            <
img id="sidebar_button" src="{vb:stylevar imgdir_misc}/tab-collapsed.png" alt="" />
            </
vb:if>
        </
a>
        <
ul id="sidebar">
            {
vb:raw sidebar}
        </
ul>
    </
div>
    </
vb:if>

    {
vb:raw footer}
</
body>
</
html


SuperTaz 03-16-2011 03:45 AM

If you can, check to see if this mod works on the default vB template for me. I have checked my styles and it works on all of them. All of my styles are all updated to 4.1.2 though.

If it works on the default template, but not on the style you showed above, then it is a style issue. Make sure they are all 4.1.2 compatible styles.

SuperTaz 05-29-2011 02:59 AM

Confirmed that this mod still works on 4.1.3 and 4.1.4 Beta 1. If anyone is having any issues, try on a test site with no mods installed using the default style.

I have taken this mod off beta stage for now. If any issues arise, let me know and I will see what I can do.

mitch84 05-29-2011 05:22 AM

very nice, thank you


All times are GMT. The time now is 07:52 AM.

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.01687 seconds
  • Memory Usage 1,870KB
  • 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_code_printable
  • (1)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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