check all others shortcodes listed under the “common how” to section
phpBB posts – WP post shortcode how to
To add a WP_w3all shortcode, and display a phpBB post into a WordPress post, choose a phpBB Post ID (note: post ID NOT Topic ID) to display, and add it into WordPress post, like this:
[w3allforumpost id="1202"]
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 by the output) use:
[w3allforumpost id="1202" plaintext="1"]
If you want to display with specified number of words, use the parameter/attribute wordsnum (both plaintext and wordsnum can be used together) . Note that may you have to adjust wordsnum parameter to a number of words to be retrieved that will output exactly what you want, because the count of words will include html tags
[w3allforumpost id="1202" wordsnum="350"]
The simple bbcode parser function, display all default bbcode tags, excluded flash and email, check the list on this phpBB help page, phpBB bbcode how to
which are:
[attachment] [b] [u] [i] [list] (all lists type) [size] [color] [url] [image] [code]
added:
in this case the [media] bbcode into the real phpBB post will not be parsed (because the Media Embed mod has not been installed into this phpBB) but will be parsed into the WP post, because recognized by the plugin code, and parsed by WordPress.
It can be considered as 1.0 version, that work quite fine until bbcode tags structure is respected.
Follow an output example for a phpBB postID 2249
which you can see here in phpBB:
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:
[w3allforumpost id="2249"]
Shortcode output for post id 2249 is right here:
So i want an image in attach inline
southpcheers.jpg (21.54 kb)
then a file inline in attach
phpseclib1.0.19.zip (273.42 kb)
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 text without colorize it:
and i have some lists to display:
- The first possible answer
- The second possible answer
- The third possible answer
- The first possible answer
- The second possible answer
- The third possible answer
or quoted text:
so a nice image:this text is quite quoted
then more 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', .........
);
and an url with textand an url
and more code for bbcode to be parsed:
// 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:see the result of this post parsed into a WordPress post via Shortcode here:
you need a more improved version of the function that do this? email me here:
As you see was not so important to add email parsing …. (what?)
Cheers to all cool people!