the code on tiendx2002's first post works for me I am using wordpress 2.8 and punbb 1.3.4
Test results:
1. login using registered wp-user but it <didnt redirect me to the forum>... but was logged in to the forum
2. registered a new user, logged in to the forum, same result as 1.
3. logged in, tried to change passwd, redirected to wp-profile, change passwd, logout, and login again, was able to use the new passwd, login but <didnt redirect me to the forum>
4. try to logout from wp, it did log out from forum.
5. try to logout from the forum, didnt log me out from wordpress. (just logout from forum)
i had the following config:
wp: domain.com
forum: domain.com/forum
define('PUNPATH', './forum'); // path to punbb folder
define('PUNPREFIX', 'pbb_'); // punBB table prefix
define('LANGUAGE', 'English'); // punBB language name, English, etc.
EDITED July 2009:
function punbb_wp_logout() < look for this function in the plugin
{
include PUNPATH.'/config.php';
setcookie($cookie_name, NULL, time()-3600, '/', 'domain.com', '0');
}
$base_url = 'http://domain.com/forum';
$cookie_domain = 'domain.com';
$cookie_path = '/';
basically the only things that didnt work are: redirection to the forum after loggin in and point #5.
EDIT: i solve the redirection by replacing the login.php in punbb:
header('Location: http://domain.com/wp-login.php?redirect_to=http://domain.com/forum');
now left item #5.... anyone can enlighten? Thanks a bunch..