coppermine-gallery.com/forum

Support => cpg1.3.x Support => Older/other versions => cpg1.3 (BBS) Integration / Bridging => Topic started by: huwb on June 05, 2005, 12:17:13 PM

Title: Loging into coppermine after SMF integration
Post by: huwb on June 05, 2005, 12:17:13 PM
After hours of trying to search through my files and sorting it out on my own, I still have a problem, I have looked through the support forum and can find other problems but not identical to mine.

I have integrated coppermine with my smf forum, but when i log into coppermine, I go to the forum log in (which I understand is quite normal, but then when I go to the gallery section it does not let me view my admin profile, but prompts me to log in again. I looked on the SMF support forum and in there I found a part answer which was to change cookies from local to domain, which I have done. the only thing left I can thing now is that perhaps there is an error with the coding in smf.inc.php so now I am quoting my code here, I have replaced my password with *'s for security purposes.

can someone help me along my way
// Set this to the location of your Settings file:
$path = '../smf';

// Comment this out if you want to default user's group to 'Registered'
// rather than using Post Count based groups.
define('USE_POST_GROUPS', 1);

// Set the names of implied groups here
define('CM_ADMIN_GROUP_NAME', 'Administrators');
define('CM_MEMBERS_GROUP_NAME', 'Registered');
define('CM_GUEST_GROUP_NAME', 'Anonymous');
define('CM_BANNED_GROUP_NAME', 'Banned');
define('CM_GMOD_GROUP_NAME', 'Global Moderators');

// ------------------------------------------------------------------------- //
// Nothing to edit below this line
// ------------------------------------------------------------------------- //

// Otherwise, try to autodetect SMF path if not set:
if (substr($path, -1) == '/')
        $path = substr($path, 0, -1);

$possible_paths = array($path, '..', '../forum', '../forums',
'../community', '../yabbse', '../smf');

$correct = 0;
while (!file_exists($possible_paths[$correct] . '/Settings.php') &&
count($possible_paths) > $correct)
        $correct++;

require_once($possible_paths[$correct] . '/Settings.php');

define ('SMF', 1);

// other includes
cm_include_smf_funcs("$sourcedir/Load.php", array("reloadSettings", "md5_hmac", "loadUserSettings"));
cm_include_smf_funcs("$sourcedir/Subs.php", array("updateMemberData", "updateStats", "updateSettings"));

// database configuration
define('SMF_DB_NAME', 'db121262902' ); // The name of the database used by the board
define('SMF_DB_HOST', 'db408.oneandone.co.uk' ); // The name of the database server
define('SMF_DB_USERNAME', 'dbo121262902'); // The username to use to connect to the database
define('SMF_DB_PASSWORD', '*************'); // The password to use to connect to the database

// The web path to your SMF Board directory
define('SMF_WEB_PATH', "../smf/");

// The Name of the Cookie used for SMF logon
define('SMF_COOKIE_NAME', 'smf1_');

// Prefix for the database tables
define('SMF_TABLE_PREFIX', $db_prefix); // Table Prefix

// Names for the database tables
define('SMF_USER_TABLE', 'members'); // The members table
define('SMF_GROUP_TABLE', 'membergroups'); // The groups table

// Group definitions (default values used by the board)
define('SMF_GMOD_GROUP', 2);
define('SMF_BANNED_GROUP', -3);
define('SMF_GUEST_GROUP', -1);
define('SMF_MEMBERS_GROUP', -2);
define('SMF_ADMIN_GROUP', 1);

define('SMF_PASSWD_SEED', 'ys');

function cm_include_smf_funcs ($source_file, $fun
Title: Re: Loging into coppermine after SMF integration
Post by: Nibbler on June 05, 2005, 03:48:03 PM
Put everything below


// ------------------------------------------------------------------------- //
// Nothing to edit below this line
// ------------------------------------------------------------------------- //


back as it was, and read the sticky on how to request bridging support.
Title: Re: Loging into coppermine after SMF integration
Post by: huwb on June 05, 2005, 06:23:32 PM
Okay so I have put everything back as the coppermine download was, the only edited file is int.inc. The bridge file has not been ammended, as the path to smf is correct

here is a link to my forum http://www.gayswansea.com/smf/
and here is a link to the gallery http://www.gayswansea.com/gallery/

I have registered a test user account on my forum
username: testuser
password: gallery


below is the bridge code that is currently being used, but still when I log into my forum it does not remember who I am when I go to the gallery
// Set this to the location of your Settings file:
$path = '../smf';

// Comment this out if you want to default user's group to 'Registered'
// rather than using Post Count based groups.
define('USE_POST_GROUPS', 1);

// Set the names of implied groups here
define('CM_ADMIN_GROUP_NAME', 'Administrators');
define('CM_MEMBERS_GROUP_NAME', 'Registered');
define('CM_GUEST_GROUP_NAME', 'Anonymous');
define('CM_BANNED_GROUP_NAME', 'Banned');
define('CM_GMOD_GROUP_NAME', 'Global Moderators');

// ------------------------------------------------------------------------- //
// Nothing to edit below this line
// ------------------------------------------------------------------------- //

// Otherwise, try to autodetect SMF path if not set:
if (substr($path, -1) == '/')
        $path = substr($path, 0, -1);

$possible_paths = array($path, '..', '../forum', '../forums',
'../community', '../yabbse', '../smf');

$correct = 0;
while (!file_exists($possible_paths[$correct] . '/Settings.php') &&
count($possible_paths) > $correct)
        $correct++;

require_once($possible_paths[$correct] . '/Settings.php');

define ('SMF', 1);

// other includes
cm_include_smf_funcs("$sourcedir/Load.php", array("reloadSettings", "md5_hmac",

"loadUserSettings"));
cm_include_smf_funcs("$sourcedir/Subs.php", array("updateMemberData", "updateStats",

"updateSettings"));

// database configuration
define('SMF_DB_NAME', $db_name); // The name of the database used by the board
define('SMF_DB_HOST', $db_server); // The name of the database server
define('SMF_DB_USERNAME', $db_user); // The username to use to connect to the database
define('SMF_DB_PASSWORD', $db_passwd); // The password to use to connect to the database

// The web path to your SMF Board directory
define('SMF_WEB_PATH', "$boardurl/");

// The Name of the Cookie used for SMF logon
define('SMF_COOKIE_NAME', $cookiename);

// Prefix for the database tables
define('SMF_TABLE_PREFIX', $db_prefix); // Table Prefix

// Names for the database tables
define('SMF_USER_TABLE', 'members'); // The members table
define('SMF_GROUP_TABLE', 'membergroups'); // The groups table
Title: Re: Loging into coppermine after SMF integration
Post by: huwb on June 06, 2005, 09:48:06 AM
does anyone have any suggestions?
Title: Re: Loging into coppermine after SMF integration
Post by: Nibbler on June 06, 2005, 08:07:34 PM
Take that dot out of the smf cookie name, it is not a legal character for a cookie name.
Title: Re: Loging into coppermine after SMF integration
Post by: huwb on June 07, 2005, 12:22:10 AM
Quote from: Nibbler on June 06, 2005, 08:07:34 PM
Take that dot out of the smf cookie name, it is not a legal character for a cookie name.

I don't have a dot in the cookie name, if you mean the _ when I delete that from my cookie names I get this error when people are viewing the site


Table 'db121262902.smf1settings' doesn't exist
Title: Re: Loging into coppermine after SMF integration
Post by: kegobeer on June 07, 2005, 12:40:56 AM
No, the cookie name is gaywansea.com.  You can't have a dot in the name.  You need to verify your SMF and Coppermine cookie names again.  Typical cookie names are SMFCookie10 and cpg133.
Title: Re: Loging into coppermine after SMF integration
Post by: huwb on June 07, 2005, 12:47:49 AM
sorry it's been a long day, I have now changed cookie name and I think it is finally working, at least now when I log into gallery it gives me admin status... phew.....

thanks you guys and sorry to be a pain in the but
Title: Re: Loging into coppermine after SMF integration
Post by: kegobeer on June 07, 2005, 02:53:28 AM
No problem.  Glad it's working now.