WordPress phpBB Latest phpBB Topics shortcode by forums IDS

WP_w3all 1.8.8 or >

Vers. 1.0

see also:
phpBB posts into WordPress post shortcode how to
WordPress phpBB Latest phpBB Topics shortcode how to

WordPress phpBB Latest phpBB Topics FOR SPECIFIC FORUMS IDS – shortcode how to

To add a WP_w3all shortcode, and display a list of Latest updated phpBB Topics from specified Forums ID/IDS into a WordPress post/page, the WordPress shortcode to use is like this:

change the topics_number value 5 with the number of Last phpBB topics/posts you need to retrieve and display , AND forums_id value 3,9
based on forum’s ids you like to retrieve posts from. In the above shortcode example it retrieve posts from forums with ID 3 and 9 (substantially, add forum’s IDS separated by comma).
To retrieve posts by a single forum
, just add the single ID
(like on next example).
If you want display Latest Posts with post text, you’ll use the shortcode in this way:

change the text_words value 30 based on how many words you want to display for listed posts. Here we retrieve forum’s posts from an unique  forum with ID 6

About avatars: will use the same settings you choose for avatars in WP_w3all config page.

Note: if you want to add custom style to Last Topics/post shortcode output, the file used by the Last Topics/post shortcode you need to look for, may to add custom modifications in, is:

wp-content/plugins/wp-w3all-phpbb-integration/views/phpbb_last_topics_forums_ids_shortcode.php

WordPress phpBB integration without linking users

From WP_w3all WordPress phpBB integration 1.8.0 version, it is possible to use the plugin without linking users between WordPress and phpBB. You can display Last Topics Widgets and Shortcodes to display phpBB Last Posts or Posts content into WordPress Pages/Posts. It is also possible to use the iframed WP page, to display the phpBB forum into a WordPress page (also cross domain*). Without linking users, you may can integrate also a version of phpBB prior (<) of phpBB 3.1 to display phpBB Last Topics Widgets/Shortcodes or phpBB Posts Shorcodes into WordPress.

To install WP_w3all integration without linking users, follow these steps:
Install the plugin

open with text editor the file:
/wp-content/plugins/wp-w3all-phpbb-integration/wp_w3all.php
+- on top of the file, search for this line

just before, ADD the following line

save/replace the edited wp_w3all.php file into plugin folder.

Now it is necessary to activate the plugin: setup the Path and URL setting following instructions into WP admin -> Settings -> WP_w3all config page. You do not need to follow any other further instruction about cookie setup and/or phpBB ACP settings in this case. So after plugin has been activated, by setting Path and URL setting, you can use Widgets Last Topics Posts and use Shortcodes into WP pages and posts, to display phpBB contents. Note: it is also possible to use the users transfers options in this state.

Hint Note*: without linking users between phpBB and WordPress, it is also possible to use the plugin for cross domains installations (not only domain and subdomain). Just create a valid custom phpBB config.php file, as suggested into Wp admin -> WP_w3all config page, and use it.

WordPress Shortcode: last phpBB topics/posts into WP post

WP_w3all 1.7.5 or >

Vers. 1.0

see also:
phpBB posts into WP post shortcode
Latest phpBB Topics by specific forums ids shortcode how to

WordPress phpBB Latest phpBB Topics shortcode how to

To add a WP_w3all shortcode, and display a list of Latest updated phpBB Topics into a WordPress post/page, the WordPress shortcode to use is like this:

change the topics_number value 5 with the number of Last phpBB topics/posts you need to retrieve and display.

To display with post text, use the shortcode in this way:

change the text_words value 30 based on how many words you want to display for listed posts.

This feature will use the same settings you have choose for avatars in WP_w3all config page.

Note: in case you want to add custom style the output of Last Topics/post shortcode, the file used by the Last Topics/post shortcode you need to look for, may to add custom modifications is:

wp-content/plugins/wp-w3all-phpbb-integration/views/phpbb_last_topics_output_shortcode.php

that is not the same used to output phpBB Last Topics on widgets, which is instead the file phpbb_last_topics.php  (as you’ll see on same folder).

How to activate shortcode into WordPress Posts Replies or Widgets or even Excerpt?

About the above, consider the fact that if shortcode is activated in this way on comments, the shortcode (any, not only the WP_w3all shortcode) can be used by any commenting user on comments, if a plugin not provide explicitly the feature to disable on comments the shortcode for all users except specifics groups.

