WP_w3all .htaccess and Javascript for phpBB: rewrite URLs to point iframe how to (Spiders friendly)

Open .htaccess file of your phpBB root folder, search for this line:

just below add the follow:

Change on lines

RewriteRule . /yourwp/index.php/forum/?%3post_id=%5%6 [R,L]

and

RewriteRule . /yourwp/index.php/forum/?%3 [R,L]

the relative iframe URL that need to point to your correct WP forum page (leave index.php in place).

To help understand, this is the correct .htaccess code for this online working example:

WP page forum URL (that contain and display the iframe in this case): https://www.axew3.com/w3/forum/

Resulting .htaccess code based on this will be:

 

To complete the redirect flow to the iframe phpBB, embedded into WP page, for phpBB email notification messages links to point to iframe follow also with these two steps (get ready files for phpBB 3.2 on bottom of this page):

For email notification links that you want to redirect to iframe forum page of WP, assuming we point to three main behaviors we are interested in, which are for example PM notifications, New posts and Topics on forum, we need to change so 3 phpBB files in this way:

open folder  your-phpBB/phpBB/notification/type

on this folder, as working example, we go to open and so modify the following files:

pm.php, post.php, topic.php

on each file, you’ll find very similar code like this (in pm.php there is only one to change, on topic.php and post.php there are 4 or 5. Do not apply this edit to the last one string on post.php and topic.php):

you should change these urls, adding iframe=true& on each line, exactly after the ? char, like this:

Ready files for phpBB 3.2 zip:
notification-pm-post-topic-x_phpbb32_ready

Embed phpBB into WordPress template:
iframe responsive how to

PAGE HELP – UPDATED: 25 Mag 2018
(related views/page-forum.php – updated 27 Sep 2017)
/trunk/addons/page-forum.php

wp_w3all responsive iframe procedure

After you’ve built/created the WP forum template page via
WP_w3all phpBB embedded on WordPress Template
option 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…, to complete the procedure and get the responsive iframe height for the embedded phpBB into WordPress template page you need:

Open with a text editor your phpBB template file overall_footer.htmlafter line

OR just before the closing </body> tag, add this code (take care to not add lines numbers column on code you copy!):

after you’ve past this code into phpBB overall_footer.html edit the second line of the code you’ve add:

change localhost with your domain name (example axew3.com), do NOT add here http(s):// OR the point in front, just add
yourdomain.com or leave localhost if on localhost. If phpBB is at subdomain.domain.com, add domain.com as value
(THIS IS 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 with ftp on phpBB root folder, the file
iframeResizer.contentWindow.min.js
that is contained inside folder
YOURWP/wp-content/plugins/wp-w3all-phpbb-integration/addons/resizer 

NOTE: if your iframe do not resize, the problem is that the file iframeResizer.contentWindow.min.js isn’t loaded correctly: check the line

in the code you have add on overall_footer.html, that should point correctly to iframeResizer.contentWindow.min.js. You can also use an absolute URL (use http or https as needed)

After this, phpBB require to recompile the template, or modifications to his 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. So return to ACP and reset to NO, save. This step is needed one time to load the template modifications on phpBB (and any time you edit a phpBB template file to make modfications take effect), but this option should be ever set to NO into an online/production site to save server resources. It is normally set it to yes only for testing/devel purpose or to apply modifications on phpBB  templates files.



If you need phpBB email notification links to point to iframe, follow this step about htaccess:

phpBB htaccess for phpBB notification email to point WP forum page (1.6.9>)

to activate also the rewrite right click/copy links on iframe, to point iframe WP page, remove the two lines that wrap code about (as inline code explained) in the code you have add, where:

/* // remove this line to activate click /copy/paste/ links x htaccess

and

*/ // remove this line to activate click /copy/paste/ links x htaccess

NOTE: to get the iframe to be responsive for ACP phpBB admin panel, read this post.

If any question, use the forum here or at wordpress.org wp-w3all-phpBB