kiril_cvetkov
08-03-2008, 01:20 PM
Hi. Is it ok to use a sessions in vbulletin?
Example :
1)Hook Location = Member Complete
2) I am writing in the hook the following code :
session_start();
$_SESSION['vbusername']=$prepared['username'];3)In file.php i am writinh the following code :
// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
// #################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'TEST'); // 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(
'KirilCvetkov',
);
// pre-cache templates used by specific actions
$actiontemplates = array(
);
// ######################### REQUIRE BACK-END ############################
require_once('./global.php');
//################-Code of the modification #####################
// ################################################## #####################
// ######################## START MAIN SCRIPT ############################
// ################################################## #####################
session_start();
if (isset($_SESSION['vbusername']))
{
echo $_SESSION['vbusername'];
}
?>- am getting what i want.. but that is classic PHP... can i use that on vbulletin or there is other solution there.
Cheers Kiril..
Example :
1)Hook Location = Member Complete
2) I am writing in the hook the following code :
session_start();
$_SESSION['vbusername']=$prepared['username'];3)In file.php i am writinh the following code :
// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
// #################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'TEST'); // 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(
'KirilCvetkov',
);
// pre-cache templates used by specific actions
$actiontemplates = array(
);
// ######################### REQUIRE BACK-END ############################
require_once('./global.php');
//################-Code of the modification #####################
// ################################################## #####################
// ######################## START MAIN SCRIPT ############################
// ################################################## #####################
session_start();
if (isset($_SESSION['vbusername']))
{
echo $_SESSION['vbusername'];
}
?>- am getting what i want.. but that is classic PHP... can i use that on vbulletin or there is other solution there.
Cheers Kiril..