PDA

View Full Version : help with navigation


Winterworks
03-22-2009, 06:21 PM
I never understood the navigation and how to code it really.

<!-- nav buttons bar -->
<div class="tborder" style="padding:$stylevar[cellspacing]px; border-top-width:0px">
<table cellpadding="0" cellspacing="0" border="0" width="100%" align="center">
<tr align="center">
<if condition="$show['member']">
<td class="vbmenu_control"><a href="usercp.php$session[sessionurl_q]">$vbphrase[user_cp]</a></td>
</if>
<if condition="$show['registerbutton']">
<td class="vbmenu_control"><a href="register.php$session[sessionurl_q]" rel="nofollow">$vbphrase[register]</a></td>
</if>
$template_hook[navbar_buttons_left]

<if condition="$show['popups']">



<td class="vbmenu_control"><a href="shop.php">Shop</a></td>

<if condition="$show['communitylink'] AND $show['popups']">
<td class="vbmenu_control"><a id="community" href="$show[nojs_link]#community" rel="nofollow" accesskey="6">$vbphrase[community]</a> <script type="text/javascript"> vbmenu_register("community"); </script></td>
<else />

<if condition="$show['quick_links_groups']">
<td class="vbmenu_control"><a href="group.php?$session[sessionurl]">$vbphrase[social_groups]</a></td>
</if>
</if>

<if condition="$show['member']">
<td class="vbmenu_control"><a id="usercptools" href="$show[nojs_link]#usercptools" accesskey="3">$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_q]" 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 />

</if>
</if>
<td class="vbmenu_control"><a href="forumdisplay.php?$session[sessionurl]do=markread" rel="nofollow">$vbphrase[mark_forums_read]</a></td>
<if condition="$show['member']">
<td class="vbmenu_control"><a href="#" onclick="window.open('misc.php?$session[sessionurl]do=buddylist&amp;focus=1','buddylist','statusbar=no,me nubar=no,toolbar=no,scrollbars=yes,resizable=yes,w idth=250,height=300'); return false;">$vbphrase[open_contacts]</a></td>
</if>
</if>
$template_hook[navbar_buttons_right]
<if condition="$show['member']">
<td class="vbmenu_control"><a href="login.php?$session[sessionurl]do=logout&amp;logouthash=$bbuserinfo[logouthash]" onclick="return log_out('$vbphrase[sure_you_want_to_log_out]')">$vbphrase[log_out]</a></td>
</if>
</tr>
</table>
</div>
<!-- / nav buttons bar -->

That's my navigation. I want to re-code it so that..

When a user is logged out, they see the links...

Register and Community v

(the v meaning a drop down)

When a user is logged in, they see the links...

User CP and Community v and Quick Links v and Log Out

And in the Quick Links drop-down, have whatever's in it already, and in the Community drop-down, have...

Social Groups and Pictures & Albums and Contacts & Friends and Members List and Shop and Coins (just link them to anywhere)

Can anyone make this change for me? Would be MUCH appreciated!

tipoboy
03-22-2009, 06:47 PM
the links you want to show to your logged in/registered members wrap in this if statement:

<if condition="$show['member']">
link you want to show to registered/ logged in member
</if>


the links you want to show to logged out/ unregistered members wrap in this if statement:


<if condition="$show['registerbutton']">
link you want logged out unregistered members to see
</if>


- dave :D

Winterworks
03-22-2009, 06:48 PM
the links you want to show to your logged in/registered members wrap in this if statement:

<if condition="$show['member']">
link you want to show to registered/ logged in member
</if>


the links you want to show to logged out/ unregistered members wrap in this if statement:


<if condition="$show['registerbutton']">
link you want logged out unregistered members to see
</if>


- dave :D

Hmm, okay, thank you.

What about the drop-down menus? How can you change what's in them?

tipoboy
03-22-2009, 07:00 PM
near the bottom of your navbar template you will find the links that are in the drop down menu's, usually between <!-- navbar popup menus --> comments find the links you want to hide and wrap the links around them, if you still have problems post your entire navbar template here and i'll try to help you :D

Winterworks
03-22-2009, 07:16 PM
I did it. Thank you so much. :)

My navigation bar is a lot cleaner now.

tipoboy
03-22-2009, 07:21 PM
no problem :D