PDA

View Full Version : How do I get the "Forums/Home" link in the navbar?


JoeyAnderson
07-15-2005, 10:32 AM
Much like this site - how do I get the forums/home link in my navbar?

Much appreciated! :D

Brian
07-15-2005, 03:05 PM
http://www.vbadvanced.com/forum/showthread.php?t=41

Our Sponsors
 

JoeyAnderson
07-15-2005, 04:00 PM
Beautiful. Thanks!

pushpullba
07-30-2005, 09:21 PM
for some reason the forum/home link is not available when not logged in but only works when you are logged in

www403.pair.com/ppb2/cmps_index.php

Our Sponsors
 

ConqSoft
07-30-2005, 09:24 PM
Sounds like you have it inside one of the IF statements that checks to see if a user is logged in. Move it outside that IF.

pushpullba
07-30-2005, 09:53 PM
thanks, i will check
you rock

pushpullba
07-30-2005, 09:56 PM
<script type="text/javascript">
<!--
function log_out()
{
ht = document.getElementsByTagName("html");
ht[0].style.filter = "progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)";
if (confirm('$vbphrase[sure_you_want_to_log_out]'))
{
return true;
}
else
{
ht[0].style.filter = "";
return false;
}
}
//-->
</script>

<br />

<!-- breadcrumb, login, pm info -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="alt1" width="100%">
<if condition="is_array($navbits)">
<table cellpadding="0" cellspacing="0" border="0">
<tr valign="bottom">
<td><a href="#" onclick="history.back(1)"><img src="$stylevar[imgdir_misc]/navbits_start.gif" alt="$vbphrase[go_back]" border="0" /></a></td>
<td>&nbsp;</td>
<td width="100%"><span class="navbar"><a href="$vboptions[forumhome].php?$session[sessionurl]" accesskey="1">$vboptions[bbtitle]</a></span> $navbits[breadcrumb]</td>
</tr>
<tr>
<td class="navbar" style="font-size:10pt; padding-top:1px" colspan="3"><a href="$scriptpath"><img class="inlineimg" src="$stylevar[imgdir_misc]/navbits_finallink.gif" alt="$vbphrase[reload_this_page]" border="0" /></a> <strong>$navbits[lastelement]</strong></td>
</tr>
</table>
<else />
<div class="navbar" style="font-size:10pt"><a href="$vboptions[forumhome].php?$session[sessionurl]" accesskey="1"><img class="inlineimg" src="$stylevar[imgdir_misc]/navbits_start.gif" alt="" border="0" /></a> <strong>$vboptions[bbtitle]</strong></div>
</if>
</td>

<if condition="$bbuserinfo['userid']">

<td class="alt2" valign="top" nowrap="nowrap">
<div class="smallfont">
<!--<span style="float:$stylevar[right]">[<a href="login.php?$session[sessionurl]do=logout&amp;u=$bbuserinfo[userid]" onclick="return log_out()">$vbphrase[log_out]</a>]</span>-->
<strong><phrase 1="$bbuserinfo[username]">$vbphrase[welcome_x]</phrase></strong><br />
<phrase 1="$pmbox[lastvisitdate]" 2="$pmbox[lastvisittime]">$vbphrase[last_visited_x_at_y]</phrase>
<if condition="$show['pmstats']"><br /><phrase 1="$vbphrase[unread_x_nav_compiled]" 2="$vbphrase[total_x_nav_compiled]" 3="$session[sessionurl]">$vbphrase[private_messages_nav]</phrase></if>
</div>
</td>

<else />

<td class="alt2" nowrap="nowrap" style="padding:0px">

<!-- login form -->
<form action="login.php" method="post" onsubmit="md5hash(vb_login_password,vb_login_md5password,vb_login_md5password_utf)">
<script type="text/javascript" src="clientscript/vbulletin_md5.js"></script>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
<tr>
<td class="smallfont">$vbphrase[username]</td>
<td><input type="text" class="button" name="vb_login_username" id="navbar_username" size="10" accesskey="u" tabindex="1" value="$vbphrase[username]" onfocus="if (this.value == '$vbphrase[username]') this.value = '';" /></td>
<td class="smallfont" colspan="2" nowrap="nowrap"><label for="cb_cookieuser_navbar"><input type="checkbox" name="cookieuser" value="1" tabindex="3" id="cb_cookieuser_navbar" accesskey="c" checked="checked" />$vbphrase[remember_me]</label></td>
</tr>
<tr>
<td class="smallfont">$vbphrase[password]</td>
<td><input type="password" class="button" name="vb_login_password" size="10" accesskey="p" tabindex="2" /></td>
<td><input type="submit" class="button" value="$vbphrase[log_in]" tabindex="4" title="$vbphrase[enter_username_to_login_or_register]" accesskey="s" /></td>
</tr>
</table>
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="do" value="login" />
<input type="hidden" name="forceredirect" value="1" />
<input type="hidden" name="vb_login_md5password" />
<input type="hidden" name="vb_login_md5password_utf" />
</form>
<!-- / login form -->

