axew3.com

WordPress phpBB integration

Fast, easy, light and secure

Install and how to

If you let users to login register and change email only into WordPress (or phpBB, if you do not care about updates at same time into WP when an user for example change the email in phpBB) there is no need to install the phpBB extension.

NOTE: IT IS REQUIRED Php version 7.2 or better

NOTE: be sure that for the WP admin user that’s activating the plugin, there is an user with same email in phpBB, if the logged user doing tasks is not the WP user ID 1 and

*NOTE! that the WP user ID 1 and the phpBB user ID 2 (if they are existent because you do not deleted them after the installation of phpBB or WP) are excluded: they are not affected by the integration code but it is mandatory that they do NOT have to share their username or email with some other user ID between phpBB an WP. Be sure that it is before you start if these 2 users IDs are existent and you are using them. They can have same email or username, BUT NEVER they can have another user that’s not the UID1 in WP or UID2 in phpBB (root installers) having same username or email.

*Again: be sure that it is before you start if you are using them or they exists.


WordPress phpBB integration by email

This plugin use cookies and do not change nothing into phpBB or WordPress files or db: it only update the user’s sessions, the email, password (and eventually the user URL), and add users into the linked CMS when they register. Require 6/7 db rows on the WP db options table to work (search with a regexp sql the option_name text w3all into the options table to see).

NOTE: the get_results() on string problem should have been definitively resolved/fixed since 2.9.5 and it is not anymore necessary to include a custom phpBB file. Anyway, whenever and if somehow you get the error “get_results() on string” executing some task, for max compatibility with ALL and any plugin, or better, if you wish to not store the phpBB db connections values into a WP db record, please read this topic (custom phpBB config file inclusion):

https://www.axew3.com/w3/forums/viewtopic.php?t=2026

It is maybe MANDATORY for users to change/update email/password and/or register, only into WordPress OR phpBB, if the phpBB extension is not installed into phpBB. It is possible to let users to update their email and register on both WP and phpBB, only if the phpBB WordPress extension has been installed into phpBB. If not, when users will register or update their profile in phpBB, the same (password or URL update or user addition in WP) will not happen at same time in WordPress, until the same user will not login or will visit the WordPress side as logged. Or maybe you’ll disable the module in phpBB for the user email update into the phpBB user profile. There are 1001 ways to do things integrating phpBB and WP. But remember that this is just a WordPress plugin, so it only run when WordPress pages loads!

See how to use and download the phpBB integration extension here: phpBB WordPress common tasks integration extension

Note that it is maybe required to transfer all old existent WordPress users into phpBB using the WP to phpBB transfer process before to start the integration. Follow the required steps to be up and running in short. It is also possible to activate and use the option Add users in phpBB if they do not exist, when users logs in to WordPress setting it to yes (since plugin version 2.9.2>) so that existent old WP users will be added into phpBB (if a same email/username do not exists into phpBB) when they will login into WordPress.

If you do not go to pairs usernames/emails, remember that the ‘plugin login’ or the ‘profile update’, works by email, so an user with email me@you.us that login in WP, will be logged in phpBB like the user that own the same email. The same goes at contrary: a phpBB logged in user will be logged in WP as the user with the same email. If there are more users sharing same email in phpBB, then all those users will have the email updated to the new one when the WP user that own the same old email will go to update with a new one. If there are users sharing same email in phpBB, and the WP user with same email will login in WP and then will visit phpBB, will result to be logged in phpBB as the first user ID found by the SQL query that match the email. So that to login as others phpBB users that are sharing the same email, these users will have to login in phpBB or will never been logged through a WordPress login. To share same email between users is possible feature in phpBB, but never in WordPress.

  • It is also time to inform all the lovely and cool people about how bad is my English … i am sorry!

Setup phpBB as follow, then setup the db connection values into the plugin admin page, then maybe transfer WP users and fix issues if there are.

Configure WordPress and phpBB

