MyBB Community Forums

Full Version: MyBB - Wordpress user integration - alpha 0.1
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
Hi everybody,

I delveloped this WORDPRESS plugin to login into wordpress using mybb's userbase.

In my test server everything works correctly, but I haven't tested it with different configurations.

The plugin have only been tested with wordpress 3.6.1 and Mybb 1.6.11.

For this plugin to work, following assumptions are done:
- Wordpress registration is disabled
- MyBB registration is enabled
- MyBB cookies settings value are:
	$settings['cookiedomain'] = "";
	$settings['cookiepath'] = "/";
	$settings['cookieprefix'] = "forum_"; 
- You want that every user in Mybb become a subscriber (you can change his role from wp admin panel) --> change it from admin panel
- You WILL NEVER create an user from wp (there is no error checking for this)
- Wordpress and mybb use the same database

--------------------------------------------------
	W	A	R	N	I	N	G
--------------------------------------------------

MASTER USER BASE IS MYBB USERBASE
WHEN YOU LOGIN IN WP USING YOU MYBB COOKIE (i.e. whithout using wp-login.php) A DUMMY PASSWORD IS SET IN YOUR WORDPRESS USER.
THIS IS NOT A PROBLEM UNTIL THE PLUGIN IS INSTALLED, BECAUSE THE PLUGIN USES MYBB USERBASE.
IF YOU UNINSTALL THE PLUGIN THE USER CREATED USING COOKIES WILL NOT BE ABLE TO LOGIN TO WORDPRESS UNTIL THEY RESET THEIR PASSWORD.

ANYWAY THE FIRST TIME AN USER LOGIN USING wp-login.php HIS PASSWORD WILL BE UPDATED WITH A VALID ONE.

--------------------------------

To install the plugin unzip the attached file to your wp-content\plugins folder and activate it in wordpress plugin panel. Than you can configure it from Settings -> MyBB-WP User Integration

PLEASE TEST IT IN A TEST ENVIRONMENT BEFORE USING IN YOUR SITE, I TAKE NO RESPONSABILITY FOR ANY DAMAGE TO YOUR FORUM OR BLOG.

Let me know if it works in your setup.

Alder
First off, thanks for taking the time to write this.

my settings are:
Mybb 1.6.10
WordPress 3.7.1

I cannot get this to work.
Tired several setting both in the settings for the plugin in wordpress and also in MyBB. I also used the recommended settings in the picture.

I also looked at the cookie names that were being generated by MyBB, both in firefox and chrome, they both matched what I had set the cookie name to in the plugin settings. The other options seem pretty straight forward.

after I save the settings with the plugin, it pretty much kicks me out of the wp-admin and you can no longer log back in because the plugin is not working. Only way to get back in was to delete/change the plugin file name.
Hi,

sorry for late answer, i only saw now your answer.
Can you please post me your cookies value?
Are the forum and website in the same domain? otherwise wordpress will not be able to read forums cookies.

For viewing cookies you can install Web Developer Toolbar in firefox and select:

cookie -> view cookie information
Hi, please help me...

My web (Wordpress) is located on: my-site.com
My forum is located on: forum.my-site.com

Cookies on forum are set:
$settings['cookiedomain'] = ".my-site.com";
$settings['cookiepath'] = "/";
$settings['cookieprefix'] = "";

Now, how should I set it?

My databases are separate - one for WP and one for myBB. Should I merge it?

Thanks in advance Smile
Hi,

yes, first of all your site and your forum must use the same database, maybe using different prefixes (default ones are fine).
Cookie path and domain refers to path in your webserver's filesystem, so you should set them accordingly.
For example if your wp is installed in the root of your site "/" and the forum is installed in the subdirectory "forum" correct settings would be:

$settings['cookiedomain'] = "";
$settings['cookiepath'] = "/";

if this does not solve you problem gimme more information about your cookies following the instruction in my last post!

Bye

Alder Smile
Hello Alder,
do you still work on the plugin? Will you update it?

thanks
Thank you for fast reply, I'll try to merge those databases... Smile

As far as web and forum location is concerned, it is little more difficult. Big Grin

Web is located in: /www/domains/my-site
Forum is located in: /www/subdomains/forum

URLs are: my-site.com & forum.my-site.com
(2014-06-02, 05:56 PM)forumfreund Wrote: [ -> ]Hello Alder,
do you still work on the plugin? Will you update it?

thanks

No, I'm not actively working on it.
I'm using the plugin in a production environment since november and it works fine, so for me it's ok.
I will update it only if needed to let it be compatible with new versions of wordpress and mybb.
Do you need any feature?

(2014-06-02, 06:42 PM)Heroes Killer Wrote: [ -> ]Thank you for fast reply, I'll try to merge those databases... Smile

As far as web and forum location is concerned, it is little more difficult. Big Grin

Web is located in: /www/domains/my-site
Forum is located in: /www/subdomains/forum

URLs are: my-site.com & forum.my-site.com

Uhm…never tried a configuration like that.
Try to install it in a test environment after merging the databases and give me information about the cookies, so I can make further assumptions.
Not working for me
Do you match all the requirements?
Can you post your config and info about the cookies?
Pages: 1 2 3