Back to vBulletin 4.x Template Modifications

Toplinks Beside Search Bar 0.1
Mod Version: 1.00, by ArtAttack

vB Version: 4.0.0 Rating: (0 vote - 0 average) Installs: 10
Released: 09 Jan 2010 Last Update: Never Downloads: 0
Not Supported Template Edits Re-usable Code  

This modification moves the toplinks to the left of the search bar



In the header template, find and delete:
PHP Code:
<div id="toplinks" class="toplinks">
        <
vb:if condition="$show['member']">
            <
ul class="isuser">
                <
li>{vb:rawphrase welcome_x_link_y, {vb:raw bbuserinfo.username}, {vb:link member, {vb:raw bbuserinfo}}}</li>
                <
vb:if condition="$notifications_total">
                <
li class="popupmenu notifications" id="notifications">
                    <
class="popupctrl" href="usercp.php{vb:raw session.sessionurl_q}">{vb:rawphrase your_notifications}: <span class="notifications-number"><strong>{vb:raw notifications_total}</strong></span></a>
                    <
ul class="popupbody popuphover">
                        {
vb:raw notifications_menubits}
                    </
ul>
                </
li>
                <
vb:else />
                <
li class="popupmenu nonotifications" id="nonotifications">
                    <
class="popupctrl" href="usercp.php{vb:raw session.sessionurl_q}">{vb:rawphrase your_notifications}</a>
                    <
div class="popupbody popuphover">
                        <
p>{vb:rawphrase no_new_messages}</p>
                        <
p><a href="private.php{vb:raw session.sessionurl_q}">{vb:rawphrase inbox}</a></p>
                    </
div>
                </
li>
                </
vb:if>
                <
li><a href="{vb:link member, {vb:raw bbuserinfo}}">{vb:rawphrase your_profile}</a></li>
                <
li><a href="usercp.php{vb:raw session.sessionurl_q}">{vb:rawphrase control_panel}</a></li>
                <
vb:if condition="$show['registerbutton']">
                <
li><a href="register.php{vb:raw session.sessionurl_q}" rel="nofollow">{vb:rawphrase register}</a></li>
                </
vb:if>                
                <
li><a href="login.php?{vb:raw session.sessionurl}do=logout&amp;logouthash={vb:raw bbuserinfo.logouthash}" onclick="return log_out('{vb:rawphrase sure_you_want_to_log_out}')">{vb:rawphrase log_out}</a></li>
            </
ul>
            <
vb:comment><p>{vb:rawphrase last_visited_x_at_y, {vb:raw pmbox.lastvisitdate}, {vb:raw pmbox.lastvisittime}}</p></vb:comment>
        <
vb:else />
            <
ul class="nouser">
            <
vb:if condition="$show['registerbutton']">
                <
li><a href="register.php{vb:raw session.sessionurl_q}" rel="nofollow">{vb:rawphrase register}</a></li>
            </
vb:if>            
                <
li><a rel="help" href="faq.php{vb:raw session.sessionurl_q}">{vb:rawphrase help}</a></li>
            </
ul>
            <
script type="text/javascript" src="clientscript/vbulletin_md5.js?v={vb:raw vboptions.simpleversion}"></script>
            <
form action="login.php?{vb:raw session.sessionurl}do=login" method="post" onsubmit="md5hash(vb_login_password, vb_login_md5password, vb_login_md5password_utf, {vb:raw show.nopasswordempty})">
                <
fieldset id="logindetails" class="logindetails">
                    <
div>
                        <
div>
                    <
input type="text" class="textbox default-value" name="vb_login_username" id="navbar_username" size="10" accesskey="u" tabindex="101" value="<vb:if condition="$username">{vb:raw username}<vb:else />{vb:rawphrase username}</vb:if>" onfocus="if (this.value == '<vb:if condition="$username">{vb:raw username}<vb:else />{vb:rawphrase username}</vb:if>'){this.value=''; this.style.color='black';}" onblur="if (this.value == '') {this.value='<vb:if condition="$username">{vb:raw username}<vb:else />{vb:rawphrase username}</vb:if>'; this.style.color='#828282';}"/>
                    <
