vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Programming Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=188)
-   -   How To Add Additional Links To Your Navbar (https://vborg.vbsupport.ru/showthread.php?t=118924)

24hourForum.com 12-05-2008 09:56 PM

Hi,

Quick question,

<if condition="$show[member]">link code from part one</if>

i have different membership levels and want this code to show for usergroup id: 2 and 11 to only see the link, how can i make this possible? presently all members see it

thank you

goxy63 12-11-2008 01:33 PM

I luv You Kerry-Anne
This helps me a LOT :D

Kel-D 12-11-2008 07:12 PM

Quote:

Originally Posted by MYCNCUK (Post 1542721)
The code below will give you a new navbar above and it will also look just like the other (correct borders and so on..)

This is for vB 3.7.1, change the links to what you would like them to be.

Code:

<!-- top nav links bar -->
<div class="tborder" style="padding:$stylevar[cellspacing]px; border-top-width:1px; border-bottom-width:0px">
    <table cellpadding="0" cellspacing="0" border="0" width="100%" align="center">
    <tr align="center">
        <td class="vbmenu_control"><a href="index.php?$session[sessionurl]">Home</a></td>
        <td class="vbmenu_control"><a href="online.php?$session[sessionurl]">$vbphrase[whos_online]</a></td>
        <td class="vbmenu_control"><a href="search.php?$session[sessionurl]do=getdaily">$vbphrase[todays_posts]</a></td>
        <td class="vbmenu_control"><a href="forumdisplay.php?$session[sessionurl]do=markread">$vbphrase[mark_forums_read]</a></td>
        <if condition="$show['member']">
        <td class="vbmenu_control"><a href="search.php?$session[sessionurl]do=process&showposts=0&starteronly=1&exactname=1&searchuser=$bbuserinfo[username]">My Threads</a> / <a href="search.php?$session[sessionurl]do=process&showposts=0&exactname=1&searchuser=$bbuserinfo[username]">Replies</a></td>
        <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>
        <td class="vbmenu_control"><a href="member.php?$session[sessionurl]u=$bbuserinfo[userid]">$vbphrase[my_profile]</a></td>
        </if>
        <if condition="$bbuserinfo[usergroupid] == 6">
        <td class="vbmenu_control"><a href="$admincpdir/index.php$session[sessionurl_q]">AdminCP</a></td>
        </if>
    </tr>
    </table>
</div>
<!-- / top nav links bar -->

Enjoy !

Demo: www.mycncuk.com

Works perfectly! Thanks mate! :up:

Bobbrown 01-04-2009 06:22 PM

Thanks, seem ok n 3.7.4pl1

abqtj 01-23-2009 04:50 AM

Thanks for posting this!

raja811 01-25-2009 11:34 AM

thanks

bposner 02-07-2009 09:08 PM

Where is this done. Seems simple enough but new to this code. Where are we editing this please?

Thank you

Lynne 02-07-2009 09:14 PM

Quote:

Originally Posted by bposner (Post 1737328)
Where is this done. Seems simple enough but new to this code. Where are we editing this please?

Thank you

It should be in the navbar template (Admin CP > Style & Templates > Style Manager > find your style in the list > Edit Templates from teh dropdown > Go > then expand the template list by hitting <<>> )

bposner 02-07-2009 11:25 PM

Quote:

Originally Posted by Lynne (Post 1737330)
It should be in the navbar template (Admin CP > Style & Templates > Style Manager > find your style in the list > Edit Templates from teh dropdown > Go > then expand the template list by hitting <<>> )

Lynne,
Thank you very much for your quick reply.
I actually got that far before :) but didn't know what file/template to go to to actually list the code. :confused: I see the Navigation/Breadcrumb Templates and a list of four selections, but then I can't find what I'm look for .. I am in the right place, yes?
I am trying to do a simple thing, the sytle seems to have removed the "Forum" or Forum Display link to list all the forums and just trying to get it back

Thank you for your time
Bill

Lynne 02-08-2009 02:58 AM

Quote:

Originally Posted by bposner (Post 1737406)
Lynne,
Thank you very much for your quick reply.
I actually got that far before :) but didn't know what file/template to go to to actually list the code. :confused: I see the Navigation/Breadcrumb Templates and a list of four selections, but then I can't find what I'm look for .. I am in the right place, yes?
I am trying to do a simple thing, the sytle seems to have removed the "Forum" or Forum Display link to list all the forums and just trying to get it back

Thank you for your time
Bill

Do you see a template called 'navbar' under the Navigation /Breadcrumb templates? That is the template you need to modify for the navigation bar. If you have another style, it could be that they don't have the navigation in the navbar template. In that case, you need to figure out which template they put them in. To find the template, do this - vboptions > General Settings > Add Template Name in HTML Comments > set to Yes . Then go back to your page and view the source code and you will see the name of the template called around your part of the code. Sometimes the template is the one mentioned at the very top of the page source.


All times are GMT. The time now is 07:48 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02102 seconds
  • Memory Usage 1,744KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete