Log in

View Full Version : Standard script page.


flup
06-27-2005, 06:23 PM
Can somebody make a how-to on how a standard vB page looks (in mainfolder)
Just like this how-to: https://vborg.vbsupport.ru/showthread.php?t=83122

Thanks in advance.

Andreas
06-27-2005, 06:26 PM
Basicylly

<?php
// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);

// #################### DEFINE IMPORTANT CONSTANTS #######################
define('THIS_SCRIPT', 'someid');

// ################### 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 ############################
// ################################################## #####################

// Do stuff here

eval('print_output("' . fetch_template('yourmaintemplate') . '");');
?>

flup
06-27-2005, 06:27 PM
Thanks.

TrentTech
06-29-2005, 01:10 AM
What would we replace "THIS_SCRIPT" and "someid" with?

Andreas
06-29-2005, 01:12 AM
THIS_SCRIPT => THIS_SCRIPT
someid => foobar, or myscript, or TrentTech, or ...