input type="password" class="textbox default-value" name="vb_login_password" id="navbar_password" size="10" tabindex="102" onfocus="this.style.color='black';" />
                    <
input type="submit" class="loginbutton" value="{vb:rawphrase log_in}" tabindex="104" title="{vb:rawphrase enter_username_to_login_or_register}" accesskey="s" />
                        </
div>
                    </
div>
                </
fieldset>
                <
div id="remember" class="remember">
                    <
label for="cb_cookieuser_navbar"><input type="checkbox" name="cookieuser" value="1" tabindex="103" id="cb_cookieuser_navbar" class="cb_cookieuser_navbar" accesskey="c" /> {vb:rawphrase remember_me}</label>
                </
div>
            
                <
input type="hidden" name="s" value="{vb:raw session.sessionhash}" />
                <
input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />
                <
input type="hidden" name="do" value="login" />
                <
input type="hidden" name="vb_login_md5password" />
                <
input type="hidden" name="vb_login_md5password_utf" />
            </
form>    
        </
vb:if>
    </
div

In the navbar template, find
PHP Code:
<div id="navbar" class="navbar"

and add below it:
PHP Code:
<div id="toplinks" class="toplinks">
        <
vb:if condition="$show['member']">
            <
ul class="isuser">
                <
li>{vb:rawphrase welcome_x_link_y, {vb:raw bbuserinfo.username}, {vb:link member, {vb:raw bbuserinfo}}}</li>
                <
vb:if condition="$notifications_total">
                <
li class="popupmenu notifications" id="notifications">
                    <
class="popupctrl" href="usercp.php{vb:raw session.sessionurl_q}">{vb:rawphrase your_notifications}: <span class="notifications-number"><strong>{vb:raw notifications_total}</strong></span></a>
                    <
ul class="popupbody popuphover">
                        {
vb:raw notifications_menubits}
                    </
ul>
                </
li>
                <
vb:else />
                <
li class="popupmenu nonotifications" id="nonotifications">
                    <
class="popupctrl" href="usercp.php{vb:raw session.sessionurl_q}">{vb:rawphrase your_notifications}</a>
                    <
div class="popupbody popuphover">
                        <
p>{vb:rawphrase no_new_messages}</p>
                        <
p><a href="private.php{vb:raw session.sessionurl_q}">{vb:rawphrase inbox}</a></p>
                    </
div>
                </
li>
                </
vb:if>
                <
li><a href="{vb:link member, {vb:raw bbuserinfo}}">{vb:rawphrase your_profile}</a></li>
                <
li><a href="usercp.php{vb:raw session.sessionurl_q}">{vb:rawphrase control_panel}</a></li>
                <
vb:if condition="$show['registerbutton']">
                <
li><a href="register.php{vb:raw session.sessionurl_q}" rel="nofollow">{vb:rawphrase register}</a></li>
                </
vb:if>                
                <
li><a href="login.php?{vb:raw session.sessionurl}do=logout&amp;logouthash={vb:raw bbuserinfo.logouthash}" onclick="return log_out('{vb:rawphrase sure_you_want_to_log_out}')">{vb:rawphrase log_out}</a></li>
            </
ul>
            <
vb:comment><p>{vb:rawphrase last_visited_x_at_y, {vb:raw pmbox.lastvisitdate}, {vb:raw pmbox.lastvisittime}}</p></vb:comment>
        <
vb:else />
            <
ul class="nouser">
            <
vb:if condition="$show['registerbutton']">
                <
li><a href="register.php{vb:raw session.sessionurl_q}" rel="nofollow">{vb:rawphrase register}</a></li>
            </
vb:if>            
                <
li><a rel="help" href="faq.php{vb:raw session.sessionurl_q}">{vb:rawphrase help}</a></li>
            </
ul>
            <