WordPress and Buddypress phpBB profile fields integration

How the WP_w3all WordPress phpBB integration and WordPress or WordPress + Buddypress profile fields integration work:
On WordPress + Buddypress,  default phpBB profile fields are required to exist as they are into a default phpBB install, while in the case of WordPress default installation (no Buddypress) the code will not thrown any error in case default profile fields have been modified in phpBB: by the way, no update will be executed on phpBB profile fields when update is done via WordPress by users, except for email and password fields. It is commonly strictly required that phpBB profiles fields are setup like they are into a default phpBB install, but it depend on how the integration is configured to work: you could let users update profile fields only in phpBB for example. In the case that phpBB profile fields aren’t the same as into a default phpBB install, no update will be executed on phpBB profile fields (except email and password) when update is done in WordPress.

The how to resolve and check about this, can be done reading this post:
WP_w3all phpBB integration and phpBB PROFILE FIELDS

The following is ONLY if Buddypress installed in WordPress and Buddypress integration option activated:

If on Buddypress, the WP_w3all feature about integration of Profile Fields can be activated on WP_w3all config.
If you choose to activate this option, check that phpBB profiles fields matches phpBB default install configuration, as explained on this post linked also above WP_w3all phpBB integration and phpBB PROFILE FIELDS, so will be also necessary to name these fields in Buddypress as explained in this procedure:

any custom field can be added into Buddypress, but only default phpBB default profile fields are synchronized and updated between phpBB and  WP Buddypress, and only if these Profile Fields in Buddypress are named as explained here below. You can add any profile field in Buddypress. But only these that match phpBB as explained below are synchronized/updated.
To have Buddypress integrated  about profile fields and synchronized with phpBB profile fields, phpBB profile fields need to be AS are ON A DEFAULT phpBB installation (as the code is), plus it is required to name these Profile Fields Names in Buddypress in this way:

Buddypress and phpBB default fields integration how to

In Buddypress, is possible to name any field as more like, but if it need to be updated also in phpBB and vice versa, the field name shown to the user, need to contain:

for youtube, the word youtube (lower or capital or both mixed letters, also into a phrase)
for facebook, the word facebook (lower or capital or both mixed letters, also into a phrase)
for icq, the word icq (lower or capital or both mixed letters, also into a phrase)
for skype, the word skype (lower or capital or both mixed letters, also into a phrase)
for twitter, the word twitter (lower or capital or both mixed letters, also into a phrase)
for googleplus, the word google (lower or capital or both mixed letters, into a phrase also (just google, so it can be used for any google service, and not just googleplus: so for gmail may could be used Google gmail))
for yahoo, the word yahoo (lower or capital or both mixed letters, also into a phrase)
for aol, the word aol (lower or capital or both mixed letters, also into a phrase)

So it is important to not repeat these words using as Profile Fields Names on Buddypress some word that is already used to detect another field name (or one of the others 4 fields below).

This can work very fine until the name of the field is about services, because normally these are named in any language the same, while remaining four default phpBB profile fields, which are: occupation, interests, location, website can be differently named: in Italian the Eng word occupation is written occupazione, in Dutch it is bezetting etc etc.

For those 4 fields, IT IS REQUIRED that these Profile Fields Names are named in Buddypress as single word, or changed to fit your language or different language or phrase or word, as explained more below.

For occupation, the word occupation, lower or capital or both mixed letters, or anyone of the words in the following array:

for interests, the word interests, lower or capital or both mixed letters, or anyone of the words in the following array:

for location, the word location, lower or capital or both mixed letters, or any of the words in the following array:

for website, the word website, lower or capital or both mixed letters, or any of the words in the following array:

as is easy to understand, these arrays for these four BP profile fields names, contains pairs of values:
“language” => “translated word/or phrase”

in these arrays,  is possible to add any other language, OR, you can also choose to modify the translation of some of the Profile Field Names into something different, like for example:
“en” => “website”
could be changed into (use EVER lower case letters here!):
“en” => “your web space”
so as Profile Field name in Buddypress, we’ll set for the website field name:
Your Web Space OR Your web space, or any other mixed lower/capital letters, but the phrase NEED TO BE THE SAME as it is set on the related array.

These arrays can be added into the custom WP_w3all phpBB config.php file, or root phpBB config.php if you use it, so on plugin update nothing will be lost in case of custom additions or modifications, maybe due to addition of your language, or translated phrase/word change.
To do this, open your wp_w3all custom phpBB config.php file (or phpBB root config.php file if you use it) and add the follow (or what for you needed) just below all others existent code lines:

