(phpBB extension) phpBB WordPress common tasks 1.0.1 - integration unchained

Locked
User avatar
axew3
w3all User
w3all User
Posts: 2316
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

(phpBB extension) phpBB WordPress common tasks 1.0.1 - integration unchained

Post by axew3 »

The phpBB WordPress Integration Common Tasks extension.

Works also as standalone into phpBB
NOTE: option about user's addition into WordPress will only work with WP_w3all phpBB integration plugin version 2.4.5 or >


This phpBB extension associated with the WP_w3all phpBB integration plugin, can integrate WordPress and phpBB without limits, in 1001 ways.

Fast, light and secure. Can be used as standalone.

- What it change into my phpBB?
Nothing, it do not add nothing into database (only update data when required) and execute redirects or cURL calls to WordPress (it depend by activated options you'll use) when required.

Once installed the extension will accomplish easily with this:
when an user update emails in phpBB profile, password or site url, both phpBB UCP or ACP, the same will happen into the linked WordPress, for the WordPress user with same email.
Based on the config.php file activated options, the extension allow to add users into WordPress at same time, when they register in phpBB or to redirect users after login. Or to check for existence of username or email in WP, before to register into phpBB.
Read more below.

How to use/configure it?

UPDATE from 1.0.0:

If using version 1.0.0, disable it into phpBB ACP, then delete data.
Delete the folder /ext/w3all/phpbbwordpressintegration
and replace with new files.
Setup the /ext/w3all/phpbbwordpressintegration/custom/config.php file, re-activate and test the extension.

OR (new install)

Copy the folder w3all with inside the extension phpbbwordpressintegration
/wp-content/plugins/wp-w3all-phpbb-integration/addons/phpBB_EXT/w3all/phpbbwordpressintegration/
into the root phpBB ext folder, so you'll have:
/ext/w3all/phpbbwordpressintegration/

Open up the file with a text editor:
/ext/w3all/phpbbwordpressintegration/custom/config.php
add WordPress db connection values of the WordPress database you want linked to with the phpBB and
activate user's addition and redirect options if needed, following instructions that are all within the same file

Save the file.
Activate the extension.

Now, when an user or an admin, will go to change/update email or password or profile url in phpBB, the same, for the same user with same email, will happen into WordPress.
Redirects and users addition into WordPress at same time when user register in phpBB


May immediately test an user's email update. If you get phpBB db error, mean that db configuration values are wrong, Double check for correct connection values the file
/ext/w3all/phpbbwordpressintegration/custom/config.php
If it succeed with no errors, it is all right!

To know how to configure the phpBB extension about redirects and user registration in WP at same time (registration at same time if used together with the integration plugin WordPress phpBB installed in WordPress) open up and read the (self explained) ... i know, it is in bad Eng!
/ext/w3all/phpbbwordpressintegration/custom/config.php

The self explained config.php file you'll have to setup look like this (until no more options are added along the time):

Code: Select all

<?php
	defined( 'IN_PHPBB' ) or die( 'forbidden' );

/** Setup WordPress database connection values **/
// NOTE IMPORTANT:
// If only db connection values are active, the extension will only work to UPDATE email, password and url fields into the linked WordPress
// and can run as standalone.
// To test that the db connection run fine (because values here are correct) just go to update an email of an user via ACP.
//////////////

$wp_w3all_dbhost = 'localhost';
$wp_w3all_dbname = 'wp';
$wp_w3all_dbuser = 'root';
$wp_w3all_dbpasswd = 'pass';
$wp_w3all_table_prefix = 'wp_';
$wp_w3all_dbport = ''; // maybe required

////////////////////////////
// NOTE IMPORTANT:
// If the following options are not activated
// the extension will only work to UPDATE email, password and url fields into the linked WordPress, and can run as standalone.
// Activating the options here below, may require that the WordPress phpBB integration plugin is installed and active into your WordPress
// or only redirects will happen as expected (not users insertion into WordPress, as obvious may it is, because cURL (without visible errors) will fail if the integration plugin is not installed in WP)

/**
    Setup User Addition in WordPress option using cURL or Redirect options.
    Activate Or Disable available options removing the prepending // chars
    Read hints
**/


//////////////
// OPTION
// --> Check if the email or username already exists into the linked WordPress, before the user's addition into phpBB
// Remove prepeding // to activate USERS check into WordPress, and prevent user registration in phpBB if the username or email already exists into the linked WordPress

// define("W3ALLCKWPUSEREXIST", true); // Check if the username or email already exists into the linked WordPress, before the user addition in phpBB


//////////////
// OPTION
// --> cURL
// setup WordPress URL
// this will be also the page were the user will be redirected to, if the next options '--> Redirect to WordPress' are active
// NOTE that it is REQUIRED any valid URL that point to the linked WordPress

// Remove prepeding // to activate USERS ADDITION into WordPress as soon when users register into phpBB
// NOTE IMPORTANT: if this option is not enabled or empty, the addition into WordPress at same time using cURL is disabled
// and the extension will run/work only for: password, email and url update.


// $wp_w3all_wordpress_url = 'https://localhost/wp/';


// DO NOT activate following REDIRECTS options if using the template IFRAME integration

//////////////
// OPTION
// --> Redirect to WordPress ONLY after user has been created in phpBB and autologin happen (because no email confirmation required)
// WARNING: DO NOT activate this if using template IFRAME integration! Or you'll have wp iframed into wp as result, when the phpBB redirect happen
// NOTE IMPORTANT: to activate the follow, it is REQUIRED that the previous '$wp_w3all_wordpress_url' option is also active
// Remove prepending // on next define() to redirect the user into wordpress as soon when the user is added into phpBB

// define("W3ALLREDIRECTUAFTERADD", true); // Redirect only after autologin: DO NOT activate this if using template IFRAME integration


//////////////
// OPTION
// --> EVER Redirect users to WordPress after phpBB login (ACP exluded)
// NOTE IMPORTANT: to activate the follow, it is REQUIRED that the previous '$wp_w3all_wordpress_url' option is also active
// Remove prepending // on next define() to activate

// define("W3ALLREDIRECTEVERAFTERLOGIN", true); // Always redirect to the WordPress Url, after the login in phpBB (ACP exluded): DO NOT activate this if using template IFRAME integration
NOTE that this extension, come embedded into WP_w3all WordPress plugin since next (released presumable today) 2.4.5 plugin, and activating certain options you may have to install the WP_w3all WordPress plugin into your linked WP.

1.0.1 phpBB WordPress common tasks extension is (also) here:
w3all_phpBB_WP_extension_1.0.1.zip
(15.44 KiB) Downloaded 13 times

GamingSanctum
Posts: 4
Joined: Wed Jun 30, 2021 1:54 am

Re: (phpBB extension) phpBB WordPress common tasks 1.0.1 - integration unchained

Post by GamingSanctum »

Since installing this PHPBB Extension, logging into wordpress is not logging me into PHPBB. (Like the sessions are not shared). Should I not be running this with the Wordpress w3all plugin?

User avatar
axew3
w3all User
w3all User
Posts: 2316
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: (phpBB extension) phpBB WordPress common tasks 1.0.1 - integration unchained

Post by axew3 »

1) Yes as above mentioned (the extension config.php file self explain all) can be used with or without.
2) No, not possible, since the extension have nothing to do, nor can interfere in any way with the default wordpress login process or integration plugin login process, when the login done in WP side, so when it release the phpBB cookie on wp login. This can not be the problem.

P.s
It is true the contrary: ìwhen a phpBB cookie is released due to a login in phpBB, and the user come to wp side, then the plugin code recognize and check the cookie, and login the user in WP if it is still not logged in (and a valid and matching session in phpBB is found).
This phpBB WP common extension, do not interfere with nothing in phpBB about sessions, nor something else. The redirect (if option active) fire only/just after the phpBB login process has been completed.

[EDITED]

Locked