nerbert |
12-28-2014 01:10 AM |
Here's how I do it:
Create a file called experiment.php in forum root with this code:
Code:
<?php
/*======================================================================*\
|| #################################################################### ||
|| # vBulletin 4.2.2 Patch Level 1 -
|| # ---------------------------------------------------------------- # ||
|| # Copyright ?2000-2014 vBulletin Solutions Inc. All Rights Reserved. ||
|| # This file may not be redistributed in whole or significant part. # ||
|| # ---------------- VBULLETIN IS NOT FREE SOFTWARE ---------------- # ||
|| # http://www.vbulletin.com | http://www.vbulletin.com/license.html # ||
|| #################################################################### ||
\*======================================================================*/
// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
// #################### DEFINE IMPORTANT CONSTANTS #######################
define('THIS_SCRIPT', 'experiment');
define('CSRF_PROTECTION', true);
if (in_array($_GET['do'], array('whoposted', 'buddylist', 'getsmilies')))
{
define('NOPMPOPUP', 1);
}
// ################### 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();
// pre-cache templates used by specific actions
$actiontemplates = array();
// ######################### REQUIRE BACK-END ############################
require_once('./global.php');
// #######################################################################
// ######################## START MAIN SCRIPT ############################
// #######################################################################
$HTML = vB_Template::create('experiment')->render();
$navbits = array();
$navbits = construct_navbits($navbits);
$navbar = render_navbar_template(array());
$templater = vB_Template::create('GENERIC_SHELL');
$templater->register_page_templates();
$templater->register('navbar', $navbar);
$templater->register('HTML', $HTML);
print_output($templater->render());
?>
Now make a new template called "experiment" and fill in the desired html. (see above where $HTML is created from the "experiment" template).
This gets you going. I would have to do some more research for $navbits, which template group should contain "experiment" (action templates , I think).
|