</td>

</if>

</tr>
</table>
<!-- / breadcrumb, login, pm info -->

<!-- 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">
<!--<td class="vbmenu_control"><a href="$vboptions[forumhome].php?$session[sessionurl]">Home</a></td>-->

<if condition="$show['member']">
<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]"> Front Page </if></a></td>
</if>
<if condition="$show['registerbutton']">
<td class="vbmenu_control"><a href="register.php?$session[sessionurl]">$vbphrase[register]</a></td>
</if>
<td class="vbmenu_control"><a href="faq.php?$session[sessionurl]" accesskey="5">$vbphrase[faq]</a></td>
<td class="vbmenu_control"><a href="memberlist.php?$session[sessionurl]">$vbphrase[members_list]</a></td>
<td class="vbmenu_control"><a href="calendar.php?$session[sessionurl]">$vbphrase[calendar]</a></td>
<if condition="$show['popups']">
<if condition="$show['searchbuttons']">
<if condition="$show['member']">
<td class="vbmenu_control"><a href="search.php?$session[sessionurl]do=getnew" accesskey="2">$vbphrase[new_posts_nav]</a></td>
<else />
<td class="vbmenu_control"><a href="search.php?$session[sessionurl]do=getdaily" accesskey="2">$vbphrase[todays_posts]</a></td>
</if>
<td id="navbar_search" class="vbmenu_control"><a href="search.php?$session[sessionurl]" accesskey="4">$vbphrase[search]</a> <script type="text/javascript"> vbmenu_register("navbar_search"); </script></td>
</if>
<if condition="$bbuserinfo['userid']">
<td id="usercptools" class="vbmenu_control"><a href="#usercptools">$vbphrase[quick_links]</a> <script type="text/javascript"> vbmenu_register("usercptools"); </script></td>
</if>
<else />
<if condition="$show['searchbuttons']">
<td class="vbmenu_control"><a href="search.php?$session[sessionurl]" accesskey="4">$vbphrase[search]</a></td>
<if condition="$show['member']">
<td class="vbmenu_control"><a href="search.php?$session[sessionurl]do=getnew" accesskey="2">$vbphrase[new_posts_nav]</a></td>
<else />
<td class="vbmenu_control"><a href="search.php?$session[sessionurl]do=getdaily" accesskey="2">$vbphrase[todays_posts]</a></td>
</if>
</if>
<td class="vbmenu_control"><a href="forumdisplay.php?$session[sessionurl]do=markread">$vbphrase[mark_forums_read]</a></td>
<if condition="$bbuserinfo['userid']">
<td class="vbmenu_control"><a href="#" onclick="window.open('misc.php?$session[sessionurl]do=buddylist&amp;focus=1','buddylist','statusbar=no,menubar=no,toolbar=no,scrollbars =yes,resizable=yes,width=250,height=300'); return false;">$vbphrase[open_buddy_list]</a></td>
</if>
</if>
<if condition="$bbuserinfo['userid']">
<td class="vbmenu_control"><a href="login.php?$session[sessionurl]do=logout&amp;u=$bbuserinfo[userid]" onclick="return log_out()">$vbphrase[log_out]</a></td>
</if>
</tr>
</table>
</div>
<!-- / nav buttons bar -->

<br />
<br />

<if condition="$show['popups']">
<!-- NAVBAR POPUP MENUS -->

<if condition="$show['searchbuttons']">
<!-- header quick search form -->
<div class="vbmenu_popup" id="navbar_search_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td class="thead">$vbphrase[search_forums]</td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite">
<form action="search.php" method="post">
<input type="hidden" name="do" value="process" />
<input type="hidden" name="showposts" value="0" />
<input type="text" class="bginput" name="query" size="20" />$gobutton<br />
</form>
</td>
</tr>
<tr>
<td class="vbmenu_option"><a href="search.php?$session[sessionurl]" accesskey="4">$vbphrase[advanced_search]</a></td>
</tr>
</table>
</div>
<!-- / header quick search form -->
</if>

<if condition="$show['member']">
<!-- user cp tools menu -->
<div class="vbmenu_popup" id="usercptools_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">

