HMBeaty
05-18-2009, 06:29 AM
Referring to this (https://vborg.vbsupport.ru/showthread.php?t=62164) thread, close to the bottom of the first post, where you should be able to "create your own pages 'within' current vBulletin files" by using
if ($_REQUEST['do'] == 'xxx')
{
eval('print_output("' . fetch_template('TEMPLATE_XXX') . '");');
}
Is this code still correct?
I've got my code just how it says yet it isn't taking me to the "new" page, it just stays at the same page.
I've got 75+ more templates to do and I definately don't want to code 75+ more .php files along with it.
The code I have is as follows:
<?php
// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
// #################### DEFINE IMPORTANT CONSTANTS #######################
define('THIS_SCRIPT', 'originalpage');
// ################### 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('usml_originalpage');
// pre-cache templates used by specific actions
$actiontemplates = array();
// ######################### REQUIRE BACK-END ############################
require_once('./global.php');
// ################################################## #####################
// ######################## START MAIN SCRIPT ############################
// ################################################## #####################
$navbits = array();
$navbits[$parent] = 'More text';
$navbits = construct_navbits($navbits);
eval('$navbar = "' . fetch_template('navbar') . '";');
eval('print_output("' . fetch_template('usml_originalpage') . '");');
if ($_REQUEST['do'] == 'newpage')
{
eval('print_output("' . fetch_template('usml_newpage') . '");');
}
?>
if ($_REQUEST['do'] == 'xxx')
{
eval('print_output("' . fetch_template('TEMPLATE_XXX') . '");');
}
Is this code still correct?
I've got my code just how it says yet it isn't taking me to the "new" page, it just stays at the same page.
I've got 75+ more templates to do and I definately don't want to code 75+ more .php files along with it.
The code I have is as follows:
<?php
// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
// #################### DEFINE IMPORTANT CONSTANTS #######################
define('THIS_SCRIPT', 'originalpage');
// ################### 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('usml_originalpage');
// pre-cache templates used by specific actions
$actiontemplates = array();
// ######################### REQUIRE BACK-END ############################
require_once('./global.php');
// ################################################## #####################
// ######################## START MAIN SCRIPT ############################
// ################################################## #####################
$navbits = array();
$navbits[$parent] = 'More text';
$navbits = construct_navbits($navbits);
eval('$navbar = "' . fetch_template('navbar') . '";');
eval('print_output("' . fetch_template('usml_originalpage') . '");');
if ($_REQUEST['do'] == 'newpage')
{
eval('print_output("' . fetch_template('usml_newpage') . '");');
}
?>