View Full Version : VB's user system on the front page
If I want to integrate vB's user system and my front page, what files do I need to include? If I want the user's infos, and generally use vB's db class to fetch data from the vb db (I want the vb forum in a forum directory, and the front page in the public html dir)
public_html/
public_html/forum/
Logikos
10-06-2004, 09:52 PM
Your file would look like this
<?php
// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
// #################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS', 1);
define('GET_EDIT_TEMPLATES', true);
define('THIS_SCRIPT', 'rules');
// ################### 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 ############################
// ################################################## #####################
// if user is guest show no permission error
//if (!$bbuserinfo['userid'])
//{
// print_no_permission();
//}
::YOUR CODE HERE::
eval('$navbar = "' . fetch_template('navbar') . '";');
eval('print_output("' . fetch_template('YOUR_TEMPLATE_NAME') . '");');
?>
require_once('./global.php');
What if I don't want the front page and the forum in the same directory? Use chdir()? (sounds like a good alternative to me)
And don't I need some values for $phrasegroups, $specialtemplates, $globaltemplates and $actiontemplates?
Thanks
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.