Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions

Reply
 
Thread Tools Display Modes
  #1  
Old 06-24-2010, 03:37 PM
Steve Hoffmeyer Steve Hoffmeyer is offline
 
Join Date: Mar 2007
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Adding a link to the navigation bar

I just upgraded to vB4 and lost the custom navigation bar (and all my custom colors and styles) that I had painfully modified in my previous vB3 version.

Right now I'm looking to add ONE SIMPLE LINK to the default navigation bar (the bar that shows "New Posts Private Messages FAQ etc etc") before the "New Posts" link that says "Home" and links to the home page on my site.

Unfortunately I'm not a vBulletin programmer and I'm a total newbie when it comes to this type of customization/modification, so please give me very detailed instructions.

PLEASE don't refer me to the Articles forum, or tell me that there are a number of good threads already out there. I've already done a number of searches and found them all VERY confusing and not detailed or specific enough for my simple problem.

Thanks in advance!!!
Reply With Quote
  #2  
Old 06-24-2010, 03:50 PM
Charlie98902 Charlie98902 is offline
 
Join Date: Dec 2006
Posts: 1,156
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here you go - https://vborg.vbsupport.ru/showthread.php?t=228492
Reply With Quote
  #3  
Old 06-24-2010, 04:01 PM
Steve Hoffmeyer Steve Hoffmeyer is offline
 
Join Date: Mar 2007
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi Charlie98902,
Thanks for you help, but I've already looked at that thread and could not figure out how to adapt it to my needs.

Sorry, but as I said I'm NOT a programmer and I dont know what "sample.php?" means.

What I need is detailed instructions on how to insert the word "Home" on the navigation bar and have it linked to "http:\\www.MySite.com"

Thanks,
Steve
Reply With Quote
  #4  
Old 06-24-2010, 04:10 PM
Charlie98902 Charlie98902 is offline
 
Join Date: Dec 2006
Posts: 1,156
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Code:
<li><a href="http:\\www.MySite.com{vb:raw session.sessionurl}">Home</a></li>
There is the code but to place it you'll want to read how to put it in the right place, this isn't hard as I use it too. Of course replace the mysite.com part to the right URL. Then copy and paste.
Reply With Quote
  #5  
Old 06-24-2010, 04:27 PM
Steve Hoffmeyer Steve Hoffmeyer is offline
 
Join Date: Mar 2007
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Once again, thanks Charlie, but I need to have detailed instructions on EXACTLY where the right place to put it is, and EXACTLY how to put it there.

Thanks,
Steve
Reply With Quote
  #6  
Old 06-24-2010, 04:30 PM
Charlie98902 Charlie98902 is offline
 
Join Date: Dec 2006
Posts: 1,156
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Find in the navbar template:

Code:
{vb:raw template_hook.navbar_start}
<vb:if condition="$show['searchbuttons']">
Add below:

Code:
<li><a href="http:\\www.MySite.com{vb:raw session.sessionurl}">Home</a</li>
Don't forget to replace yoursite.com part. This is the easiest way to do it and the only. There is no plugin to do this for you.
Reply With Quote
  #7  
Old 06-24-2010, 04:56 PM
noppid noppid is offline
 
Join Date: Mar 2003
Location: Florida
Posts: 1,875
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

To avoid having the edit the template you can do this too. Both are only going to appear when the forum tab is active.

Populate $template_hook['navbar_start'] using hook process_templates_complete.

Create a new plugin on hook process_templates_complete

Use this php code. Edit the link as necessary.

PHP Code:
$template_hook['navbar_start'] = '<li><a href="' $vbulletin->options['bburl'].'/index.php?' $vbulletin->session->vars['sessionurl'] . '">Home</a></li>'
Reply With Quote
  #8  
Old 06-24-2010, 05:09 PM
Charlie98902 Charlie98902 is offline
 
Join Date: Dec 2006
Posts: 1,156
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yep works well too. Can you change
Code:
<li><a href="' . $vbulletin->options['bburl'].'/index.php?
and add your personal url there instead too? As I use the mod I provided here but for another purpose.
Reply With Quote
  #9  
Old 06-24-2010, 05:11 PM
Steve Hoffmeyer Steve Hoffmeyer is offline
 
Join Date: Mar 2007
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi Charlie,
That worked, but there's two problems:

1) The words "New Posts" are highlighted
2) When I move the cursor over the words "New Posts" both "Home" and "New Posts get underligned.
Reply With Quote
  #10  
Old 06-24-2010, 05:14 PM
noppid noppid is offline
 
Join Date: Mar 2003
Location: Florida
Posts: 1,875
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Charlie98902 View Post
Yep works well too. Can you change
Code:
<li><a href="' . $vbulletin->options['bburl'].'/index.php?
and add your personal url there instead too? As I use the mod I provided here but for another purpose.
Sure, you can make it anything you want.

Code:
$template_hook['navbar_start'] = '<li><a href="http://www.cpurigs.com/">computer help forum</a></li>';
For instance.
Reply With Quote
Reply

Thread Tools
Display Modes

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 02:08 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.04847 seconds
  • Memory Usage 2,245KB
  • Queries Executed 13 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (6)bbcode_code
  • (1)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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