View Full Version : Dynamic Forum / Home Link in Navbar
Pepper7
04-02-2007, 03:00 PM
how do you do this for vb 3.6.5?
because you can't find the code in the 'navbar' template in 3.6.5 that has been listed so far?
or i haven't seen it?
I'm running 3.6.5 and this works perfectly. :)
Here is the default section to look for: (It's in your "navbar" template.)
<!-- nav buttons bar -->
<div align="center">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center" style="border-top-width:0px">
<tr align="center">
<if condition="$show['member']">
<td class="vbmenu_control"><a href="usercp.php$session[sessionurl_q]">$vbphrase[user_cp]</a></td>
</if>
Add the stuff in red, noting that the blue part should be the name of the page you use for your forum home page. e.g., I had to replace the $vboptions[forumhome] part of the codes posted in this thread with index.
<!-- nav buttons bar -->
<div align="center">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center" style="border-top-width:0px">
<tr align="center">
<!-- adding link to portal from forum, and vice versa -->
<td class="vbmenu_control"><if condition="THIS_SCRIPT == 'adv_index'">
<a href="$vboptions[bburl]/index.php?$session[sessionurl]"> Forums <else />
<a href="$vboptions[homeurl]?$session[sessionurl]"> Portal </if></a></td>
<!-- /edit -->
<if condition="$show['member']">
<td class="vbmenu_control"><a href="usercp.php$session[sessionurl_q]">$vbphrase[user_cp]</a></td>
</if>
Angels
04-05-2007, 09:52 PM
I'm running 3.6.5 and this works perfectly. :)
Here is the default section to look for: (It's in your "navbar" template.)
<!-- nav buttons bar -->
<div align="center">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center" style="border-top-width:0px">
<tr align="center">
<if condition="$show['member']">
<td class="vbmenu_control"><a href="usercp.php$session[sessionurl_q]">$vbphrase[user_cp]</a></td>
</if>
Add the stuff in red, noting that the blue part should be the name of the page you use for your forum home page. e.g., I had to replace the $vboptions[forumhome] part of the codes posted in this thread with index.
<!-- nav buttons bar -->
<div align="center">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center" style="border-top-width:0px">
<tr align="center">
<!-- adding link to portal from forum, and vice versa -->
<td class="vbmenu_control"><if condition="THIS_SCRIPT == 'adv_index'">
<a href="$vboptions[bburl]/index.php?$session[sessionurl]"> Forums <else />
<a href="$vboptions[homeurl]?$session[sessionurl]"> Portal </if></a></td>
<!-- /edit -->
<if condition="$show['member']">
<td class="vbmenu_control"><a href="usercp.php$session[sessionurl_q]">$vbphrase[user_cp]</a></td>
</if>
Thanks man, you're a lifesaver :)
But in the code I had to change it from '/index.php' to just 'forums.php' without the slash as it was adding an extra one.
Jmistrot
04-25-2007, 02:11 PM
Okay this is what happens in vBulletin 3.5.2. When you try to find in the template:
The term comes up in several places in the template. Every time you hit the "find" button it finds more instances of it. You want to insert the modification above the second instance of it in the template.
You have to hit the "find" button twice or it will be put in the wrong place. When you find it, insert above it:
and you should be good.
I'm new (look at my post count) so be easy. I've installed the code in my navbar template but when I click "Forum" it just reloads the page (Index.php). When in the forum the Home link works fine.
I know it has something to do with the [forumhome] comment..
any help will be appreciated.
Edit: This is the code I speaking of.
<td class="vbmenu_control"><if condition="THIS_SCRIPT == 'adv_index'"><a href="$vboptions[bburl]/$vboptions[forumhome].php?$session[sessionurl]"> Forums <else /> <a href="$vboptions[homeurl]?$session[sessionurl]"> Home </if></a></td>
dplevy81
05-03-2007, 04:27 AM
okay, question.. i installed this and it works great, but doesnt look very good cause of the .gif i used for the nav bar. is there a way to put that home/forums button in place of the FAQ one? cause the faq is the one thing in the nav bar thats completely useless to me. thanks.
dplevy81
05-03-2007, 12:33 PM
anyone?
cruiser
06-11-2007, 12:29 AM
Man that went smooth. Thanks worked perfect.
rickyreter
06-18-2007, 06:33 PM
Thers two links on my forum that not show up on homepage anyone got a cure for this
www.cartalkuk.co.uk
Peter
Is there a way to control or change the image that gets placed behind this link? I know my forums is calling the image cat2_back.gif and placing it behind this new link. The problem is, that image name does not show up any where in my templated or styles when I search for it.
I'm running 3.6.5 and this works perfectly. :)
Here is the default section to look for: (It's in your "navbar" template.)
<!-- nav buttons bar -->
<div align="center">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center" style="border-top-width:0px">
<tr align="center">
<if condition="$show['member']">
<td class="vbmenu_control"><a href="usercp.php$session[sessionurl_q]">$vbphrase[user_cp]</a></td>
</if>
Add the stuff in red, noting that the blue part should be the name of the page you use for your forum home page. e.g., I had to replace the $vboptions[forumhome] part of the codes posted in this thread with index.
<!-- nav buttons bar -->
<div align="center">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center" style="border-top-width:0px">
<tr align="center">
<!-- adding link to portal from forum, and vice versa -->
<td class="vbmenu_control"><if condition="THIS_SCRIPT == 'adv_index'">
<a href="$vboptions[bburl]/index.php?$session[sessionurl]"> Forums <else />
<a href="$vboptions[homeurl]?$session[sessionurl]"> Portal </if></a></td>
<!-- /edit -->
<if condition="$show['member']">
<td class="vbmenu_control"><a href="usercp.php$session[sessionurl_q]">$vbphrase[user_cp]</a></td>
</if>
excellent! thanks
In the above code there is an open <div align="center"> that is never closed. It is also needless - simply remove that from the code and it works fine.
<!-- nav buttons bar -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center" style="border-top-width:0px">
<tr align="center">
<!-- adding link to portal from forum, and vice versa -->
<td class="vbmenu_control"><if condition="THIS_SCRIPT == 'adv_index'">
<a href="$vboptions[bburl]/index.php?$session[sessionurl]"> Forums <else />
<a href="$vboptions[homeurl]?$session[sessionurl]"> Portal </if></a></td>
<!-- /edit -->
<if condition="$show['member']">
<td class="vbmenu_control"><a href="usercp.php$session[sessionurl_q]">$vbphrase[user_cp]</a></td>
</if>
MikeEagle12
12-25-2007, 01:52 AM
Worked great Pepper7, really appreciate it:)
hyppa
01-02-2008, 07:54 AM
I get the link in the portal to work, but the portal link does not work in the forum.
?
hyppa
01-02-2008, 08:17 AM
When i press it, it shows a questionmark like this:
http://www.xxxxxxxxxxxxxxx/hjornet/?
hyppa
01-07-2008, 10:22 AM
If my portal is the .com, and the forum is hjornet, ( index.php )
what shall the code be?
Jan38
08-28-2008, 04:18 PM
i use the enlighten template but i can't find the proper code in the navbar template.
i have the same problem as everybody else here, changing one URL effects also the links that should not change. Home should be the new vbadvanced home, forum should be the forum but Home in the navbar should be the new vbadvanced home and that is not going well..... strange that vbadvanced does not cover this :confused: there are many templates with this problem
tried several things but it still doesn't work :mad:
vBulletin® v3.7.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.