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:
1 |
[w3allcustomiframe resizer="yes" check_origin="https://localhost" url_to_display="https://localhost/phpBB3/viewtopic.php?f=2&t=1&start=10&view=print"] |
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:
1 |
<script type="text/javascript" src="https://mysite/iframeResizer.contentWindow.min.js" defer> |
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:
1 |
[w3allcustomiframe resizer="yes" check_origin="false" url_to_display="https://mysite/mypage_outside_wp.html" css_iframe_wrapper_div="margin:10px;padding:5px;background-color:#f3f3f3"] |
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)
1 |
<script type="text/javascript" src="https://www.axew3.com/w3/forums/iframeResizer.contentWindow.min.js" defer></script> |
1 |
[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"] |
[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”]