phpBB WordPress template integration (iframe v3)

v3 version (for cool people) old v2 version is here

NOTE THAT THIS CODE IS SUITABLE UNTIL 1.9.8 or <

Cool people are actually using version 4:

phpBB WordPress template integration (iframe v4)

THIS IS OLD CODE! REFER TO V4 IFRAME CODE FOR WP_W3ALL 1.9.9 OR >

phpBB WordPress template integration (iframe v4)

PAGE HELP – JS code – UPDATED on 24 Feb 2019
(related views/page-forum.phpupdated on 3 Gen 2019)

/trunk/addons/page-forum.php

phpBB SEO mods compatible

wp_w3all plugin 1.9.4 >

(READ ALL this page)

wp_w3all responsive iframe procedure v3

After you built/create the WP forum template page via option
WP_w3all phpBB embedded on WordPress Template
on WP_w3all admin config page, and the blank page on WordPress Admin -> Pages -> Add New, titled the same of created wp_w3all template page, so forum or board  etc (then you’ll have into your active WordPress template folder a file named page-forum.php or page-board.php etc), to complete the procedure and get the responsive iframe height for the embedded/iframed phpBB into WordPress template page you need:

Open with a text editor your phpBB template file overall_footer.html

and just before the closing </body> tag, add this code (do not select rows numbers on copied code):

after you pasted this code into phpBB overall_footer.html
edit following lines:

change axew3.com to fit your domain name (example axew3.com)
do NOT add http(s):// OR the point in front nor anything else, just add
yourdomain.com or set it as localhost if on localhost test. If phpBB is at subdomain.domain.com, add domain.com as value
(MANDATORY!) or resizer won’t work
now check the other line to change:

change value
https://www.axew3.com/w3/forum
on this line, to point to the URL of the WordPress created/named forum page (do not add final slash and change http or https as needed)
MANDATORY!

Finally, check this line

in the code you added (last line): this should correctly point to the iframeResizer.contentWindow.min.js file that you’ll go to add into phpBB root folder. You need to use the absolute URL (use http or https as needed, and adjust the url to fit your needs)
(MANDATORY!) or resizer won’t work

AFTER EDITED, save and load the modified overall_footer.html into your phpBB style folder, overwriting the default one, and so

load through ftp on the phpBB root folder (or copy/paste), the file
iframeResizer.contentWindow.min.js
that is contained inside folder
wp/wp-content/plugins/wp-w3all-phpbb-integration/addons/resizer

After this, phpBB require to recompile the template, or modifications to template files not affect (to overall_footer.html in this case). Open phpBB ACP, and so under:

Server Configuration -> Load settings -> Recompile stale style components set to YES and save. Load one time a phpBB full forum page. Leave as is at moment, especially if you follow adding also the code on overall_header.html (more below) to redirect any phpBB direct URL to the iframed WP page: then after tested that all work fine, may return to ACP, and reset to NO and save. This step is needed to load the template modifications on phpBB (and any time you edit a phpBB template file to for modifications take effect), but this option should be ever set to NO into an online/production site to save server resources. It is normally set to yes only for testing/devel purpose or to apply modifications on phpBB templates files.

Notification email links to point to iframe: follow read more below for the pure Javascript solution. Refer to v2 or v1 code for htaccess or js solution editing phpBB notifications files.

The new V3 w3all iframe code do not use anymore htaccess to force redirect as on V1 code, and substantially not rewrite URLs forcing redirect to iframe, but use pure Javascript (reload) code, that as you may imagine, lead to some different result: you’ll not have to edit phpBB notification links on phpBB notification files as on V1 or V2 code, to force users redirect to iframe when they click on notification email link. But in this case, any user except bots, will be redirected (as code is, but it can be easily changed to assume different behaviors, may excluding admins or moderators etc) to the WP iframed page, if the forum accessed via real phpBB url.

To apply same smooth scroll effect as it is on this online example, after finished with this procedure, follow with this steps:

Smooth scroll for phpBB WordPress template integration (iframe v3)



If you want phpBB email notification links or any phpBB direct url to be redirected to wp iframed forum page using pure javascript, follow this step:

Open with a text editor your phpBB template file overall_header.html

and just immediately after this code (or by the way, before the closing tag </head>)

add the following code:

On added code, change URL on the line where (line 3):

to fit/point to the WordPress iframed forum page: DO NOT ADD final slash and setup as http or https as needed.

NOTE: if you added the code above into phpBB overall_header.html then you’ll need to remove or comment out this part by the code you added into the overall_footer.html:

Recompile phpBB template and reset to no the option when changes applied

whenever you want: to get the iframe responsive for ACP phpBB admin panel, read this post. My (personal) suggestion is to stop here and try to use the integration leaving ACP out of iframe joke. If by the way you want to follow, before to apply then you’ll have to little change the above code for overall_footer.html and overall_header.html in this way:

on code for overall_footer.html remove this part:

on code for overall_header.html remove this part:

change into: