'wordpress plugin' Category

bbPress forum under Wordpress

2006. augusztus 13.
Katt: wordpress plugin
Nincsenek megjegyzések »

You can find out how to integrate your bbPress forum into Wordpress, but that integration is not perfect at all. I get two problems with that solution:

  1. in a non-english setup, I can not use the usual gettext localization
  2. I could not log in to the forum’s admin pages

So I rewrote a bit that solution:

/************************** * Start WP integration **************************/ // Define the path leading to your wp install directory. (ABSPATH gets defined by WP, is this a problem?) define('ABSPATH', '/home/nagyv/public_html/wp/'); if(file_exists(ABSPATH . 'wp-settings.php')) { define('WPLANG', 'bbpress.hu_HU'); // loads the functions and wp config require_once ABSPATH . 'wp-config.php'; require_once ABSPATH . 'wp-settings.php'; // use the WP user table for your bbpress user list define('CUSTOM_USER_TABLE', 'wp_users'); // your $bb->domain must match your wp domain exactly or the hash won't work and users will not authenticate. $myhash = md5($bb->domain); $bb->usercookie = 'wordpressuser_' . $myhash; $bb->passcookie = 'wordpresspass_' . $myhash; // Use the same cookie as WP $bb->cookiepath = '/'; } /************************** * End WP integration **************************/ After I had to add an extra line to my wp-config.php too, that checks for WPLANG.

if(!defined('WPLANG')) define ('WPLANG', 'hu_HU');