[w3allcustomiframe] shortcode how to

check all others shortcodes listed under the “common how” to section

Note: this shortcode work only if it is activated option into WP plugin’s admin (advanced shortcode):

Activate [w3allcustomiframe] shortcode

It may require you to know something about iframes and how they work, but looking into examples may you can easily understand the way:

the shortcode to embed a page need to be used for example like this:

Params
resizer
check_origin
url_to_display
css_iframe_wrapper_div
css_iframe_elem_iframe

resizer (yes/no)
default false. * use the iframe resizer or not (if no may pass fixed width and height values for the iframe to display, via css_iframe_elem_iframe param)

checkOrigin (true/false)
Default true. See checkOrigin reference.
Pass false to disable.
To provide a value for checkorigin, set this param (for example) to https://mysite.com (it will be so converted into array to pass the valid domain value you want to set)

url_to_display (url)
the src url to the page that the iframe will point to

css_iframe_wrapper_div (inline css inside attribute style=”…”)
css inline style of the iframe wrapper, element <div style="..."

css_iframe_elem_iframe (inline style inside attribute style=”…”)
css inline style for the element <iframe style="..."

* Note: to use the iframe resizer, the page that contain the content to display, that reside outside WordPress (like the integrated phpBB forum into this online example) need to embed this code just before the closing </body> tag:

The iframeResizer.contentWindow.min.js file to point to can be copied into plugin folder:

wp-content/plugins/wp-w3all-phpbb-integration/addons/resizer

and added/pasted where necessary

A shortcode example:

The follow example, display the content within this domain: since using resizer, it has been necessary to add the iframe resizer lib into the phpBB template file viewtopic_print.html, just before the closing </body> tag. Click into links to see behavior (pages within this domain will continue to display, and (may, may not) also some other external link you’ll click will load here)

[w3allcustomiframe resizer=”yes” check_origin=”https://www.axew3.com” url_to_display=”https://www.axew3.com/w3/forums/viewtopic.php?f=3&t=1431&view=print”]

WordPress phpBB Latest phpBB Topics shortcode by forums IDS

WP_w3all 1.8.8 or >

Vers. 1.0

check all others shortcodes listed under the “common how” to section

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

This feature use the same avatar’s settings choose in WP_w3all config page. Since 2.5.5> you can suppress/remove avatars on each shortcode using this param:

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

From 1.9.7 > (vers. 2)

From Wp_w3all 1.9.7 it is possible to use 3 attributes more on this shortcode which are:

NOTE: if w3_ul_class attribute used, then all these three attributes are processed to be used on the shortcode output. If not present this attribute, the old shortcode way apply.

w3_ul_class=”myClassXUL” will assign myClassXUL class to the UL element wrapper.


w3_li_class=”myClassXLI” will assign myClassXLI class to LI elements inside the UL.

w3_inline_style=”list-style=none;” will output the inline style style=”
list-style=none;”

if going to use w3_inline_style note that special characters inside this attribute, may require to be escaped.

WordPress Shortcode: last phpBB topics/posts into WP post

Vers. 1.0

check all others shortcodes listed under the “common how” to section

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 use the same avatar’s settings choose in WP_w3all config page. Since 2.5.5> you can suppress/remove avatars on each shortcode using this param:

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).

Note: that same activated options (like the “Exclude phpBB forums from listing on Last Topics Posts“) in plugin admin, affect this shortcode.

From 1.9.7 > (vers. 2)

From Wp_w3all 1.9.7 > it is possible to use 3 attributes more on this shortcode which are:

NOTE: if w3_ul_class attribute used, then all these three attributes are processed to be used on the shortcode output. If not present this attribute, the old shortcode way apply.

w3_ul_class=”myClassXUL” will assign myClassXUL class to the UL element wrapper.


w3_li_class=”myClassXLI” will assign myClassXLI class to LI elements inside the UL.

w3_inline_style=”list-style=none;” will output the inline style style=”
list-style=none;”

if going to use w3_inline_style note that special characters inside this attribute, may require to be escaped.

WordPress shortcode for comments, widgets and excerpts

The following add_filter lines of code that will activate shortcode for Posts Comments, Widgets and Excerpts in WordPress, could also be added into your theme functions.php file.

Or if you wish, you can add it on WP_w3all plugin (that allow you to show phpBB posts into WordPress) inside the wp_w3all.php file (NOTE: when plugin update you’ll lost these modifications).

Open wp_w3all.php and search for line:

immediately after, add the follow line/s, about what/where you want to activate shortcode

Activate shortcode for Posts Comments:

Activate shortcode for Widgets:

Activate shortcode for Excerpt:

As said above, you could instead add these “activation” code lines for shortcode in Posts Comments, Widgets or Excerpts in WordPress, into the functions.php file of your WordPress theme.

WordPress Shortcode: phpBB posts into WP post

WP_w3all 1.7.4 or >

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:

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:

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

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: [media] bbcode parsing (video etc embed)
useful if in phpBB installed the media embed  mod.

Note: on this phpBB installation, it 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 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:

Shortcode output for post id 2249 is right here:

This is huge red text
So i want an image in attach inline
southpcheers.jpg
southpcheers.jpg (21.54 kb)

then a file inline in attach
phpseclib1.0.19.zip (273.42 kb)
then 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 text without colorize it:
WoW! i like it ... but could be better
and i have some lists 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
but i like also to see the underline text
or quoted text:
this text is quite quoted
so a nice image:

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 text
Visit phpBB!
and an url
https://www.wordpress.org/
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:



NOTE: on this phpBB example it 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: 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!