Jakeman
08-17-2002, 06:50 AM
Christophe_O says:
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...
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);
}
$threadinfo=getthreadinfo($id);
$nav_url="showthread.php?s=$session[sessionhash]&threadid=$id";
$nav_title=$threadinfo[title];
eval("\$code .= \"".gettemplate("$templatename")."\";");
} else {
$foruminfo=getforuminfo($id);
if ($foruminfo[parentid]!=-1) {
$code=makenav($foruminfo[parentid],$idtype,1);
}
if (strlen($code)>0) {
$code.=gettemplate("nav_joiner",0);
}
$nav_url="forumdisplay.php?s=$session[sessionhash]&forumid=$id";
$nav_title=$foruminfo[title];
if ($highlightlast) {
eval("\$code .= \"".gettemplate('nav_linkon')."\";");
} else {
eval("\$code .= \"".gettemplate('nav_linkoff')."\";");
}
}
}
return $code;
}
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...
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);
}
$threadinfo=getthreadinfo($id);
$nav_url="showthread.php?s=$session[sessionhash]&threadid=$id";
$nav_title=$threadinfo[title];
eval("\$code .= \"".gettemplate("$templatename")."\";");
} else {
$foruminfo=getforuminfo($id);
if ($foruminfo[parentid]!=-1) {
$code=makenav($foruminfo[parentid],$idtype,1);
}
if (strlen($code)>0) {
$code.=gettemplate("nav_joiner",0);
}
$nav_url="forumdisplay.php?s=$session[sessionhash]&forumid=$id";
$nav_title=$foruminfo[title];
if ($highlightlast) {
eval("\$code .= \"".gettemplate('nav_linkon')."\";");
} else {
eval("\$code .= \"".gettemplate('nav_linkoff')."\";");
}
}
}
return $code;
}