giorgiotave
08-02-2006, 10:44 AM
Hi all,
i make a nonVbpage with template.
I go in Add Template and Make:
Form
<body>
$header
$navbar
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
$formciao
</tr>
</table>
$footer
</body>
</html>
After i create a php page width this code
<?
// ######################### REQUIRE BACK-END ############################
chdir('/Myurl/');
require('global.php');
?>
<title>Title</title>
<head>
<link href="style.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="../../clientscript/vbulletin_global.js"></script>
<script type="text/javascript" src="../../clientscript/vbulletin_menu.js"></script>
<script type="text/javascript">
<!--
var SESSIONURL = "";
var IMGDIR_MISC = "taverniti/misc";
var vb_disable_ajax = parseInt("0", 10);
// -->
</script>
</head>
<?
// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
// #################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'GTTags'); // 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(
'Form',
);
// pre-cache templates used by specific actions
$actiontemplates = array(
);
// ################################################## #####################
// ######################## START MAIN SCRIPT ############################
// ################################################## #####################
$navbits = array();
$navbits[$parent] = 'Form';
$navbits = construct_navbits($navbits);
$navbits = construct_navbits($navbits);
eval('$navbar = "' . fetch_template('navbar') . '";');
eval('print_output("' . fetch_template('Form') . '");');
?>
In this page i want that user che inviate form to my db.
And in global_start i add
$formciao="Hi $userinfo[username]";
This for try if Vb Recognize user.
But i read only HI
Where i can add my phpcode? In global start not work :(
Giorgio
i make a nonVbpage with template.
I go in Add Template and Make:
Form
<body>
$header
$navbar
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
$formciao
</tr>
</table>
$footer
</body>
</html>
After i create a php page width this code
<?
// ######################### REQUIRE BACK-END ############################
chdir('/Myurl/');
require('global.php');
?>
<title>Title</title>
<head>
<link href="style.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="../../clientscript/vbulletin_global.js"></script>
<script type="text/javascript" src="../../clientscript/vbulletin_menu.js"></script>
<script type="text/javascript">
<!--
var SESSIONURL = "";
var IMGDIR_MISC = "taverniti/misc";
var vb_disable_ajax = parseInt("0", 10);
// -->
</script>
</head>
<?
// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
// #################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'GTTags'); // 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(
'Form',
);
// pre-cache templates used by specific actions
$actiontemplates = array(
);
// ################################################## #####################
// ######################## START MAIN SCRIPT ############################
// ################################################## #####################
$navbits = array();
$navbits[$parent] = 'Form';
$navbits = construct_navbits($navbits);
$navbits = construct_navbits($navbits);
eval('$navbar = "' . fetch_template('navbar') . '";');
eval('print_output("' . fetch_template('Form') . '");');
?>
In this page i want that user che inviate form to my db.
And in global_start i add
$formciao="Hi $userinfo[username]";
This for try if Vb Recognize user.
But i read only HI
Where i can add my phpcode? In global start not work :(
Giorgio