View Full Version : Dynamic Forum / Home Link in Navbar
Pepper7
04-02-2007, 02: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, 08: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, 01: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, 03: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, 11:33 AM
anyone?
cruiser
06-10-2007, 11:29 PM
Man that went smooth. Thanks worked perfect.
rickyreter
06-18-2007, 05: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, 12:52 AM
Worked great Pepper7, really appreciate it:)
hyppa
01-02-2008, 06: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, 07:17 AM
When i press it, it shows a questionmark like this:
http://www.xxxxxxxxxxxxxxx/hjornet/?
hyppa
01-07-2008, 09:22 AM
If my portal is the .com, and the forum is hjornet, ( index.php )
what shall the code be?
Jan38
08-28-2008, 03: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:
Blue91
01-12-2009, 01:27 PM
I got this working for my 3.8 but I'm having an issue with the (I guess I'd call it) session.
I've left the ?s in place but still... the links work but when I go from the forums to the home page, I am shown as not being logged in. Even if I log in on the home page, it comes right back showing me again as not being logged in. If I then click the link again (now says forums), it takes me to my forums where I am still logged in.
Anyone know how to help me fix this? It's doing it in any style I try.
cliff notes - links work but shown as logged out when clicking from forums TO CMPS home page. When I click from homepage to forums, shown as logged in just fine.
Blue91
01-13-2009, 10:43 AM
Anyone? Anyone?
Brian
01-13-2009, 11:33 AM
Have you tried the suggestions from our FAQ?
http://www.vbadvanced.com/forum/faq.php?faq=vba_trouble#faq_vba_trouble_cookie
Also, it's much better to start a new thread than to reply to a very old one that really has nothing to do with your issue.
Blue91
01-13-2009, 11:38 AM
Uhh, it does have to do with this thread. I added the "dynamic" forum/home link to my navbar per this thread. I have zero problems when I remove the link from the navbar. The LINK works great, but it shows me as "logged out" when I click from the Forums to the Homepage (vba). Even if I log in on the homepage, it still reloads it showing me not logged in. However, I have all permissions as I would if I was logged in.
Oh well, I'd like to use this but not if it shows people as not being logged in.
Brian
01-13-2009, 12:49 PM
Adding the link is just what brought the issue to light. It's a problem with your cookies though, and nothing to do with this modifcation really. You still need to follow the instructions in the link I posted above if you would like to correct the problem.
Blue91
01-13-2009, 01:07 PM
htaccess seemed to work. I'll try the link again and see...
Thanks.
Taken from this (http://www.vbadvanced.com/forum/showthread.php?t=41&highlight=dynamic+forum+home) post. Numerous people have been saying "the code isn't there in 3.5, what do I do?" SO I thought I would help them out.
In the Navbar template find:
<if condition="$show['member']">
it is aprox. line number 91.
Above that add:
<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>
There you have it. Easy money.
Thanks, clean and to the point
dstephan
07-04-2009, 10:59 PM
Has anyone come up with a plug in that does this? Or better yet, just incorporate it into vBa? Having to edit the template with every upgrade is kind of a bummer.
mholtum
07-05-2009, 01:59 PM
Has anyone come up with a plug in that does this? Or better yet, just incorporate it into vBa? Having to edit the template with every upgrade is kind of a bummer.
I havent had to reinsert this code since I created this post way back when. Simply do not revert the navbar template after upgrade. After all, its not like they have changed it.
tatsu
07-29-2009, 12:30 AM
can someone show me what this does exactily?
Samir
08-20-2009, 09:39 PM
I've used this to create a dynamic navbar, but I want two different options that go to the same 'THIS_SCRIPT'.
I have two links to my calendar, one is the monthly view, and one is the weekly view. I want the link to be dynamic based on which one of these calendar views the user is looking at. Any way of doing a conditional for this?
Samir
08-20-2009, 11:54 PM
I've used this to create a dynamic navbar, but I want two different options that go to the same 'THIS_SCRIPT'.
I have two links to my calendar, one is the monthly view, and one is the weekly view. I want the link to be dynamic based on which one of these calendar views the user is looking at. Any way of doing a conditional for this?I figured this out. There's a conditional in the main calendar template I was able to use for this purpose.
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.