View Full Version : Membership Question - Please Help
GregH
04-04-2005, 07:30 PM
I have a membership system set up for my website and I want to use the same member info in the forums. Can I pass a username and password to the foruml, so people are automatically logged in? Does anyone have altrernate suggestions on this?
TyleR
04-04-2005, 08:09 PM
just require the backend file (you're global.php)...
so the top of the php page you have would look like this:
// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
// #################### DEFINE IMPORTANT CONSTANTS #######################
define('THIS_SCRIPT', 'file_name_here');
define('NO_REGISTER_GLOBALS', 1);
// ################### 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 ############################
// assuming your forums folder is in a seperate direcotry than the area you have made.
require_once('../forum/global.php');
GregH
04-04-2005, 08:23 PM
I am not following what I should do here, can you please elaborate a little more for me. I am new to using V-Bulletin software.
Thank You
TyleR
04-04-2005, 08:28 PM
Alright..basically, you've got to define some variable so you dont catch any errors from your foums generic files:
// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
// #################### DEFINE IMPORTANT CONSTANTS #######################
define('THIS_SCRIPT', 'file_name_here');
define('NO_REGISTER_GLOBALS', 1);
and change define('THIS_SCRIPT', 'file_name_here'); to the actual name of your file, minus the extension (.php, .php3, etc.).
now you'll need to cache the templates your forum uses (even if you dont want to use it), otherwise, you'll also get some errors.
// ################### 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();
Then require your main file to make sure all sessions catch for this certain page and you don't get logged out:
// ######################### REQUIRE BACK-END ############################
// assuming your forums folder is in a seperate direcotry than the area you have made.
require_once('../forum/global.php');
hope this helps :)
GregH
04-04-2005, 08:41 PM
Thanks, I'll try and see if I can figure this out.
CarterStClair
04-04-2005, 09:47 PM
I'm confused...I have a user logged into the site using our own session variables. How does my site interact with the board using your method? You are giving instructions on how to include a file, right? But what about interfacing with the login system?
Thanks.
GregH
04-05-2005, 01:07 PM
TanK DaWg
Anything on his comment/question?
Thanks
TyleR
04-05-2005, 03:53 PM
two login systems that set different cookies won't interact 'friendly' per-say..once you enter the zone for one of the login-areas, the other will more than likely log you out thinking that the cookie is now gone (as it was now taken for the other login system...the one you are viewing)..it would be much wiser to just integrate vB's login with the current one you have.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.