script type="text/javascript" src="clientscript/vbulletin_md5.js?v={vb:raw vboptions.simpleversion}"></script>
            <
form action="login.php?{vb:raw session.sessionurl}do=login" method="post" onsubmit="md5hash(vb_login_password, vb_login_md5password, vb_login_md5password_utf, {vb:raw show.nopasswordempty})">
                <
fieldset id="logindetails" class="logindetails">
                    <
div>
                        <
div>
                    <
input type="text" class="textbox default-value" name="vb_login_username" id="navbar_username" size="10" accesskey="u" tabindex="101" value="<vb:if condition="$username">{vb:raw username}<vb:else />{vb:rawphrase username}</vb:if>" onfocus="if (this.value == '<vb:if condition="$username">{vb:raw username}<vb:else />{vb:rawphrase username}</vb:if>'){this.value=''; this.style.color='black';}" onblur="if (this.value == '') {this.value='<vb:if condition="$username">{vb:raw username}<vb:else />{vb:rawphrase username}</vb:if>'; this.style.color='#828282';}"/>
                    <
input type="password" class="textbox default-value" name="vb_login_password" id="navbar_password" size="10" tabindex="102" onfocus="this.style.color='black';" />

                    <
label for="cb_cookieuser_navbar"><input type="checkbox" name="cookieuser" value="1" tabindex="103" id="cb_cookieuser_navbar" class="cb_cookieuser_navbar" accesskey="c" /> {vb:rawphrase remember_me}</label> <input type="submit" class="loginbutton" value="{vb:rawphrase log_in}" tabindex="104" title="{vb:rawphrase enter_username_to_login_or_register}" accesskey="s" />
                    
</
div