Edit any of those adding custom language for Buddypress profile fields names, that you’ll use to name the related Buddypress profile field. Memo that all added values in these arrays need to be LOWER CASE.

So as last example, assume we need to add for the occupation field a language like, let say, Icelandic, that translate the word occupation in starf, than we’ll go to modify the array $w3_bpl_profile_occupation adding what needed just in this way:

As you can see, it has been added to the array $w3_bpl_profile_occupation the value
“icelandic” => “starf”,

NOTE that it is not important the first value “icelandic” that could be also setup with any other word (if isn’t already used as key for another value in the same array):  the important is the word starf
added as LOWER CASE, that you’ll use as Buddypress Profile Field  Name you’ll dedicate to the occupation field (and that will be recognized and synchronized also in phpBB). So you can use as field name in Buddypress Starf, or StarF, or any mixed lower/capital letters. Remember for these four (4 fields) that you can after name these Fields Names in Buddypress as lower or capital or both mixed letters, but exactly like the phrase or word that are setup as a values in one of these arrays.

WP_w3all phpBB integration and phpBB profile fields

Original post, shortcoded here is at this URL:
https://www.axew3.com/w3/forums/viewtopic.php?f=13&t=573&p=2300#p2300

About WP_w3all and Profile Fields integration

The WP_w3all integration between WordPress and phpBB, to be fully compatible without any change into his default queries (code), require that profile fields in phpBB are the same as these are into a default phpBB install. If not:

On a default WordPress install (no Buddypress) from WP_w3all 1.7.5, if phpBB profile fields not match the default install fields list, no error is thrown when user update his profile in WordPress, but no updates are done in phpBB except for email and password. So in this case there is no profile fields integration when update is done in WP side for others phpBB profile fields, except for email and password. On a default WordPress install by the way, unique other profile field that can really interest is the user's URL. It will not be updated in phpBB (when update is done via WP) if default number of phpBB profile fields on db mismatch or fields aren't named as a default phpBB install.
This may will be fixed on next version(s).

On WP + Buddypress, if on WP_w3all you go to activate Synchronize Buddypress/phpBB user's profile fields option, then you need to have the phpBB default Profile Fields configuration on phpBB. This is explained in this following procedure:

suppose that on phpBB, one of the default profile fields, let say the Website profile field for example, has been removed in
phpBB ACP -> Users and Groups Tab -> Custom profile fields
On updating user profile in WP, php return an error that +- will look like this: WordPress database error: [Unknown column 'pf_phpbb_website' in 'field list'] UPDATE phpbb_profile_fields_data SET pf_phpbb_website = 'http://php.net/' WHERE user_id = '2' Or suppose you have add one or more custom phpBB profile fields. Also in this case the WP_w3all plugin will return an error similar to the above.
The plugin integration of Buddypress fields with phpBB, as is at moment of this post, require that profile fields in phpBB are the same as these are into a default phpBB install.

If you have add custom (or removed) profile fields in phpBB than the default phpBB install, solutions are only two:

1) Eliminate custom profile fields in phpBB ACP, re-adding needed default fields if you deleted one or some of these, and/or eliminating what added as custom profile fields, if you have not delete any of default profile fields but only added. Follow with this procedure to resolve.

2) Directly edit the plugin queries code to match custom phpBB profile columns on DB. If necessary some help, post a topic on appropriate forum, i will be glad to help understand whenever necessary, if someone want resolve some issue in short. On next versions, the code about profile fields queries will be unified, and all will result more easy and comfortable to customize for any more advanced use of it. At moment of this post, there are some points (queries that are all the same), that need to be edited to match a non default phpBB install, profile fields configuration.

Procedure to reset to a default phpBB profile fields configuration, as it is when phpBB is installed.

phpBB 3.2 > profile fields

On phpBB 3.2 default profile fields are as follow:

phpbb_location, phpbb_website, phpbb_interests, phpbb_occupation, phpbb_aol, phpbb_icq, phpbb_yahoo, phpbb_facebook, phpbb_twitter, phpbb_skype, phpbb_youtube, phpbb_googleplus

On phpBB 3.1 < there is one more by default:
phpbb_wlm

which are referring to: location, website, interests, occupation, aol, icq ... etc profile fields, as you can imagine.

