View Full Version : Home/Forums Link
The Sandman
07-11-2004, 08:54 PM
I've done this template mod for the dynamic link, but it doesn't work well with the Links:In the Navbar template, find:
<!--<td class="vbmenu_control"><a href="$vboptions[forumhome].php?$session[sessionurl]">Home</a></td>-->
And replace it with this:
<td class="vbmenu_control"><if condition="THIS_SCRIPT == 'adv_index'"><a href="$vboptions[bburl]?$session[sessionurl]"> Forums <else /> <a href="$vboptions[homeurl]?$session[sessionurl]"> Home </if></a></td>
On the Links page, the dynamic link reads "Home" but clicking it results in an error - it tries to take me to
http://www.myforums.com/http://www.myforums.com/index.php/? How can I fix this?
Brian
07-11-2004, 09:13 PM
What do you have set for your 'Home URL' option in your main vBulletin options? Make sure that it is set to the full URL to your homepage and that should solve the problem. ;)
The Sandman
07-11-2004, 09:19 PM
It is set for the full URL to my homepage. Forums to Homepage and Homepage to Forums work fine. The problem is only from the Links to Homepage. Hmm, maybe on the Links page I should have links to both the Forums and the Hompage separately. How would I do that?
Brian
07-11-2004, 09:44 PM
Ahhh... I forgot that the str_replace function to replace the links in the navbar also replaces the forum's link with the homepage link for the navbits. If you'll just change "$vboptions[homeurl]" to "/index.php" instead then that should take care of the problem. :)
The Sandman
07-11-2004, 10:41 PM
No, still having the same problem...
The Sandman
07-11-2004, 10:43 PM
The "Home" link in the breadcrumbs works fine - what link does that use?
The Sandman
07-11-2004, 10:54 PM
Ahhh... I forgot that the str_replace function to replace the links in the navbar also replaces the forum's link with the homepage link for the navbits. If you'll just change "$vboptions[homeurl]" to "/index.php" instead then that should take care of the problem. :)Finally figured it out by looking at the Links Navbar template. It's not "/index.php", it's "index.php" without the slash... ;)
The Sandman
07-11-2004, 11:07 PM
Bah - still a problem. I went ahead and made a separate "Home Page" link and "Forums" Link for my Navbar. If I'm on the Links page and click on the Home Page link I go to the vBA CMPS Homepage. But, if I'm in the Forums and click on the Home Page Link I go to the Main forum Page. :confused:
Brian
07-13-2004, 02:59 PM
Are your forums on a subdomain or something? As long as they're not, then there's no reason that changing the home link to '/index.php' shouldn't work...
The Sandman
07-13-2004, 03:08 PM
No, my Board is not on a subdomain. And '/index.php' does work... unless I'm on the Links page when I click it, in which case I get an error because the link tries to take me to:
http://www.myforums.com/http://www.myforums.com/index.php/
The Sandman
07-13-2004, 03:18 PM
Here's my workaround for the Home Page link:
<if condition="VBA_SCRIPT == 'links_directory'">
<td class="vbmenu_control"><a href="index.php?$session[sessionurl]">Home Page</a></td></if>
<if condition="VBA_SCRIPT !== 'links_directory'">
<if condition="THIS_SCRIPT !== 'adv_index'">
<td class="vbmenu_control"><a href="/index.php?$session[sessionurl]">Home Page</a></td></if></if>
Brian
07-13-2004, 03:45 PM
Grrr... I keep forgetting about the str_replace function in the navbar that replaces those links. Sorry about that! This should fix the problem though and allow you to use '/index.php'...
In your forum/includes/functions_links.php look for:
$vboptions['bbtitle'],
$vboptions['forumhome'] . '.php'
Replace that with:
$vboptions['bbtitle'],
'"' . $vboptions['forumhome'] . '.php'
Then right below that find:
$vboptions['hometitle'],
$vboptions['homeurl'] . '/'
And replace that with:
$vboptions['hometitle'],
'"' . $vboptions['homeurl']
And that should fix the problem and allow you to use '/index.php' for the link. :)
The Sandman
07-13-2004, 04:01 PM
Now you're talking!
BTW, I'm also sing the uStore hack, with the Store dropdown menu in my navbar. On the Links page, the dropdown is not the same as on all other pages... it shows only:
uShop Menu
Bank
Richest Members
Most Sold
History
Actions
The links to the individual "actions" are missing. Any ideas on fixing that one?
Brian
07-13-2004, 04:42 PM
Follow the instructions in this thread (http://www.vbadvanced.com/forum/showpost.php?p=5603&postcount=4), except you'll want to make the changes to your /forum/includes/functions_links.php file instead. ;)
The Sandman
07-13-2004, 05:30 PM
Thanks Brian - I'm all set now...
...unless you also happen to know which conditionals I can use to identify the V3 Arcade Main Page and the V3 Artices Main Page...
Brian
07-13-2004, 05:40 PM
THIS_SCRIPT == 'article'
And
THIS_SCRIPT == 'arcade'
;)
StewardManscat
01-09-2005, 12:16 AM
Grrr... I keep forgetting about the str_replace function in the navbar that replaces those links. Sorry about that! This should fix the problem though and allow you to use '/index.php'...
I found I needed to apply this fix
replace
'"' . $vboptions['forumhome'] . '.php'
with
'"' . $vboptions['homeurl'] . '/links/index.php'
But I see function construct_adv_navbar is included in gallery,links, and cmps. I wonder if there is a known rule for which could be ignored if all three products are together?
And obviously, my fix isn't going to fly for me if and when I get all these products working together on the same site, and decide to sprinkle breadcrumbs everywhere. I need to think about that more for myself, but I wonder what the recommended procedure is?
Home
-Forums
-Gallery
-Links
-My Contents
... at least four index.php pages... and this is further confused because "home" at an adult site is an entrance page that nobody cares about. My renamed cmps_index.php (now the lobby.php) is really my current home page.
Grr yourself. You should be so lucky to forget what we have not begun to learn.
Brian
01-09-2005, 10:58 PM
Could you elaborate a little more on exactly why the current method is causing a problem? I took a look, but I'm not seeing anything too obvious as to how it is creating a problem.
vBulletin® v3.7.2, Copyright ©2000-2008, Jelsoft Enterprises Ltd.