WP MU-MS (Network installations) integration: before to follow, read how to activate this feature and how WP_w3all plugin is required to be configured on each sub-site: WP_w3all for WordPress MS MU (Network installations).

phpBB side settings

  • Limit username chars:

on ACP under
BOARD CONFIGURATION -> User registration settings -> Limit username chars:
choose Any letter, Number and Spacers, or Alphanumeric option.

So if you let users to register in phpBB, you’ll be sure they are added in WordPress with the same username or an existent phpBB username containing unwanted chars in WP, where possible, will be added into WordPress purged of these chars, or excluded if the resulting purged username will result to be empty.

Save settings.

Then into phpBB ACP under option Security settings:
Option:

  • Allow “Remember Me” logins set to: YES
  • “Remember Me” login key expiration length (in days):

may set it to 365 days (or another value)

  • Validate browser:
    Enables browser validation for each session improving security: Set to YES

Save settings.

phpBB cookie SETTING

Set the phpBB cookies to be available all over the domain if it is not already:

Go under phpBB ACP admin -> Server Configuration -> Cookie Settings

  • Set the Cookie domain value as (for example):
    .yourdomain.com

NOTE: if on localhost, may leave the value as is, localhost or empty value. If on subdomain, like mysub.mysite.com, set it using only the domain name so .mysite.com

now change the cookie name in something else or adding some char to it, so old cookies on user’s browsers will not be valid anymore and they will be forced to re-login.

  • Cookie path set as single fraction slash: /

Be sure to set correct values.

Save settings, logout, and log back into phpBB.

Based on how you are integrating WP and phpBB, and if using or not the integration extension installed into phpBB, you’ll have to choose to disable the registration in phpBB or WordPress and choose where user’s can update email or register.

Note: to disable the Edit account settings module in phpBB on
ACP -> System Tab -> Module management -> User Control panel
disable the Edit account settings module (where an user can change the email and update password in phpBB ucp).

WordPress side

Install the WP w3all WordPress phpBB integration plugin then on WP admin open

  • Settings -> WP w3all

Setup required database connection values
and the URL setting as required (read inline hints)

Note: If your WordPress is served under https, then force also phpBB to be https, and vice versa, or http if WP is under http.

All done!

Activate options and use shortcodes or widgets. Read inline hints!

Template embed phpbb into WordPress:

If you wish to follow adding the phpBB responsive embedded iframe into a WordPress page:

Best way compatible with all themes – using shortcode

https://www.axew3.com/w3/2022/02/the-awesome-iframe-template-integration-using-shortcode/

Old way, not working on new block themes – using a WordPress page

https://www.axew3.com/w3/2020/01/phpbb-wordpress-template-integration-iframe-v5/

How to and shortcodes list

No panic instructions

phpBB WordPress integration security

WordPress Multisite: WP_w3all for WordPress MS MU (Network installations)

Switch WordPress Roles and phpBB groups functions

phpBB usernames migrated/added into WordPress with native language characters

Shortcodethe awesome template integration using shortcode

Shortcodephpbb last users posts by IDS

ShortcodephpBB PM notification in WordPress

ShortcodephpBB user notifications in WordPress

Shortcodeto parse/display single phpBB posts into WordPress

Shortcodelast phpBB topics/posts into WordPress

ShortcodeHeartBeat Last Topics Shortcode

Shortcodelast phpBB topics/posts into WordPress by Forums IDS

Shortcodelogin form

Shortcode –  last topics grid in WordPress with topic’s attachment (img or file)

How to (advanced) add custom code/hooks for external plugins

How to (advanced) plugins Global vars (plugin vers. 3>): how to use with the custom_functions.php file

If you want to avoid the phpBB user session update read phpBB user session update

Use the WordPress phpBB integration to display phpBB posts into another WP site from another domain

How to (advanced): WP roles and phpBB groups switches

How to style widgets and shortcode output if they need to be adjusted to look like my theme

How to WordPress phpBB integration without linking users

Appreciations goes here – Thank You!