If there are fields you have add that aren't in the above list, and you have not delete any of these default phpBB profile fields, just remove custom fields you've add, and all is done.
If you need to recreate some of these, after you have delete added customs profiles fields, go to recreate these missed default fields in this way:

Open phpBB ACP -> Users and Groups Tab -> Custom profile fields
assuming for example we need to recreate the Website profile field, which is an URL (Link) field type, we'll go to recreate it with same default name for the field in the database, as was on default.
Before to click on Create new field button, choose from the options menu, right on the left of the button, the option URL (Link), than click Create new field button.
The page Add profile field display now.
There are various options to setup, but what is important and that need to be setup precisely with correct phpBB default value is the:

Field identification: The field identification is a name to identify the profile field within the database and the templates.
In this case, as Field identification value we'll put phpbb_website . Setup all the rest as you prefer.
Than click on button Profile type specific options
Than click on button Language specific options
Than click save.

Repeat these steps for each field you need to recreate, choosing the field type you need to recreate, following this list hint:

Field identification -> phpbb_location -> Single text field
Field identification -> phpbb_website -> URL (Link)
Field identification -> phpbb_interests -> Textarea
Field identification -> phpbb_occupation -> Textarea
Field identification -> phpbb_aol -> Single text field
Field identification -> phpbb_icq -> Single text field
Field identification -> phpbb_yahoo -> Single text field
Field identification -> phpbb_facebook -> Single text field
Field identification -> phpbb_twitter -> Single text field
Field identification -> phpbb_skype -> Single text field
Field identification -> phpbb_youtube -> Single text field
Field identification -> phpbb_googleplus -> Google+


phpBB 3.1< contain by default one field more (about Windows live messenger) that is the follow:

Field identification -> phpbb_wlm -> Single text field

WordPress Shortcode: phpBB posts into WP post

WP_w3all 1.7.4 or >

see also:
WordPress phpBB Latest phpBB Topics shortcode how to
Latest phpBB Topics by specific forums ids shortcode how to

phpBB posts – WP post shortcode how to

To add a WP_w3all shortcode, and display a phpBB post into a WordPress post, you need to choose a phpBB Post ID (note: post ID NOT Topic ID) to display, and add it into WordPress post, like this:

Change the value 1202 with the post ID you need to display.
( POST ID NOT TOPIC ID )

If you want display the post as plain text (so the bbcode will be removed from the output) use:

The simple bbcode parser function, display all default bbcode tags, excluded flash, attachments and email, check the list on this phpBB help page, phpBB bbcode how to
which are:

[b] [u] [i]  [list] (all lists type) [size] [color] [url] [image] [code]

added: [media] bbcode parsing (video etc embed)
useful if in phpBB is installed the media embed  mod.

Note: on this phpBB installation, is not installed the phpBB Media Embed mod to display media/video into phpBB posts,  by the way, adding the [media] bbcode into a phpBB post like this:

in this case the [media] bbcode into the real phpBB post will not be parsed (because  the Media Embed mod has not been installed in phpBB) but will be parsed into the WP post, because recognized and parsed by the WP_w3all plugin code.

It can be considered as 1.0 version, that work quite fine until bbcode tags structure is respected.

Here an example for a phpBB postID 2249
which you can see in phpBB at this link: https://www.axew3.com/w3/forums/viewtopic.php?f=13&t=566&p=2249#p2249

the shortcode used into this WP post to display the phpBB postID 2249, with bbcode formatted, will be this:

Shortcode output for post id 2249 is right here:

This is huge red text
so i want this text bold,
and after i like to display a piece of code: <?php function test() { $foo = "local variable"; echo '$foo in global scope: ' . $GLOBALS["foo"] . "\n"; echo '$foo in current scope: ' . $foo . "\n"; } $foo = "Example content"; test(); ?> then i want display a big test but without colorize it:
WoW! i like it ...
and i hev some list to display:
  • The first possible answer
  • The second possible answer
  • The third possible answer
in different format
  1. The first possible answer
  2. The second possible answer
  3. The third possible answer
and i want underline text
or quoted text:
una canzone per te
so a nice image:

