PDA

View Full Version : Question about self-made navigation


Speedy2000
06-22-2009, 02:35 PM
I'm using a skin that doesn't contain the page navigation (the navigation that is built like Website name > Current Forum > Current Sub-forum). So I'm creating one by myself.

This is what I have so far:

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" >
<tr>
<td class="alt1">
<b><a href="$vboptions[forumhome].php">$vboptions[bbtitle]</a></b>
<if condition="$show['forumdesc']">
&nbsp; &gt &nbsp;<a href="$vboptions[forumurl]">$foruminfo[title]</a></if>
</td>
</tr>
</table>


This code works just fine. But when I browse to a sub-forum, then it doesn't show the parent forum because the code isn't finished yet. In that case, the navigation looks like Boards name > Sub-forum name. You can see it on my website (top left corner) (http://forums.techlifezone.com)

Now I need to know how I can modify the code in such a way, that both the parent forum and the subforum are visible in the navigation?

Current wrong situation:
Boards name > current sub-forum name

Correct situation:
Boards name > parent forum name > Current sub-forum name

Lynne
06-22-2009, 03:05 PM
You can get the code vB uses from the default navbar code:
<if condition="is_array($navbits)">
<table cellpadding="0" cellspacing="0" border="0">
<tr valign="bottom">
<td><a href="#" onclick="history.back(1); return false;"><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_q]" accesskey="1">$vboptions[bbtitle]</a></span> $navbits[breadcrumb]</td>
</tr>
<tr>
<td class="navbar" style="font-size:10pt; padding-top:1px" colspan="3"><if condition="$_SERVER['REQUEST_METHOD'] == 'POST'"><img class="inlineimg" src="$stylevar[imgdir_misc]/navbits_finallink_$stylevar[textdirection].gif" alt="" border="0" /><else /><a href="$navbar_reloadurl"><img class="inlineimg" src="$stylevar[imgdir_misc]/navbits_finallink_$stylevar[textdirection].gif" alt="$vbphrase[reload_this_page]" border="0" /></a></if> <strong>$navbits[lastelement]</strong></td>
</tr>
</table>
<else />
<div class="navbar" style="font-size:10pt"><a href="$vboptions[forumhome].php$session[sessionurl_q]" accesskey="1"><img class="inlineimg" src="$stylevar[imgdir_misc]/navbits_start.gif" alt="" border="0" /></a> <strong>$vboptions[bbtitle]</strong></div>
</if>

Speedy2000
06-22-2009, 03:25 PM
Thanks that's working. There's only one issue: The hyperlinks are blue, and when I put my mouse over it, it turns white (just like the background). Is there any way to make it black in the navigation (always, not just on mouseover) ?

--------------- Added 1245690553 at 1245690553 ---------------

Never mind, I fixed it.

1. Put this in each hyperlink between the a and href:
style="color:black;
2. Do the same for the hyperlink in navbar_link

Thanks for the help :)