Quote:
Originally Posted by Boofo
Any sub-link you add needs to be under the navbar button you want to user it with. Like you did with the My Profile code.
|
Here's what I've got right now:
http://cl.ly/20PD
When I click the "My Profile" tab, it becomes selected and it shows the right sub-links. "Career Talk" is what I have renamed my "Forum" tab to.
When I click on the sub-link "Inbox", though, it takes the user to the private messages page, but now the "Career Talk" tab becomes selected:
http://cl.ly/20N6
And here is my code:
PHP Code:
$tabselected = '';
$tablinks = '';
$tabselected_nolog = '';
$tablinks_nolog = '';
if (THIS_SCRIPT == 'member')
{
$vbulletin->options['selectednavtab']='my_profile';
$tabselected = ' class="selected"';
$tablinks = ' <ul class="floatcontainer">
<li><a href="private.php">Inbox</a></li>
<li><a href="profile.php?do=editprofile">Edit Profile</a></li>
<li><a href="profile.php?do=editoptions">Account Settings</a></li>
<li><a href="profile.php?do=privacy">Privacy Settings</a></li>
</ul> ';
}
if (THIS_SCRIPT == 'register')
{
$vbulletin->options['selectednavtab']='sign_up';
$tabselected_nolog = ' class="selected"';
}
$userid = $vbulletin->userinfo['userid'];
if($userid == 0)
{
$template_hook['navtab_start'] .= '<li'.$tabselected_nolog.'><a class="navtab" href= "register.php">Sign Up</a>'.$tablinks_nolog.'</li>' ;
}else if($userid > 0){
$template_hook['navtab_start'] .= '<li'.$tabselected.'><a class="navtab" href= "member.php?'.$userid.'">My Profile</a>'.$tablinks.'</li>' ;
}
I'm slowly getting there, just need a push in the right direction