[ABD] WP Phpbb Unicorn - bridges

Any abandoned Extensions will be moved to this forum.

WARNING: Extensions in this forum are not currently being supported or maintained by the original Extension author. Proceed at your own risk.
Forum rules
IMPORTANT: Extension Development Forum rules

WARNING: Extensions in this forum are not currently being supported nor updated by the original Extension author. Proceed at your own risk.
Wardormeur
Registered User
Posts: 142
Joined: Sun Jan 27, 2013 9:22 am

Re: [ALPHA] WP Phpbb Unicorn - bridges

Post by Wardormeur »

lúthien wrote:
ivanovvla wrote:PHP Fatal error: Class 'WP_Roles' not found in /Volumes/Users/viva/Sites/wpbase/forums/ext/wardormeur/phpbbwpunicorn/acp/phpbbwpunicorn_module.php on line 166
I came across the same issue, and because I really wanted to integrate the login of a phpbb & wordpress site - and because this extension seems to be the only one that can do this trick for PHPBB 3.1.6 - I had a closer look. I'm down with a heavy cold anyway, so this seems like a great way to get through the day :)

I did a bit of debugging, and though I first thought that putting the Wordpress site on the same level as PHPBB might help - it didn't. Because I'm not yet very familiar with the PHP frameworks used here (composer etc.) I might be doing some really bad things here, so I'm merely posting it for entertainment purposes - please don't copy any of this.
I'm working with a completely empty / vanilla PHPBB & WP installation on localhost just to try stuff out.

Anyhow, the problem seems to be that the composer ClassLoader.php used by this plugin cannot find the WP_Role and WP_Roles classes. They live in the (worpress_directory) / wp_includes / class-wp-role.php & class-wp-roles.php files respectively, and for some reason that mechanism that is supposed to scan the Wordpress installation for these classes doesn't look in the right places.

I found that adding two lines to the file <forum_root>/ext/wardormeur/phpbbwpunicorn/acp/phpbbwpunicorn_module.php, after line 46:

Code: Select all

			require_once($this->config['phpbbwpunicorn_wp_path'].'/wp-includes/general-template.'.$phpEx);
so that it reads

Code: Select all

			require_once($this->config['phpbbwpunicorn_wp_path'].'/wp-includes/general-template.'.$phpEx);
			require_once($this->config['phpbbwpunicorn_wp_path'].'/wp-includes/class-wp-role.'.$phpEx);
			require_once($this->config['phpbbwpunicorn_wp_path'].'/wp-includes/class-wp-roles.'.$phpEx);
results in the PhpbbWPUnicorn Settings tab appearing, with all the Manual Role Associations - I'll play around with that and see how far I get.

The advantage of all this is that I learn a lot about how these extensions are made ...
Issue confirmed, will see if this is a valid fix, thanks for your time :)

Wardormeur
Registered User
Posts: 142
Joined: Sun Jan 27, 2013 9:22 am

Re: [ALPHA] WP Phpbb Unicorn - bridges

Post by Wardormeur »

I'll probably add in the same time the possibility to make a manual creation of an user (thinking of "|Fred" & "Fred" are gonna have the same username in WP, which is not possible) to avoid username conflict.

2012
Registered User
Posts: 8
Joined: Thu Oct 02, 2014 3:47 pm

Re: [ALPHA] WP Phpbb Unicorn - bridges

Post by 2012 »

How can I install PHPBB-WP-Unicorn ?

Its not getting picked up in ext

Wardormeur
Registered User
Posts: 142
Joined: Sun Jan 27, 2013 9:22 am

Re: [ALPHA] WP Phpbb Unicorn - bridges

Post by Wardormeur »

You need to create a folder before, in a way the full path would be ext/wardormeur/phpbbwpunicorn
Only WP < 4.3 seemd to work so far, working on 4.4

2012
Registered User
Posts: 8
Joined: Thu Oct 02, 2014 3:47 pm

Re: [ALPHA] WP Phpbb Unicorn - bridges

Post by 2012 »

Thanks,

I want to make phpbb look like its a part of rest of the site.
So I have a few questions.

1. will his allow me to add phpbb onto wordpress as a page or is this only a sso.
2. will I need to setup a iframe or will auto add phpbb as a page.
3. will this give me a backend access with click of a button or will I need to login manually.

2012
Registered User
Posts: 8
Joined: Thu Oct 02, 2014 3:47 pm

