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.

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
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!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.