The Arcive of vBulletin Modifications Site. |
|
|
#1
|
|||
|
|||
|
I have a php website that uses a lot of MYSQL queries and data manipulation and display. I have no problem coding php in standard php pages, but I can not figure out how to wrap my php pages in the vBulletin style template (user menu, login info, ect ..). I have the 'create custom template' hack working (very basic) .. but I cant figure out the php side of things. I would preffer just coding the pages in a .php file instead of a template with plug-ins.
Please help. Thanks! |
|
#2
|
||||
|
||||
|
<a href="https://vborg.vbsupport.ru/showthread.php?t=62164" target="_blank">https://vborg.vbsupport.ru/showthread.php?t=62164</a>
|
|
#3
|
|||
|
|||
|
Thats the 'hack' I was talking about already having setup. But I cant get php code into it.
--------------- Added [DATE]1201241525[/DATE] at [TIME]1201241525[/TIME] --------------- I figured it out ![]() Code:
<?php
// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
// #################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'test'); // 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(
'TEST',
);
// pre-cache templates used by specific actions
$actiontemplates = array(
);
// ######################### REQUIRE BACK-END ############################
require_once('./global.php');
// #######################################################################
// ######################## START MAIN SCRIPT ############################
// #######################################################################
$navbits = array();
$navbits[$parent] = 'Test Page';
$navbits = construct_navbits($navbits);
eval('$navbar = "' . fetch_template('navbar') . '";');
echo $stylevar[htmldoctype]; ?>
<html dir="<?php echo $stylevar[textdirection];?>" lang="<?php echo $stylevar[languagecode];?>">
<head>
<title><?php echo $vboptions[bbtitle];?></title>
<?php echo $headinclude;?>
</head>
<body>
<?php echo $header;
echo $navbar;
echo 'I AM THE MAN!!!!!!';
echo $footer; ?>
</body>
</html>
--------------- Added [DATE]1201242875[/DATE] at [TIME]1201242875[/TIME] --------------- Ok .. actually its not quite 100%. The page title doesnt work . Need help executing the variables from the page correctly ..
|
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|