Re: [ALPHA] WP Phpbb Unicorn - bridges

Post by 2012 »

can users not register via wordpress ?
Last edited by 2012 on Thu Feb 04, 2016 9:44 pm, edited 1 time in total.

2012
Registered User
Posts: 8
Joined: Thu Oct 02, 2014 3:47 pm

Re: [ALPHA] WP Phpbb Unicorn - bridges

Post by 2012 »

After setting up the plugins

I can login to wp and my logins no longer work

guypat
Registered User
Posts: 35
Joined: Thu Jan 28, 2016 8:30 pm

Re: [ALPHA] WP Phpbb Unicorn - bridges

Post by guypat »

I'd like to unify the login for phpbBB 3.1.7 and WordPress 4.4.x. Specifically for users in a certain phpBB group. ie: If users are in "this" group, they're logged into WP and phpBB.

Is this possible? I see in some of the more recent replies the plugin(s) doesn't work with WP 4.4.x?

Wardormeur
Registered User
Posts: 142
Joined: Sun Jan 27, 2013 9:22 am

Re: [ALPHA] WP Phpbb Unicorn - bridges

Post by Wardormeur »

I'm working on 4.4 atm, with others things, as it broke the dependancy injection for phpbb

@2012 : will need more info, version of WP first of all.
Also : No, users can't register through WP, hte goal is to have PHPBB as the main center for information

1. will his allow me to add phpbb onto wordpress as a page or is this only a sso.
-> Only SSo
2. will I need to setup a iframe or will auto add phpbb as a page.
-> Eh ? This is theme dependant and you can do it through a link, I probably won't do anything special here
3. will this give me a backend access with click of a button or will I need to login manually.
-> Depends if you're logged in in phpbb first or not

spello
Registered User
Posts: 121
Joined: Sat May 28, 2011 11:12 am
Contact:

Re: [ALPHA] WP Phpbb Unicorn - bridges

Post by spello »

Could you add ability to set user's $show_admin_bar_front variable to false by default for everybody? I'd like to have that bar set to true for only selected users(groups).

The value is located at wp-includes/user.php

Code: Select all

$meta['show_admin_bar_front'] = empty( $userdata['show_admin_bar_front'] ) ? 'true' : $userdata['show_admin_bar_front'];
And can be simply edited to false when new account is being created.

I can do it on my own, but it would be nicer to have such choose included in the extension's core.

Wardormeur
Registered User
Posts: 142
Joined: Sun Jan 27, 2013 9:22 am

Re: [ALPHA] WP Phpbb Unicorn - bridges

Post by Wardormeur »

How about using that instead ?
https://wordpress.org/plugins/admin-bar-disabler/
You can map your user groups the same way ;)

spello
Registered User
Posts: 121
Joined: Sat May 28, 2011 11:12 am
Contact:

Re: [ALPHA] WP Phpbb Unicorn - bridges

Post by spello »

Thanks, looks interesting :)

Wardormeur
Registered User
Posts: 142
Joined: Sun Jan 27, 2013 9:22 am

Re: [ALPHA] WP Phpbb Unicorn - bridges

Post by Wardormeur »

Sorry for this enormous delay
New version (0.0.2) released, including a working version for 4.4
Some notables changes for "resync users" as it doesnt break upon conflict anymore, but logs non-corresponding users afterwards, letting you manually associate them if necessary. This way, you can't overwrite an user "by error".
This should be improved to have the possibility to bypass it for initial configuration of a previous installation (upon deactivation, the association of users is lost on phpbb side (this is expected)), but then requires manual linking of every user. We should allow (ticking box) the right to bypass this behavior and sync upon username existing WP users.

This doesn't include : the builk process of users (still buggy and.. well...), nor the auto-update of groups (cf 3.1.7 new events)
Cheers,
W.

User avatar
Mauron
Registered User
Posts: 342
Joined: Wed Jul 16, 2014 11:25 am

Re: [ALPHA] WP Phpbb Unicorn - bridges

Post by Mauron »

Well done!

mijean
Registered User
Posts: 26
Joined: Tue Sep 08, 2015 8:42 am

Re: [ALPHA] WP Phpbb Unicorn - bridges

Post by mijean »

Thank you for this release.
I test as soon as possible.
Jean Michel

Locked

Return to “Abandoned Extensions”