Version: , by Jakeman
Developer Last Online: Jul 2013
Version: Unknown
Rating:
Released: 08-17-2002
Last Update: Never
Installs: 0
No support by the author.
Christophe_O says:
Quote:
Originally posted by smachol $navbits... is in functions.php...
Am I correct in saying, then, that to modify the navbar requires PhP coding---therefore this would be a "hack" and not a template modification?
What I want to do is remove the forum category from the navbar.
I did look in functions.php, and found "$navbits=makenav" So I went farther down to "function makenav"----but well, I don't know PhP......
Well, maybe this is beyond the scope of this forum.... but anyway here is the makenav. Can someone tell me what to remove to take out the forum category from the navbar? Just copy and paste in your reply what to remove.... That is, IF this is the right function and IF it's easy for an experienced programmer to spot...
PHP Code:
function makenav($id,$idtype="forum",$highlightlast=1) {
global $DB_site,$nav_url,$nav_title,$session,$threadcache;
$code = "";
if ($id!=-1) {
if ($idtype=="thread") {
if ( !isset($threadcache["$id"]) ) {
$getforumid=$DB_site->query_first("SELECT forumid FROM thread WHERE threadid=$id");
} else {
$getforumid['forumid'] = $threadcache["$id"]['forumid'];
}
$code=makenav($getforumid['forumid'],"forum",1);
if ($highlightlast) {
$templatename="nav_linkon";
} else {
$templatename="nav_linkoff";
}
if (strlen($code)>0) {
$code.=gettemplate("nav_joiner",0);
}
function makenav($id,$idtype="forum",$highlightlast=1) {
global $DB_site,$nav_url,$nav_title,$session,$threadcache;
$code = "";
if ($id!=-1) {
if ($idtype=="thread") {
if ( !isset($threadcache["$id"]) ) {
$getforumid=$DB_site->query_first("SELECT forumid FROM thread WHERE threadid=$id");
} else {
$getforumid['forumid'] = $threadcache["$id"]['forumid'];
}
$code=makenav($getforumid['forumid'],"forum",1);
if ($highlightlast) {
$templatename="nav_linkon";
} else {
$templatename="nav_linkoff";
}
if (strlen($code)>0) {
$code.=gettemplate("nav_joiner",0);
}
A minute ago, I also happened to notice there are 2 references to a "nav_joiner"----and of course there are 2 ">" joiners in the navbar-----so I was thinking, maybe just remove most of the section above the first reference to a "nav_joiner".....
Originally posted by Christophe_O Thank you, Jake, this looks do-able.
A minute ago, I also happened to notice there are 2 references to a "nav_joiner"----and of course there are 2 ">" joiners in the navbar-----so I was thinking, maybe just remove most of the section above the first reference to a "nav_joiner".....
.......well, guess that won't do..... heh....
notice i completely commented out the original instance of:
PHP Code:
if (strlen($code)>0) {
$code.=gettemplate("nav_joiner",0);
}
make sure you comment out that one and add the one within the if statement. if the makenavbits function hasn't changed between 2.2.5 and 2.2.6 then you can just copy and paste my whole function and put in your own forumids in the if statement.
Originally posted by Boofo Is there a way to take just the thread title out of the navbar?
I have sort of the opposite question: is there a way to state ONLY the title of the current page.
I am coming along nicely with a new "framed" version of vB---I can put all necessary links into a banner frame---so I actually don't need a Navbar at all---just need a way to "name the current page..."