Log in

View Full Version : modding the navbar


invitezone
04-01-2008, 07:43 PM
can someone tell me how i make changes to the navbar?

i have a customised style and have removed all other styles including all the default ones.
now the navbar links should look like this

User CP / FAQ / members list / calendar / new posts / search / quick links / log out

all the links are there and are working correctly but the text saying

'members list'
'new posts'
'quicklinks'

is not there. These links do work, its just that there it no text saying what the link is to.
Can someone tell me how i make changes to the navbar as i am new to making forums. I am sure i have to edit the navbar template code in someway but im not sure how.
I thought i would search the navbar tenplate for calendar as that link text shows up fine and maybe i could see where that was and work it out from there. But I could'nt find it.

So i am now stuck.

Boofo
04-01-2008, 07:58 PM
Look for the phrases that should be connected to those.

invitezone
04-01-2008, 08:25 PM
sorry what do you mean? the php filenames that they link to?

Lynne
04-01-2008, 08:57 PM
Look in your navbar template. Do you have a line like this:
<a href="$vboptions[bburl]/memberlist.php$session[sessionurl_q]">$vbphrase[members_list]</a>

That is the link to the memberlist page and the text is from a phrase called "members_list". So, go into Admin CP > Language & Phrases > Search in Phrases > put in "members_list" and click next to Phrase Variable Name Only and hit find. See what is in there.

Boofo
04-01-2008, 09:01 PM
Thank you, Lynne. I should have explained it better, sorry.

Lynne
04-01-2008, 09:09 PM
Thank you, Lynne. I should have explained it better, sorry.
Sometimes you never know exactly what to say that will ring the bell for someone. Who knows if I clarified it better, or just confused him more! :eek:

invitezone
04-01-2008, 09:20 PM
ahh i see there is a seperate template called phrases that i need to edit.

yes that is clarified better lol.

thanks for your help both of you i will go and try that now

Boofo
04-01-2008, 09:34 PM
Sometimes you never know exactly what to say that will ring the bell for someone. Who knows if I clarified it better, or just confused him more! :eek:

Yes, but you do it with such style and grace. Not like my clumsy attempts. ;)

invitezone
04-01-2008, 10:57 PM
i went to the navbar template and i cant even find members.php when i search it.

any other suggestions?

cheat-master30
04-01-2008, 11:18 PM
Then it's probably not even there, so add it. Something like this for memberlist:

<td class="vbmenu_control"><a href="memberlist.php">Member List</a></td>

invitezone
04-02-2008, 12:08 AM
but the link works, i just dont see the text

SEOvB
04-02-2008, 12:28 AM
i went to the navbar template and i cant even find members.php when i search it.

any other suggestions?

search for memberlist.php instead?

Boofo
04-02-2008, 12:30 AM
I think he needs to search for the phrase for the memberlist in the navbar.

Lynne
04-02-2008, 02:37 AM
Instead of everyone guess what you have in your navbar, maybe you can just copy/paste the contents here and we can help you out.

Boofo
04-02-2008, 02:48 AM
LOL The voice of reason. I was hoping to win a prize if I guessed right. ;)

invitezone
04-02-2008, 01:37 PM
yes sorry i should have done this in the first place

NavBar template

<div class="spacer"></div>
<div class="spacer"></div>

<!-- breadcrumb, login, pm info -->
<table class="vb_navbar" 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); 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="smallfont"><a href="$vboptions[forumhome].php$session[sessionurl_q]" accesskey="1">$vboptions[bbtitle]</a></span> $navbits[breadcrumb]</td>
</tr>
<tr>
<td class="smallfont" 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="$scriptpath"><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="smallfont" 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>
</td>

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

<td class="alt2" valign="top" nowrap="nowrap">
<div class="smallfont">
<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_q]">$vbphrase[private_messages_nav]</phrase></if>
<if condition="$show['pmwarning']"><br /><strong><phrase 1="$vbphrase[pmpercent_nav_compiled]">$vbphrase[your_pm_box_is_x_full]</phrase></strong></if>
</div>
</td>

<else />

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

