razec
01-03-2010, 04:06 AM
I have some PHP-based forms that I would like to include with VB4. I want to make sure that the following applies:
1. The scripts interact with vBulletin's configuration (mainly to access the same database information, and to be able to determine if the user is logged in), and
2. they need to use the same styling and heading as the CMS.
I've installed VB4 in the root of my website, so going to http://www.mysite.com/, which is located at /home/content/myuser/html on my server. For starters, I just created a simple script to test this:
<?
define('CWD', '/home/content/myuser/html');
include(CWD . '/includes/init.php');
include(CWD. '/includes/class_dm.php');
global $db, $vbulletin;
echo '<p>Your user ID: ' . $vbulletin->userinfo['userid'] . '</p>';
?>
The browser output of this is:
VB_AREA and THIS_SCRIPT must be defined to continue
What am I doing wrong here? Also, since I'm planning ahead, how can I have my scripts build the standard page header used by the CMS/forums (the welcome/notifications/my profile/etc with the site logo)?
1. The scripts interact with vBulletin's configuration (mainly to access the same database information, and to be able to determine if the user is logged in), and
2. they need to use the same styling and heading as the CMS.
I've installed VB4 in the root of my website, so going to http://www.mysite.com/, which is located at /home/content/myuser/html on my server. For starters, I just created a simple script to test this:
<?
define('CWD', '/home/content/myuser/html');
include(CWD . '/includes/init.php');
include(CWD. '/includes/class_dm.php');
global $db, $vbulletin;
echo '<p>Your user ID: ' . $vbulletin->userinfo['userid'] . '</p>';
?>
The browser output of this is:
VB_AREA and THIS_SCRIPT must be defined to continue
What am I doing wrong here? Also, since I'm planning ahead, how can I have my scripts build the standard page header used by the CMS/forums (the welcome/notifications/my profile/etc with the site logo)?