vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   How do I activate nav tabs on custom pages? (https://vborg.vbsupport.ru/showthread.php?t=271749)

mikeee 10-10-2011 04:48 AM

How do I activate nav tabs on custom pages?
 
I'm using the code below for my custom pages. It works great, however, I cant figure out how to activate the tabs that I just added for these pages. Any help would be greatly appreciated!

Here is the code:

PHP Code:

<?php
/*======================================================================*\
|| #################################################################### ||
|| # vBulletin 4.0.8
|| # ---------------------------------------------------------------- # ||
|| # Copyright ?2000-2010 vBulletin Solutions Inc. All Rights Reserved. ||
|| # This file may not be redistributed in whole or significant part. # ||
|| # ---------------- VBULLETIN IS NOT FREE SOFTWARE ---------------- # ||
|| # http://www.vbulletin.com | http://www.vbulletin.com/license.html # ||
|| #################################################################### ||
\*======================================================================*/

/**
 * If you want to move this file to the root of your website, change this
 * line to your vBulletin directory and uncomment it (delete the //).
 *
 * For example, if vBulletin is installed in '/forum' the line should
 * state:
 *
 *    define('VB_RELATIVE_PATH', 'forum');
 *
 * Note: You may need to change the cookie path of your vBulletin
 * installation to enable your users to log in at the root of your website.
 * If you move this file to the root of your website then you should ensure
 * the cookie path is set to '/'.
 *
 * See 'Admin Control Panel
 *    ->Cookies and HTTP Header Options
 *      ->Path to Save Cookies
 */

//define('VB_RELATIVE_PATH', 'forums');


// Do not edit.
if (defined('VB_RELATIVE_PATH'))
{
    
chdir('./' VB_RELATIVE_PATH);
}


/**
 * You can choose the default script here.  Uncomment the appropriate line
 * to set the default script.  Note: Only uncomment one of these, you must
 * add // to comment out the script(s) that you DO NOT want to use as your
 * default script.
 *
 * You can choose the default script even if you do not plan to move this
 * file to the root of your website.
 */



// ####################### SET PHP ENVIRONMENT ########################### 
error_reporting(E_ALL & ~E_NOTICE); 

// #################### DEFINE IMPORTANT CONSTANTS ####################### 

define('THIS_SCRIPT'"page");     // change this so you can use other conditionals like "THIS_PAGE" != "home" etc.. in other, real templates.
define('CSRF_PROTECTION'false);   // turn on for token layer security


// ################### PRE-CACHE TEMPLATES AND DATA ###################### 

// cache any templates you want  to use for this mod .

// get special phrase groups 
$phrasegroups = array(); 

// get special data templates from the datastore 
$specialtemplates = array(); 

// pre-cache templates used by all actions 
$globaltemplates = array(''
); 

// pre-cache templates used by specific actions 
$actiontemplates = array(); 

// ######################### REQUIRE BACK-END ############################ 
// if your page is outside of your normal vb forums directory, you should change directories by uncommenting the next line 
// chdir ('/path/to/your/forums'); 
require_once('./global.php'); 
// ####################################################################### 
// ######################## START MAIN SCRIPT ############################ 
// ####################################################################### 

//This appears in your breadcrumbs navigation.

$navbits construct_navbits(array('' => "Page Title Goes Here")); 
$navbar render_navbar_template($navbits); 

// ###### YOUR CUSTOM CODE GOES HERE ##### 
//appears in the <title> tags in the head
$pagetitle 'My Website'

// ###### NOW YOUR TEMPLATE IS BEING RENDERED ###### 

// register your templates

$templater vB_Template::create('TEST'); 
$templater->register_page_templates(); 
$templater->register('header'$header); 
$templater->register('headinclude'$headinclude); 
$templater->register('navbar'$navbar); 
$templater->register('footer'$footer); 
$templater->register('pagetitle'$pagetitle); 
// 
//important variables, already queried and ready to use
$userid            =    $vbulletin->userinfo[userid];
$username        =    $vbulletin->userinfo[username];
$usergroup        =    $vbulletin->userinfo[usergroupid];
$avatarrevision =    $vbulletin->userinfo[avatarrevision];
//

// your own custom head and css files
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html dir="ltr" lang="en"> <head> 
'
.$headinclude.
 <title>'
.$pagetitle.'</title>  


 </head> <body> '

 
// output templates
echo $header$navbar
//content here 


Hello World!


//footer, close everything 
echo $footer
echo 
'</body></html>';
/*======================================================================*\
|| ####################################################################
|| # Downloaded: 16:53, Mon Nov 8th 2010
|| # CVS: $RCSfile$ - $Revision: 35749 $
|| ####################################################################
\*======================================================================*/

?>



All times are GMT. The time now is 01:21 PM.

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.01059 seconds
  • Memory Usage 1,752KB
  • 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
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (1)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