<tr><td class="thead">$vbphrase[quick_links]</td></tr>
<if condition="$vboptions['enablesearches']"><tr><td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=getnew">$vbphrase[new_posts_nav]</a></td></tr></if>
<tr><td class="vbmenu_option"><a href="forumdisplay.php?$session[sessionurl]do=markread">$vbphrase[mark_forums_read]</a></td></tr>
<tr><td class="vbmenu_option"><a href="#" onclick="window.open('misc.php?$session[sessionurl]do=buddylist&amp;focus=1','buddylist','statusbar=no,menubar=no,toolbar=no,scrollbars =yes,resizable=yes,width=250,height=300'); return false;">$vbphrase[open_buddy_list]</a></td></tr>

<tr><td class="thead"><a href="usercp.php?$session[sessionurl]">$vbphrase[user_control_panel]</a></td></tr>
<if condition="$show['siglink']"><tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=editsignature">$vbphrase[edit_signature]</a></td></tr></if>
<if condition="$show['avatarlink']"><tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=editavatar">$vbphrase[edit_avatar]</a></td></tr></if>
<tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=editprofile">$vbphrase[edit_profile]</a></td></tr>
<tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=editoptions">$vbphrase[edit_options]</a></td></tr>

<tr><td class="thead">$vbphrase[miscellaneous]</td></tr>
<if condition="$show['pmstats']"><tr><td class="vbmenu_option"><a href="private.php?$session[sessionurl]">$vbphrase[private_messages]</a></td></tr></if>
<tr><td class="vbmenu_option"><a href="subscription.php?$session[sessionurl]">$vbphrase[subscribed_threads]</a></td></tr>
<tr><td class="vbmenu_option"><a href="member.php?$session[sessionurl]u=$bbuserinfo[userid]">$vbphrase[my_profile]</a></td></tr>
<if condition="$show['wollink']"><tr><td class="vbmenu_option"><a href="online.php?$session[sessionurl]">$vbphrase[whos_online]</a></td></tr></if>

</table>
</div>
<!-- / user cp tools menu -->
</if>
<!-- / NAVBAR POPUP MENUS -->
</if>

how about this? Trying to make sense of it all

mholtum
07-31-2005, 12:56 AM
Looks like that should be fine

pushpullba
07-31-2005, 01:34 AM
except i don't know what to do with the <if> business...

<if condition="$show['member']">
<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]"> Front Page </if></a></td>
</if>

do i just get rid of the <if condition="$show['member']"> bits?

mholtum
07-31-2005, 01:48 AM
Find:

<!-- 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">

Under that place:

<if condition="THIS_SCRIPT != 'adv_index'">
<td class="vbmenu_control"><a href="$vboptions[homeurl]?$session[sessionurl]">Home</a></td>
</if>
<if condition="defined('VBA_SCRIPT')">
<td class="vbmenu_control"><a href="$vboptions[bburl]/$vboptions[forumhome].php?$session[sessionurl]">Forums</a></td>
</if>


That should do it.

pushpullba
07-31-2005, 02:30 AM
ok, thanks... i have deleted the <if members> clause and that seems to have worked. I hope in doing so, i haven't stuffed things up.

mholtum
07-31-2005, 02:45 AM
ok, thanks... i have deleted the <if members> clause and that seems to have worked. I hope in doing so, i haven't stuffed things up.The <if members> clause is what is restricting it to logged in members, I would assume.

pushpullba
07-31-2005, 04:36 AM
ok, for some reason, now that i have that working, i don't have the usercp there anymore.... :(

please take a look

http://www403.pair.com/ppb2/cmps_index.php

mholtum
07-31-2005, 04:43 AM
You probably removed it when you deleted some of that <if members> code. Revert the navbar template back to the original template. (by highlighting it and clicking revert) then try again.

pushpullba
07-31-2005, 04:55 AM
thanks a million, all sorted, you guys rock here!
:not worthy:

mholtum
07-31-2005, 05:00 AM
Glad to help

GamingVidz.com
08-02-2005, 10:12 PM
I looked at the link that Brian posted; however, I don't know where that file is located. I'm sure its easy to find, but it doens't say anything about the directory.

mholtum
08-02-2005, 10:37 PM
I looked at the link that Brian posted; however, I don't know where that file is located. I'm sure its easy to find, but it doens't say anything about the directory.

admincp / styles / edit templates / breadcrumbs & navigation / navbar

ConqSoft
08-02-2005, 10:37 PM
I looked at the link that Brian posted; however, I don't know where that file is located. I'm sure its easy to find, but it doens't say anything about the directory.

If you mean the link to Zachery's post, it isn't a file, it's a vBulletin template. The navbar template.

mholtum
08-03-2005, 01:48 AM
I don't get it.

Which template do I modify? I see three of them, are those slashes like different menu options and further choices within that menu?

Sorry :(
1: log into your admincp
2: On the left side you will see Styles & Templates click Style Manager.
3: You will see a list of your styles in the dropdown choose "Edit Templates"
4: Scroll down to you see Navigation & Breadcrumbs. Double click it
5: You will now see Navbar & Navbar_links
6: Choose navbar

GamingVidz.com
08-03-2005, 02:05 AM
Ok, I found that code, but the problem I'm having is that I used a template from this place, so the coding is different in the navbar place.

In other words, where it says find this code:

<!--<td class="vbmenu_control"><a href="$vboptions[forumhome].php?$session[sessionurl]">Home</a></td>-->

And replace with

<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>

I can find two spots where it could be, but the code is different from what is above. Like where the code ends and then the word is defined "Home." I don't have that. The closest thing I have is this:

<td width="100%"><span class="navbar"><a href="$vboptions[forumhome].php?$session[sessionurl]" accesskey="1">$vboptions[bbtitle]</a></span> $navbits[breadcrumb]</td>

And the only other option is this, but I don't think this is the spot:

<div class="navbar" style="font-size:10pt"><a href="$vboptions[forumhome].php?$session[sessionurl]" accesskey="1"><img class="inlineimg" src="$stylevar[imgdir_misc]/navbits_start.gif" alt="" border="0" /></a> <strong>$vboptions[bbtitle]</strong></div

Do you think this is because I have images for my links? (at least I think they're images)

Thanks again for the help guys.

Yah I just looked I think that since I have images this code might not work unless I make another image for forum and then use the code above somehow to switch an image for another image. But I don't know code and don't think I know how to do it. All I think I can do is simply add another image :(

Unless someone knows how to fix what I have.

mholtum
08-03-2005, 02:19 AM
Post your navbar template here and I will edit it for you if you want..

GamingVidz.com
08-03-2005, 03:29 AM
<!-- breadcrumb, login, pm info -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="alt1" width="100%">
<if condition="is_array($navbits)">
<table cellpadding="0" cellspacing="0" border="0">
<tr valign="bottom">
<td><a href="#" onclick="history.back(1)"><img src="$stylevar[imgdir_misc]/navbits_start.gif" alt="$vbphrase[go_back]" border="0" /></a></td>
<td>&nbsp;</td>
<td width="100%"><span class="navbar"><a href="$vboptions[forumhome].php?$session[sessionurl]" accesskey="1">$vboptions[bbtitle]</a></span> $navbits[breadcrumb]</td>
</tr>
<tr>
<td class="navbar" style="font-size:10pt; padding-top:1px" colspan="3"><a href="$scriptpath"><img class="inlineimg" src="$stylevar[imgdir_misc]/navbits_finallink.gif" alt="$vbphrase[reload_this_page]" border="0" /></a> <strong>$navbits[lastelement]</strong></td>
</tr>
</table>
<else />
<div class="navbar" style="font-size:10pt"><a href="$vboptions[forumhome].php?$session[sessionurl]" accesskey="1"><img class="inlineimg" src="$stylevar[imgdir_misc]/navbits_start.gif" alt="" border="0" /></a> <strong>$vboptions[bbtitle]</strong></div>
</if>
</td>


But shouldn't I post an image for forum? Because aren't you going to make the code replace the image based on where you are at?

mholtum
08-03-2005, 03:31 AM
your entire navbar script

GamingVidz.com
08-03-2005, 03:32 AM
Heh, I tried to edit post before you saw my reply, but there is the section you'll need I believe let me know if you need something else.

Also, man I think that something is messed up with my install of vBadvanced, as I don't have access to like anything for it. The only way I have access is by knowing the full url to the location. How can I fix that?

mholtum
08-03-2005, 03:38 AM
thats your entire navbar template?
It should have much more than that.. Can you make me an admin so I can take a look

mholtum
08-03-2005, 03:39 AM
Now I know why, I just looked at your site. The creators of the skin have your links in the header template. You will need to create buttons with the psd files they gave you and insert them into the header template

GamingVidz.com
08-03-2005, 03:48 AM
;) What do you mean the creators...

I made it...

Heh, anyway, so should I just screw the alternating images or after I put in the image do you think you'd be able to make it work?

Lemme know, thanks

mholtum
08-03-2005, 03:50 AM
sure looks like an extremepixels theme. But whatever. Get the images in there and I am sure we can get it to work

GamingVidz.com
08-03-2005, 04:41 AM
Heh, well its hard to make jokes while typing. Yes it is from them. I have the new images and sliced em and all, but which php file should I go to in order to fix them?

mholtum
08-03-2005, 04:48 AM
fix them? what do you mean?
You will insert them in the header template.

GamingVidz.com
08-03-2005, 02:54 PM
Header template, ok, I'll check that out when I'm off work (on lunch now).