<!-- login form -->
<form action="login.php?do=login" method="post" onsubmit="md5hash(vb_login_password, vb_login_md5password, vb_login_md5password_utf, $show[nopasswordempty])">
<script type="text/javascript" src="clientscript/vbulletin_md5.js?v=$vboptions[simpleversion]"></script>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
<tr>
<td class="smallfont"><label for="navbar_username">$vbphrase[username]</label></td>
<td><input type="text" class="bginput" style="font-size: 11px" name="vb_login_username" id="navbar_username" size="10" accesskey="u" tabindex="101" 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="103" id="cb_cookieuser_navbar" accesskey="c" />$vbphrase[remember_me]</label></td>
</tr>
<tr>
<td class="smallfont"><label for="navbar_password">$vbphrase[password]</label></td>
<td><input type="password" class="bginput" style="font-size: 11px" name="vb_login_password" id="navbar_password" size="10" tabindex="102" /></td>
<td><input type="submit" class="button" value="$vbphrase[log_in]" tabindex="104" 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="vb_login_md5password" />
<input type="hidden" name="vb_login_md5password_utf" />
</form>
<!-- / login form -->

</td>

</if>

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

<div class="spacer"></div>

<if condition="$show['forumdesc']">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="alt1" width="100%"><strong>$foruminfo[title]</strong> <span class="smallfont">$foruminfo[description]</span></td>
</tr>
</table>
<br />
</if>

<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?do=process" method="post">
<input type="hidden" name="do" value="process" />
<input type="hidden" name="quicksearch" value="1" />
<input type="hidden" name="childforums" value="1" />
<input type="hidden" name="exactname" value="1" />
<input type="hidden" name="s" value="$session[sessionhash]" />
<div><input type="text" class="bginput" name="query" size="25" tabindex="1001" /><input type="submit" class="button" value="$vbphrase[go]" tabindex="1004" /></div>
<div style="margin-top:$stylevar[cellpadding]px">
<label for="rb_nb_sp0"><input type="radio" name="showposts" value="0" id="rb_nb_sp0" tabindex="1002" checked="checked" />$vbphrase[show_threads]</label>
&nbsp;
<label for="rb_nb_sp1"><input type="radio" name="showposts" value="1" id="rb_nb_sp1" tabindex="1003" />$vbphrase[show_posts]</label>
</div>
</form>
</td>
</tr>
<tr>
<td class="thead">$vbphrase[nav_search_options]</td>
</tr>
<tr>
<td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=getnew">$vbphrase[nav_new_posts]</a></td>
</tr>
<tr>
<td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=getdaily">$vbphrase[nav_todays_posts]</a></td>
</tr>

<tr>
<td class="vbmenu_option"><a href="search.php$session[sessionurl_q]" accesskey="4" rel="nofollow">$vbphrase[advanced_search]</a></td>
</tr>
$template_hook[navbar_search_menu]
</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">
<td class="vbmenu_control"><a href="arcade.php?$session[sessionurl_q]">Arcade</a></td>
<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=getdaily">$vbphrase[todays_posts]</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,me nubar=no,toolbar=no,scrollbars=yes,resizable=yes,w idth=250,height=300'); return false;">$vbphrase[open_buddy_list]</a></td></tr>
$template_hook[navbar_quick_links_menu_pos1]
<tr><td class="thead"><a href="usercp.php$session[sessionurl_q]">$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>
$template_hook[navbar_quick_links_menu_pos2]
<tr><td class="thead">$vbphrase[miscellaneous]</td></tr>
<if condition="$show['pmmainlink']"><tr><td class="vbmenu_option"><a href="private.php$session[sessionurl_q]" rel="nofollow">$vbphrase[private_messages]</a></td></tr></if>
<tr><td class="vbmenu_option"><a href="subscription.php$session[sessionurl_q]" rel="nofollow">$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_q]">$vbphrase[whos_online]</a></td></tr></if>
$template_hook[navbar_quick_links_menu_pos3]
</table>
</div>
<!-- / user cp tools menu -->
</if>
<!-- / NAVBAR POPUP MENUS -->

<!-- PAGENAV POPUP -->

<div class="vbmenu_popup" id="pagenav_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td class="thead" nowrap="nowrap">$vbphrase[go_to_page]</td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite">
<form action="$vboptions[forumhome].php" method="get" onsubmit="return this.gotopage()" id="pagenav_form">
<input type="text" class="bginput" id="pagenav_itxt" style="font-size:11px" size="4" />
<input type="button" class="button" id="pagenav_ibtn" value="$vbphrase[go]" />
</form>
</td>
</tr>
</table>
</div>

<!-- / PAGENAV POPUP -->
</if>

Lynne
04-02-2008, 03:24 PM
Your navbar is actually not defined in the navbar template.