then more strange bad code: <test />$find = array( '~\[img\].*?\[/img\]~si', // if there links/text for the image elsewhere, remove. Done above '~(^(\r\n|\r|\n))|^\s*$~m', ......... ); an url with text
Visit phpBB!
and an url
https://www.wordpress.org/
and more code for bbcode parsing: // partial bbcode regex $find = array( '~\[b\](.*?)\[/b\]~usi', '~\[i\](.*?)\[/i\]~usi', '~\[u\](.*?)\[/u\]~usi', '~\[quote\](.*?)\[/quote\]~usi', '~\[size=(.*?)\](.*?)\[/size\]~usi', ); and an image link also:



NOTE: on this phpBB example is not installed the phpBB Media Embed mod, to display video into phpBB posts, but if i add this bbcode into this phpBB post like this:

it will not be parsed into this phpBB post, because the mod has not been installed in phpBB, but will be parsed into the WP post because recognized and parsed by the WP_w3all plugin code.

you cannot add, expecting it will be parsed: an attachment, flash or email bbcode tag.
see the result of this post parsed into a WordPress post via Shortcode here: https://www.axew3.com/w3/2017/07/wordpress-shortcode-phpbb-posts-into-wp-post/

you need a more improved version of the function that do this? email me here: me@you.us
As you see was not so important to add email parsing .... (what?)

Cheers to all cool people!

WP_w3all for WordPress MS MU (Multisite, Multiuser network installations)

To configure WP_w3all on WordPress MS MU please read all the follow:

WP_w3ll plugin from 1.7.0 – WordPress MU MS  . The plugin can be also network activated, but the linked phpBB on each subsite, need to be the same (same path and same url setting value). If plugin is network activated, it is mandatory that the sub admin or super admin, setup/configure  into (each) subsite the same config of the main site for the integration plugin, because if not, when an user login into a subsite where the plugin is not configured, the phpBB cookie will not be released, and when same logged user visit the main site or another subsite where the plugin run instead configured, the user will be logged out. Registered phpBB users are added as users only into the FIRST WP site (or subsite) where users will login or that they will visits while coming already logged in into phpBB. *You could use a plugin to add coming phpBB logged users, into each or just few WordPress site/subsites they visits, see more below.

OPEN wp_config.php file:

search for line (value wp_ can be maybe different):

immediately after ADD:

 

BEWARE that if a different phpBB is linked on subsites, the integration in this state lead to unpredictable results! … in true it is very predictable what can happen, but really long to explain and too hard for my Eng! In short, it is NOT possible to link a different phpBB into WP network subsites with actual code.
Setup into sub-sites, if the plugin is network activated, same path and url in WP_w3all config, with same values of main site.

NOTE (advanced): WP_w3all phpBB integration plugin when an user is deleted in WordPress (so it become deactivated in phpBB, and then you may go to delete this user in phpBB) also clean up from signup table in WordPress this user. This is necessary for compatibility (as the code is) with phpBB integration to avoid that another user register with same email into phpBB (if you allow users to register also on phpBB side, and you have also deleted this user also in phpBB) while the user has been deleted in WP, but his email/username remain stored into WP database signups table for some more time.

*Hint: you could use a plugin to add coming phpBB logged users, into each WordPress they visits, or just to few, and with several different features:  search for Join My Multisite plugin at WordPress plugins directory.

WP_w3all .htaccess and Javascript for phpBB: rewrite URLs to point iframe how to (Spiders friendly)

Open .htaccess file of your phpBB root folder, search for this line:

just below add the follow:

Change on lines

RewriteRule . /yourwp/index.php/forum/?%3post_id=%5%6 [R,L]

and

RewriteRule . /yourwp/index.php/forum/?%3 [R,L]

the relative iframe URL that need to point to your correct WP forum page (leave index.php in place).

To help understand, this is the correct .htaccess code for this online working example:

WP page forum URL (that contain and display the iframe in this case): https://www.axew3.com/w3/forum/

Resulting .htaccess code based on this will be:

 

To complete the redirect flow to the iframe phpBB, embedded into WP page, for phpBB email notification messages links to point to iframe follow also with these two steps (get ready files for phpBB 3.2 on bottom of this page):

For email notification links that you want to redirect to iframe forum page of WP, assuming we point to three main behaviors we are interested in, which are for example PM notifications, New posts and Topics on forum, we need to change so 3 phpBB files in this way:

open folder  your-phpBB/phpBB/notification/type

on this folder, as working example, we go to open and so modify the following files:

pm.php, post.php, topic.php

on each file, you’ll find very similar code like this (in pm.php there is only one to change, on topic.php and post.php there are 4 or 5. Do not apply this edit to the last one string on post.php and topic.php):

you should change these urls, adding iframe=true& on each line, exactly after the ? char, like this:

Ready files for phpBB 3.2 zip:
notification-pm-post-topic-x_phpbb32_ready