Forum Moderators: coopster
I will probably use either phpBB or Invision Board for some areas but others will be using different scripts....I don't want my users to have to register separately for each section of the site.
Oh, and I also want to be able to give them the ability to choose to receive my newsletter when they register.
By the way, although I pretty good at HTML, I am completely new to php....but I have been reading a lot.
Thanks in advance for any and all suggestions :-)
I think I would use the BB users/members table as it may have the largest amount of scripts to change if you alter it. You will then have to alter the other scripts to use that table.
i.e. i keep all information in the tables for each package, and they run as normal, however i've automatically duplicated the registrations.
if you follow me. am not sure if it's the best idea here though, the above post seems to be the most robust way to do it.
<?php
// Change this to the full path to your phpBB2 forum
$phpbb_root_path='/home/newbobbo/public_html/forum/';
/*##########################################
## STOP #
## DO NOT MODIFY ANYTHING BELOW THIS LINE #
##########################################*/
define('IN_PHPBB', true);
include($phpbb_root_path.'extension.inc');
include($phpbb_root_path.'common.'.$phpEx);
include($phpbb_root_path.'config.'.$phpEx);
// Retrieve the script path (from board config) where phpBB2 is located relative to the domain name
$sql="SELECT * FROM " . $table_prefix . "config WHERE config_name = 'script_path'";
if (!($result = $db->sql_query($sql)) )
{
die("<B>Error:</B> Could not query script_name information<BR>SQL: $sql");
}
if ($db->sql_numrows($result) == 0)
{
die("<B>Error:</B> script_name information does not exist.<BR>SQL: $sql");
}
$row = $db->sql_fetchrow($result);
$phpbb_script_path = $row[config_value];
//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
//
// If user is not logged in - redirect to the login page with this scriptname as a redirect to...
if(!$userdata['session_logged_in'] )
{
header("Location: " . append_sid($phpbb_script_path . "login." . $phpEx . "?redirect=" . $PHP_SELF));
}
// User is a registered user and have been logged in! - continue..
?>