vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   how to modify $navbar (https://vborg.vbsupport.ru/showthread.php?t=45040)

larryd 10-26-2002 11:06 PM

how to modify $navbar
 
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..

larryd 10-26-2002 11:17 PM

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?

Erwin 10-27-2002 02:21 AM

If you are making a whole new template for this, just remove the $navbar variable from the template, and hardcode it in that template using HTML.

For example, replace $navbar with this:

Code:

<table border="0" width="100%" cellpadding="0" cellspacing="0">
  <tr>
    <td width="100%"><br>
    <normalfont><b><a href="index.php?s=$session[sessionhash]">$bbtitle</a>
      &gt; <a href="partsreview.php?s=$session[sessionhash]">Parts Review</a></b></normalfont></td>
  </tr>
</table>

I'm not sure if that's what you're looking for.


All times are GMT. The time now is 07:00 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01079 seconds
  • Memory Usage 1,720KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete