vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Integrating a PHP script with VBulletin - how to call VB skin as header and footer? (https://vborg.vbsupport.ru/showthread.php?t=68125)

fonzerelli_79 08-08-2004 04:52 PM

Integrating a PHP script with VBulletin - how to call VB skin as header and footer?
 
currently for non-standard vb3 pages im using this code (my links page as an example)

PHP Code:

<?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:

PHP Code:

$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:)


All times are GMT. The time now is 05:09 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.01031 seconds
  • Memory Usage 1,727KB
  • 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_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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