Mavs00
09-16-2005, 08:45 PM
First, I'm a code dummy.......
I've been attempting to follow this seemingly simple -TEMPLATE- (https://vborg.vbsupport.ru/showthread.php?t=63792&page=1&pp=15) in order to create vB template driven pages.
I think I'm struggling with calling the right variables.
I created a rules.php file in my root dir (my forum sit in root/forums). Here is where I'm at:
<?php
//+GO+TO+FORUM+DIR
chdir('./forums'); <-- Problem
//+STANDARD+VBULLETIN+STUFF
define('NO_REGISTER_GLOBALS',+1);
define('THIS_SCRIPT',+'rules'); <-- Problem
require_once('./global.php');
//+GENERIC_SHELL+VARS
$pagetitle+=+"Title+of+Page";
$HTML+=+"";+//+PIECED+TOGETHER+IN+SCRIPT
eval('$HTML+=+"'+.+fetch_template('forums/static/forum_rules')+.+'";'); <-- Problem
$navbits+=+array();+
$navbits[$parent]+=+'Meganman';+
$navbits+=+construct_navbits($navbits);+
eval('$navbar+=+"'+.+fetch_template('navbar')+.+'";');
eval('print_output("'+.+fetch_template('GENERIC_SHELL')+.+'");');
?>
I put my script in the root dir, and when I run it I get:
Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/adkhighp/public_html/rules.php on line 8
I highlight places I think may be wrong, but I'm not sure. Not sure what error message means, or how to fix it. Any help would be appreciated. Thanks
fetch_template('forums/static/forum_rules') <-- This line calls the php doc i created that I want displayed in the template.
I've been attempting to follow this seemingly simple -TEMPLATE- (https://vborg.vbsupport.ru/showthread.php?t=63792&page=1&pp=15) in order to create vB template driven pages.
I think I'm struggling with calling the right variables.
I created a rules.php file in my root dir (my forum sit in root/forums). Here is where I'm at:
<?php
//+GO+TO+FORUM+DIR
chdir('./forums'); <-- Problem
//+STANDARD+VBULLETIN+STUFF
define('NO_REGISTER_GLOBALS',+1);
define('THIS_SCRIPT',+'rules'); <-- Problem
require_once('./global.php');
//+GENERIC_SHELL+VARS
$pagetitle+=+"Title+of+Page";
$HTML+=+"";+//+PIECED+TOGETHER+IN+SCRIPT
eval('$HTML+=+"'+.+fetch_template('forums/static/forum_rules')+.+'";'); <-- Problem
$navbits+=+array();+
$navbits[$parent]+=+'Meganman';+
$navbits+=+construct_navbits($navbits);+
eval('$navbar+=+"'+.+fetch_template('navbar')+.+'";');
eval('print_output("'+.+fetch_template('GENERIC_SHELL')+.+'");');
?>
I put my script in the root dir, and when I run it I get:
Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/adkhighp/public_html/rules.php on line 8
I highlight places I think may be wrong, but I'm not sure. Not sure what error message means, or how to fix it. Any help would be appreciated. Thanks
fetch_template('forums/static/forum_rules') <-- This line calls the php doc i created that I want displayed in the template.