How to include header and footer of the forum?

your php file needs to have

Code:
require( './global.php' );

then it should eval a tempate ie:

Code:
eval( "dooutput( \"" . gettemplate( 'yourtemplatenamehere' ) . "\" );" );

then you have to create a new template ( admin cp > style options > add template ) and that template name needs to go in the eval function as in the code stated above "yourtemplatename"

then in that template for the header its

Code:
$header
and the footer is


Code:
$footer
 
here is what my wife taught me and its easy, hopefully it works for you :)

new template in style manager under the skin you want:

Code:
$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
<title>$vboptions[bbtitle]</title>
$headinclude
</head>
<body>
$header

$navbar

<table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%" align="center">
<tbody>

<tr>
<td class="tcat" colspan="5">
Title goes here


</td>
</tr>
</tbody>

<tbody id="collapseobj_forumbit_1" style="">


<tr align="center">
<td class="alt1Active" align="left" id="f4">

content here with any html coding you want.

<tr><td class="thead" style="line-height: 0; padding: 0; margin: 0;" colspan="5"><img src="http://www.yourdomainhere.com/clear.gif" alt="" width="1" height="12" /></td></tr>
</tbody>

</table>


$footer
</body>
</html>

here is the php code you will need:

Code:
<?php

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

// #################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', '[b]name of style[/b]'); // change this depending on your filename

// ################### PRE-CACHE TEMPLATES AND DATA ######################
// get special phrase groups
$phrasegroups = array(

);

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

// pre-cache templates used by all actions
$globaltemplates = array(
    '[b]name of style[/b]',
);

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

);

// ######################### REQUIRE BACK-END ############################
require_once('./global.php');

// #######################################################################
// ######################## START MAIN SCRIPT ############################
// #######################################################################

$navbits = array();
$navbits[$parent] = '[b]name of page[/b]';

$navbits = construct_navbits($navbits);
eval('$navbar = "' . fetch_template('navbar') . '";');
eval('print_output("' . fetch_template('[b]name of page[/b]') . '");');

?>
 
Back
Top