PDA

View Full Version : Integrating a PHP script with VBulletin - how to call VB skin as header and footer?


fonzerelli_79
08-08-2004, 04:52 PM
currently for non-standard vb3 pages im using this code (my links page as an example)

<?php

// GO TO FORUM DIR
chdir('/.../whateverl');


// STANDARD VBULLETIN STUFF
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'links');
require_once('./global.php');

// GENERIC_SHELL VARS
$pagetitle = "Links";
$HTML = ""; // PIECED TOGETHER IN SCRIPT

eval('$HTML = "' . fetch_template('links') . '";');

$navbits[lastelement] = "Links";
eval('$navbar = "' . fetch_template('navbar') . '";');

eval('print_output("' . fetch_template('GENERIC_SHELL') . '");');

?>

i want to be able to call my skin as a header and footer. Im planning on adding a few scripts to the site so im simply gonna call the design using includes at the top and bottom of the php file

i dont want to call any template for the page - eg. for the links page i called the links template, but i dont want this, i want the content to remain in the file that is calling the header and footer

anyone got an idea of how to do this

any help would be greatly appreciated :)

Brad
08-08-2004, 05:01 PM
When you include global.php header and footer are generated along with all style vars. Use this within your html:

$header
$footer

fonzerelli_79
08-08-2004, 05:05 PM
ill give it a bash - thanks for the quick reply brad :)

fonzerelli_79
08-08-2004, 05:37 PM
brad - im calling it no problem and the header and footer (including the navnar) are displaying

however the navbar and parts of my header arent displaying properly.

it seems to be having problems calling classes

eg.

<tr id="cat">
<td class="thead"><normalfont color="{categoryfontcolor}"><b>Main Menu</b></normalfont> </td>
</tr>
<tr>
<td class="alt1">

which results in tables being white etc when they should be coloured

what else apart from global, header and footer should i call - is the problem because of the stylesheet - should i link directly to them

thanks :)

fonzerelli_79
08-08-2004, 07:23 PM
dont worry - i sorted it - im an idiot - lol:)