In vbulletin-chrome.css, find:
PHP Code:
.toplinks {
    
position:absolute;
    {
vb:stylevar right}:{vb:math {vb:stylevar padding}*2};
    
top:0;
    
color:{vb:stylevar toplinks_link_color};
    
font: {vb:stylevar header_font};
    
text-align:{vb:stylevar right};


Replace with:
PHP Code:
.toplinks 
    
position:absolute
    {
vb:stylevar right}:{vb:math {vb:stylevar padding}+180}; 
    
color:{vb:stylevar toplinks_link_color}; 
    
font: {vb:stylevar header_font}; 
    
text-align:{vb:stylevar right}; 


Find:
PHP Code:
.toplinks ul.nouser li a{
    
positionrelative;
    
padding6px {vb:stylevar padding{vb:stylevar padding};
    
background: {vb:stylevar navbar_tab_background.backgroundColor};
    -
moz-border-radius-bottom{vb:stylevar left}: {vb:stylevar border_radius};
    -
webkit-border-bottom-{vb:stylevar left}-radius: {vb:stylevar border_radius};
    -
moz-border-radius-bottom{vb:stylevar right}:{vb:stylevar border_radius};
    -
webkit-border-bottom-{vb:stylevar right}-radius:{vb:stylevar border_radius};
    
height:{vb:math 8px + {vb:math {vb:stylevar font.fontSize}-1}};
    
font-weight:bold;
    
displayblock;
    
font-size:{vb:math {vb:stylevar font.fontSize}-1}px;


Replace with:
PHP Code:
.toplinks ul.nouser li a
    
positionrelative
    
padding6px {vb:stylevar padding{vb:stylevar padding}; 
    
height:{vb:math 8px + {vb:math {vb:stylevar font.fontSize}-1}}; 
    
font-weight:bold
    
displayblock
    
font-size:{vb:math {vb:stylevar font.fontSize}-1}px


Find:
PHP Code:
.toplinks .logindetails {
    
padding{vb:stylevar padding};
    
background: {vb:stylevar navbar_tab_background.backgroundColor};
    -
moz-border-radius-bottom{vb:stylevar left}: {vb:stylevar border_radius};
    -
webkit-border-bottom-{vb:stylevar left}-radius: {vb:stylevar border_radius};
    -
moz-border-radius-bottom{vb:stylevar right}:{vb:stylevar border_radius};
    -
webkit-border-bottom-{vb:stylevar right}-radius:{vb:stylevar border_radius};
    
height: {vb:stylevar navbar_tab_size.height}px;


Replace with:
PHP Code:
.toplinks .logindetails 
    
padding{vb:stylevar padding}; 
    
height: {vb:stylevar navbar_tab_size.height}px


Find:
PHP Code:
.notifications {
    
font-size:{vb:stylevar small_fontSize};
    
color: {vb:stylevar toplinks_link_color};
    
padding:8px 2px 6px 0;
    -
moz-border-radius-bottom{vb:stylevar left}: 5px;
    -
moz-border-radius-bottom{vb:stylevar right}: 5px;


Replace with:
PHP Code:
.notifications {
    
font-size:{vb:stylevar small_fontSize};
    
color: {vb:stylevar toplinks_link_color};
    
padding:3px 2px 6px 0px;
    -
moz-border-radius-bottom{vb:stylevar left}: 5px;
    -
moz-border-radius-bottom{vb:stylevar right}: 5px;


Find:
PHP Code:
.toplinks .notifications a.popupctrl {    
    
padding-top8px;
    
padding-bottom3px;
    
padding-{vb:stylevar left}: 4px;
    
padding-{vb:stylevar right}: 12px;
    
background: {vb:stylevar navbar_background_notify.backgroundColorurl({vb:stylevar imgdir_misc}/arrow.png) {vb:stylevar rightcenter no-repeat ;
    -
moz-border-radius-bottom{vb:stylevar left}: {vb:stylevar border_radius};
    -
moz-border-radius-bottom{vb:stylevar right}: {vb:stylevar border_radius};
       
_background-image:url('{vb:stylevar imgdir_misc}/arrow.gif');


Replace with:
PHP Code:
.toplinks .notifications a.popupctrl {    
    
padding-top3px;
    
padding-bottom3px;
    
padding-{vb:stylevar left}: 4px;
    
padding-{vb:stylevar right}: 12px;
    
background: {vb:stylevar navbar_background_notify.backgroundColorurl({vb:stylevar imgdir_misc}/arrow.png) {vb:stylevar rightcenter no-repeat ;
    -
moz-border-radius-bottom{vb:stylevar left}: {vb:stylevar border_radius};
    -
moz-border-radius-bottom{vb:stylevar right}: {vb:stylevar border_radius};
       
_background-image:url('{vb:stylevar imgdir_misc}/arrow.gif');


Find:
PHP Code:
.toplinks .notifications a.popupctrl:hover, .toplinks .nonotifications a.popupctrl:hover {
    
padding-top8px;
    
padding-bottom3px;
    
padding-{vb:stylevar left}: 4px;
    
padding-{vb:stylevar right}: 12px;
    
background: {vb:stylevar navbar_tab_background.backgroundColorurl({vb:stylevar imgdir_misc}/arrow.pngno-repeat {vb:stylevar rightcenter;
        
_background-image:url('{vb:stylevar imgdir_misc}/arrow.gif');


Replace with:
PHP Code:
.toplinks .notifications a.popupctrl:hover, .toplinks .nonotifications a.popupctrl:hover {
    
padding-top3px;
    
padding-bottom3px;
    
padding-{vb:stylevar left}: 4px;
    
padding-{vb:stylevar right}: 12px;
    
background: {vb:stylevar navbar_tab_background.backgroundColorurl({vb:stylevar imgdir_misc}/arrow.pngno-repeat {vb:stylevar rightcenter;
        
_background-image:url('{vb:stylevar imgdir_misc}/arrow.gif');


Find:
PHP Code:
.toplinks .notifications a.popupctrl:hover {
    
padding-top8px;


Replace with:
PHP Code:
.toplinks .notifications a.popupctrl:hover {
    
padding-top3px;


Updates
Version 0.1 - Fixed Notifications

Download

No files for download.


vblts.ru supports vBulletin®, 2022-2024