Go to vboptions > General Settings and turn on the option to put the Template Name in the HTML source code. Then, go back to your page and view the page source (control + u maybe on a PC?) Then search for part of the navbar and see what template it appears in. That is the code we need to see.

invitezone
04-02-2008, 03:58 PM
ok this is the bit your after i think.
looking at it i can see after "calender.php" there is "Calender"
but after "memberlist.php" there is nothing so i am guessing this is where my problem is.
I would also hazard a guess that this info is held in a template called "css_nav", i i cant find that template. maybe i not right though im not sure.



<!-- nav buttons bar -->

<table cellpadding="0" cellspacing="0" border="0" align="left" class="vb_navigation">
<tr align="center">

<td width="78" height="34" class="css_nav"><a href="usercp.php">User CP</a></td>



<!-- <td width="78" height="34" class="css_nav"><a href="project.php"></a></td> -->
<td width="78" height="34" class="css_nav"><a href="faq.php" accesskey="5">FAQ</a></td>
<td width="78" height="34" class="css_nav"><a href="memberlist.php"></a></td>
<td width="78" height="34" class="css_nav"><a href="calendar.php">Calendar</a></td>




<td width="78" height="34" class="css_nav"><a href="search.php?do=getnew" accesskey="2"></a></td>

<td id="navbar_search" width="78" height="34" class="css_nav"><a href="search.php" accesskey="4" rel="nofollow">Search</a> <script type="text/javascript"> vbmenu_register("navbar_search", 1); </script></td>


<td id="usercptools" width="78" height="34" class="css_nav"><a href="/index.php?nojs=1#usercptools"></a> <script type="text/javascript"> vbmenu_register("usercptools", 1); </script></td>




<td width="78" height="34" class="css_nav"><a href="login.php?do=logout&amp;logouthash=3b0a0ae97f69dd9986f 0582d5632f55f" onclick="return log_out('Are you sure you want to log out?')">Log Out</a></td>

<td width="8" height="34" align="left"><img src="images/greenfox/misc/nav_final.gif" width="8" height="34" alt="" border="0" /></td>
</tr>

</table>

<!-- / nav buttons bar -->

Lynne
04-02-2008, 04:39 PM
You need to do as I suggested and turn on the option to put the Template Name in the HTML code. We need to know that Template Name so you can find it and post the contents and then we can help you. If you can't find the template, then we can't help you. And no, it has nothing to do with "css_nav", that is just the css class. However, you might be able to do a search in your templates for "css_nav" and that might help you find the template if you aren't going to turn on the option to put the name in the source code.

invitezone
04-02-2008, 06:55 PM
Your navbar is actually not defined in the navbar template.

Go to vboptions > General Settings and turn on the option to put the Template Name in the HTML source code. Then, go back to your page and view the page source (control + u maybe on a PC?) Then search for part of the navbar and see what template it appears in. That is the code we need to see.

well i did that and posted what i thought you asked for but now here is the full source not just the section i thought you wanted.

Lynne
04-02-2008, 07:06 PM
Well, you are giving me the source code. I wanted to see the template. You were supposed to get the template name out of the source code and then post that template. However, seeing the full source code allowed me to find the template name myself, it is the header template. So, you need to post the header template here for us to see what is going on with your links.

invitezone
04-02-2008, 07:25 PM
ok sorry about, i am new to all this.
Is this right?


<!-- logo -->
<a name="top"></a>
<div class="side_borders">
<table border="0" width="$stylevar[outertablewidth]" cellpadding="0" cellspacing="0" align="center" class="tborder">
<tr>
<td align="center" valign="top">

<table border="0" width="100%" cellpadding="0" cellspacing="0" align="center">
<tr class="header_bg">
<td align="$stylevar[left]" valign="middle"><a href="$vboptions[forumhome].php$session[sessionurl_q]"><img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" /></a></td>


<td align="$stylevar[right]">
&nbsp;
<!-- banners --></td>


</tr>
<tr>
<td height="34" colspan="2" class="vb_navigation">

<!-- nav buttons bar -->

