Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Cookies and WPMU

suleinman, sure thing,

okay, first of all, my bb and my mu are sharing ONLY the usertable and the login sessions. THATS IT, no common functions, nothing like that.

and in order to do that, i added the following lines to my config.php on my bb.

__________________________________________________

//These are for the information about the database into which bbPress should store its content

// ** MySQL settings ** //

define(‘BBDB_NAME’, ‘bbdbname’); // The name of the database

define(‘BBDB_USER’, ‘bbdbuser’); // Your MySQL username

define(‘BBDB_PASSWORD’, ‘bbdbpassword’); // …and password

define(‘BBDB_HOST’, ‘127.0.0.1’); // 99% chance you won’t need to change this value

// This is the information about mu’s database. bbPress will look for users in this database

define(‘USER_BBDB_NAME’, ‘mudbname’);

define(‘USER_BBDB_USER’, ‘mudbuser’);

define(‘USER_BBDB_PASSWORD’, ‘mudbpass’);

define(‘USER_BBDB_HOST’, ‘127.0.0.1’);

//if your using one database, its cool, just replicate the mu/bb data!

//now your about to tell bb to look for users in the wp table

define(‘CUSTOM_USER_TABLE’, ‘wp_users’);

define(‘CUSTOM_USER_META_TABLE’, ‘wp_usermeta’);

//and now, your about to tell bb to user the same sessions as wp

$bb->usercookie = ‘wordpressuser’;

$bb->passcookie = ‘wordpresspass’;

$bb->cookiedomain = ‘localgigs.fm’; // or .example.com if there was a . above

$bb->cookiepath = ‘/’;

// Change the prefix if you want to have multiple forums in a single database.

__________________________________________________

i hope this helps. do reply back with questions, :)

Skip to toolbar