{"id":5794,"date":"2022-02-13T19:00:28","date_gmt":"2022-02-13T18:00:28","guid":{"rendered":"https:\/\/www.axew3.com\/w3\/?p=5794"},"modified":"2025-11-30T23:33:54","modified_gmt":"2025-11-30T22:33:54","slug":"the-awesome-iframe-template-integration-using-shortcode","status":"publish","type":"post","link":"https:\/\/www.axew3.com\/w3\/2022\/02\/the-awesome-iframe-template-integration-using-shortcode\/","title":{"rendered":"The (awesome) iframe template integration using shortcode"},"content":{"rendered":"\n<h2 class=\"wp-block-heading has-custom-cyan-1-color has-text-color has-link-color has-x-large-font-size wp-elements-1\" style=\"margin-top:var(--wp--preset--spacing--10);margin-bottom:var(--wp--preset--spacing--10)\"><strong>WordPress phpBB template integration<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">NOTE that required settings of this shortcode resides under the WP_w3all Preferences menu.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To use the <em>w3allphpbbiframe shortcode<\/em> it is required to apply into the phpBB template files <strong>overall_header.html<\/strong> and <strong>overall_footer.html<\/strong> the javascript code as explained into this <a href=\"https:\/\/www.axew3.com\/w3\/2020\/01\/phpbb-wordpress-template-integration-iframe-v5\/\"><strong>page procedure<\/strong><\/a>, and the result will be a full template integration that can be applied into any WP theme.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">NOTE that it is <strong>Mandatory<\/strong> to set the WP page-name where the shortcode will be added, into the related shortcode option field of the integration plugin admin page, <strong>or the shortcode simply will not fire<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">then use like this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;w3allphpbbiframe wp_page_name=\"board\" wp_page_iframe_top_gap=\"300\"]<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>wp_page_name<\/strong> param refer to the page\/post name\/slug where the shortcode will be added (see hint below about this param if omitted*)<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>wp_page_iframe_top_gap<\/strong> param refer to (in pixel) the position where the WP parent page will scroll to by default. If omitted the value will be 0<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>url_push<\/strong> param if omitted is set to YES, that mean when links are clicked into the phpBB iframe, the URL will be pushed into the browser\u2019s address bar. If you want to avoid this behavior, use\/add this param like this into the shortcode: <code>url_push=\"no\"<\/code><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">note that the URL push is always avoided when the shortcode is used into the homepage and should in several more conditions. In short words, in all these situations where, when if the URL is pushed into the parent address bar, it cause\/lead to a WordPress page NOT found, in the case that there is an intentionally browser\u2019s page reload (because the pushed URL is an URL that WP will not found)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>phpbb_default_url<\/strong> param (that can be omitted) refer to any phpBB URL where the iframe will be opened by default, so the above become something like this, to display into a WP post the phpBB, that should open by default into a precise forum topic\/post or any other page:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;w3allphpbbiframe phpbb_default_url=\"https:\/\/www.axew3.com\/w3\/forums\/viewforum.php?f=2\" wp_page_name=\"board\" wp_page_iframe_top_gap=\"300\"]<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-custom-cyan-1-color\">NOTE<\/mark><\/strong> that it is mandatory to set the WP pages names\/slugs where the shortcode will be added, into the related shortcode option field, on the integration plugin admin page, <strong>or the shortcode will not fire!<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">See the Option: <em>The (awesome) iframe template integration using shortcode<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>scroll_default<\/strong> param if omitted is set to YES by default. To avoid the page scroll behavior set it to no: <code>scroll_default=\"no\"<\/code><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To edit some css\/html output or something else if required, relevant files to look into are:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>\/wp-content\/plugins\/wp-w3all-phpbb-integration\/common\/<strong>wp_phpbb_iframe_shortcode.php<\/strong><\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>\/wp-content\/plugins\/wp-w3all-phpbb-integration\/views\/<strong>wp_w3all_phpbb_iframe_short.php<\/strong><\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Note that these two files can be edited as more like and then, activating the related option on plugin admin <em><strong>Use custom files to display Last Topics Widgets, Login Widget and Shortcodes<\/strong><\/em>, and coping these files into the custom folder <em>\/wp-content\/plugins\/<strong>wp-w3all-custom<\/strong><\/em>, when the plugin will be updated, modifications will not be lost.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">*Note <em>wp_page_name<\/em> param: if using Plain permalinks, for example the page name for a post would be <em>p=45<\/em> or if it is a page, <em>page_id=12<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Note important:<\/strong> if the iframe do not display and you get mixed insecure content on the browser\u2019s console, you have to fix it doing this:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">open your WP <em>header.php<\/em> template file, may just after the others header meta tags add the follow:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;meta http-equiv=\"Content-Security-Policy\" content=\"upgrade-insecure-requests\"&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Follow instructions into the plugin admin page where there is the <em>iframe template integration using shortcode<\/em> related option.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"has-large-font-size wp-block-paragraph\"><strong>Example:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;w3allphpbbiframe url_push=\"no\" phpbb_default_url=\"https:\/\/www.axew3.com\/w3\/forums\/viewtopic.php?t=774\" wp_page_name=\"the-awesome-iframe-template-integration-using-shortcode\" scroll_default=\"no\"]\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>will render something like this:<\/strong><\/p>\n\n\n<p>[w3allphpbbiframe url_push=&#8221;no&#8221; phpbb_default_url=&#8221;https:\/\/www.axew3.com\/w3\/forums\/viewtopic.php?t=774&#8243; wp_page_name=&#8221;the-awesome-iframe-template-integration-using-shortcode&#8221; scroll_default=&#8221;no&#8221;]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>WordPress phpBB template integration NOTE that required settings of this shortcode resides under the WP_w3all Preferences menu. To use the w3allphpbbiframe shortcode it is required to apply into the phpBB template files overall_header.html and overall_footer.html the javascript code as explained into this page procedure, and the result will be a full template integration that can [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,234],"tags":[42,178,41],"class_list":["post-5794","post","type-post","status-publish","format-standard","hentry","category-wordpress-phpbb-integration","category-wordpress-phpbb-shortcodes","tag-phpbb","tag-template-integration","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/www.axew3.com\/w3\/wp-json\/wp\/v2\/posts\/5794","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.axew3.com\/w3\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.axew3.com\/w3\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.axew3.com\/w3\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.axew3.com\/w3\/wp-json\/wp\/v2\/comments?post=5794"}],"version-history":[{"count":2,"href":"https:\/\/www.axew3.com\/w3\/wp-json\/wp\/v2\/posts\/5794\/revisions"}],"predecessor-version":[{"id":9005,"href":"https:\/\/www.axew3.com\/w3\/wp-json\/wp\/v2\/posts\/5794\/revisions\/9005"}],"wp:attachment":[{"href":"https:\/\/www.axew3.com\/w3\/wp-json\/wp\/v2\/media?parent=5794"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.axew3.com\/w3\/wp-json\/wp\/v2\/categories?post=5794"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.axew3.com\/w3\/wp-json\/wp\/v2\/tags?post=5794"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}