Version: , by larryd
Developer Last Online: Jun 2011
Version: Unknown
Rating:
Released: 10-26-2002
Last Update: Never
Installs: 0
No support by the author.
Ok Im creating a new set of templates to make an addition to my forums but make it look completely seperate from my forums. Its a parts review database which uses the same database as the forums but its a hidden forum and the entire look of it is different so Im changing almost everything from forumdisplay.php to partsreview.php and making ALOT of new templates. Im having a problem though in that Im caught up on the navigation bar at the top of the screen.
Somehow someway the template $navbar which creates the navigation bar at the top defaults to use the file forumdisplay.php , I need to change that file to partsreview.php or actually need to create another template called partsreview_navbar and have it use the other file. Simple youd think but there is no mention of the file name forumdisplay.php in the $navbar template. The only thing is mentions is $navbits which I cant figure out for the life of me what that is or where its made up.
Can someone please shed some light over here and let me know..
ok now I feel like an idiot.. I did a search and found a bunch of info.. appears navbits is made up in the functions.php file which you will find forumdisplay.php.. I would just change the file name their but I still use forumdisplay.php so what I need to do is make a new function which does the same thing as
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);
}
$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);
}
//MOVED DOWN
// if (strlen($code)>0) {
// $code.=gettemplate("nav_joiner",0);
// }
//MOVED DOWN
$nav_url="forumdisplay.php?s=$session[sessionhash]&forumid=$id";
$nav_title=$foruminfo[title];
}
and title it something different ie) partsreview_makenav and then change where it calls that function in partsreview to the new name.. i think it makes sense.. do i got it right?