<table cellpadding="0" cellspacing="0" border="0" align="left" class="vb_navigation">
<tr align="center">
<if condition="$show['member']">
<td width="78" height="34" class="css_nav"><a href="usercp.php$session[sessionurl_q]">$vbphrase[user_cp]</a></td>
</if>
<if condition="$show['registerbutton']">
<td width="78" height="34" class="css_nav"><a href="register.php$session[sessionurl_q]" rel="nofollow">$vbphrase[register]</a></td>
</if>
$template_hook[navbar_buttons_left]
<!-- <td width="78" height="34" class="css_nav"><a href="project.php$session[sessionurl_q]">$vbphrase[projects]</a></td> -->
<td width="78" height="34" class="css_nav"><a href="faq.php$session[sessionurl_q]" accesskey="5">$vbphrase[faq]</a></td>
<td width="78" height="34" class="css_nav"><a href="memberlist.php$session[sessionurl_q]">$vbphrase[vb_members_list]</a></td>
<td width="78" height="34" class="css_nav"><a href="calendar.php$session[sessionurl_q]">$vbphrase[calendar]</a></td>
<if condition="$show['popups']">
<if condition="$show['searchbuttons']">
<if condition="$show['member']">
<td width="78" height="34" class="css_nav"><a href="search.php?$session[sessionurl]do=getnew" accesskey="2">$vbphrase[vb_new_posts_nav]</a></td>
<else />
<td width="78" height="34" class="css_nav"><a href="search.php?$session[sessionurl]do=getdaily" accesskey="2">$vbphrase[vb_todays_posts]</a></td>
</if>
<td id="navbar_search" width="78" height="34" class="css_nav"><a href="search.php$session[sessionurl_q]" accesskey="4" rel="nofollow">$vbphrase[search]</a> <if condition="$show['quicksearch']"><script type="text/javascript"> vbmenu_register("navbar_search", 1); </script></if></td>
</if>
<if condition="$show['member']">
<td id="usercptools" width="78" height="34" class="css_nav"><a href="$show[nojs_link]#usercptools">$vbphrase[vb_quick_links]</a> <script type="text/javascript"> vbmenu_register("usercptools", 1); </script></td>
</if>
<else />
<if condition="$show['searchbuttons']">
<td width="78" height="34" class="css_nav"><a href="search.php$session[sessionurl_q]" accesskey="4">$vbphrase[search]</a></td>
<if condition="$show['member']">
<td width="78" height="34" class="css_nav"><a href="search.php?$session[sessionurl]do=getnew" accesskey="2">$vbphrase[new_posts_nav]</a></td>
<else />
<td width="78" height="34" class="css_nav"><a href="search.php?$session[sessionurl]do=getdaily" accesskey="2">$vbphrase[todays_posts]</a></td>
</if>
</if>
<td width="78" height="34" class="css_nav"><a href="forumdisplay.php?$session[sessionurl]do=markread" rel="nofollow">$vbphrase[mark_forums_read]</a></td>
<if condition="$show['member']">
<td width="78" height="34" class="css_nav"><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_buddy_list]</a></td>
</if>
</if>
$template_hook[navbar_buttons_right]
<if condition="$show['member']">
<td width="78" height="34" class="css_nav"><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>
<td width="8" height="34" align="left"><img src="$stylevar[imgdir_misc]/nav_final.gif" width="8" height="34" alt="" border="0" /></td>
</tr>
</table>

<!-- / nav buttons bar -->
</td></tr>
</table>
<!-- /logo -->

<!-- content table -->
$spacer_open

$_phpinclude_output

Lynne
04-02-2008, 07:44 PM
OK, now we are getting somehwhere. I will show you what to do with the memberlist one and I'm sure it is similar for the others.

Here is the line in the code for the memberlist:
<td width="78" height="34" class="css_nav"><a href="memberlist.php$session[sessionurl_q]">$vbphrase[vb_members_list]</a></td>

See how it calls the phrase "vb_members_list"? You need to Search in Phrases for that variable (Languages & Phrases > Search in Phrases > enter phrase name in top box > check Phrase Variable Name Only and hit Find) The phrase will come up, hit Edit and change the name to whatever you want. Alternately, change that phrase to "$vbphrase[members_list]" which is the default vbulletin phrase and it should work.

Find each of the terms you are missing, search for the phrase and edit it and you should have it working.

invitezone
04-02-2008, 07:46 PM
ok thanks very much for your help and your patience.
I will go and try it now and report back how i get on.

--------------- Added 1207169473 at 1207169473 ---------------

lol yeah i see how to di it now and i see what the problem was.
I couldn't find a template called vb_members_list so it was obviously trying to call a template that wasn't there. I have changed it to the default as you suggested and is now perfect.


thanks very much for your helpful and sppedy answers.

--------------- Added 1207170442 at 1207170442 ---------------

sorry 1 more thing

how do i change it for new posts link and the quicklinks menu?
i thought i would be able to figure it out myself but those 2 are a bit more complicated.