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
Toplinks Beside Search Bar 0.1 Details »»
Toplinks Beside Search Bar 0.1
Version: 1.00, by ArtAttack ArtAttack is offline
Developer Last Online: Sep 2012 Show Printable Version Email this Page

Category: Forum Home Enhancements - Version: 4.0.0 Rating:
Released: 01-08-2010 Last Update: Never Installs: 10
Template Edits
Re-useable Code  
No support by the author.

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

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 06-22-2010, 07:38 PM
BRotondi BRotondi is offline
 
Join Date: Sep 2008
Location: Zurich
Posts: 346
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for posting your Mod! Do you know Andreas' TMS? It automates all these changes. (Works nice with 3.8.x, 4.x)

1. Create the needed Template Modifications
2. Export as xml for everyone who already installed TMS
3. Export as Text-Only to achieve the instructions you inserted above.

Regards, Bruno
(TMS German here)
Reply With Quote
  #13  
Old 10-28-2012, 09:38 PM
WriteToEnlight's Avatar
WriteToEnlight WriteToEnlight is offline
 
Join Date: Dec 2009
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does anyone know how to move the toplinks to the left side in the same position as it is defaulted instead of the right side?
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 06:18 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.03661 seconds
  • Memory Usage 2,434KB
  • 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
  • (17)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (3)post_thanks_box
  • (3)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit_info
  • (2)postbit
  • (3)postbit_onlinestatus
  • (3)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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete