Hi there lovely and cool people! Waiting for next steps, and doing something else, i would like to post the procedure as memo for when this will be added into documentation and (presumably)
overall_footer.html js will be little changed to avoid the change also into
page-forum, as is on this procedure example. Do not worry, the joke as will be rewrite soon, will be even more easy to apply.
So here the hint/memo on fly, to achieve the javascript redirect Just a preview how to of what will be.
open your
overall_header.html
and where this code:
or by the way, as soon is possible, inside
<head> </head> tags, add the following code:
Code: Select all
<script>
// START w3all redirect to iframe
(function() {
var r = window.location.href.indexOf("iframe=");
if(r > 0){ // avoid a loop
var red0 = window.location.href.split('/');
var u = red0[red0.length-1].replace("iframe=true&","");
var red1 = window.btoa(unescape(encodeURIComponent(u)));
var red2 = 'https://localhost/mysite/forum/?w3=' + red1;
window.location.replace(red2);
}
})();
// END w3all redirect to iframe
</script>
on code added change
Code: Select all
var red2 = 'https://localhost/mysite/forum/?w3=' + red1;
to fit your needs. It need to point to your wp iframed phpBB page, so may something like this:
Code: Select all
var red2 = 'https://mysite.com/wordpress/board/?w3=' + red1;
Note
https://mysite.com/wordpress/board
that point to wordpress iframed wordpress page.
Save, remember to recompile phpBB template.
Now open your page-forum.php on your active template folder (or page-board or whatever named) and search for this code:
Code: Select all
if( isset($_GET["w3"]) ){
$phpbb_url = base64_decode($_GET["w3"]);
$phpbb_url = trim(utf8_encode($phpbb_url));
if( preg_match('/[^-0-9A-Za-z\._#\:\?\/=&%]/i',$phpbb_url) ){
$w3all_url_to_cms = $w3all_url_to_cms;
} else {
$phpbb_url = substr($phpbb_url, 1);
$w3all_url_to_cms = $w3all_url_to_cms . "".$phpbb_url."";
}
}
change with this:
Code: Select all
if( isset($_GET["w3"]) ){
$phpbb_url = base64_decode($_GET["w3"]);
$phpbb_url = trim(utf8_encode($phpbb_url));
if( preg_match('/[^-0-9A-Za-z\._#\:\?\/=&%]/i',$phpbb_url) ){
$w3all_url_to_cms = $w3all_url_to_cms;
} else {
if($phpbb_url[0] != '/'){
$w3all_url_to_cms = $w3all_url_to_cms . "/" . "".$phpbb_url."";
} else {
$phpbb_url = substr($phpbb_url, 1);
$w3all_url_to_cms = $w3all_url_to_cms . "".$phpbb_url."";
}
}
}
Now it is necessary to add the needed var on phpBB email template files sent out as explained on this article:
https://www.axew3.com/w3/2017/04/wp-w3a ... me-how-to/
NOTE: NOT CONSIDER on the article, as may obvious, the part about
.htaccess, (remove it if previously using, by apply this js way) but just the example on how to edit phpBB notification email template files, adding the needed var and related value:
iframe=true
Cheers to all cool people
Hi there lovely and cool people! Waiting for next steps, and doing something else, i would like to post the procedure as memo for when this will be added into documentation and (presumably) [i]overall_footer.html[/i] js will be little changed to avoid the change also into [i]page-forum[/i], as is on this procedure example. Do not worry, the joke as will be rewrite soon, will be even more easy to apply.
So here the hint/memo on fly, to achieve the javascript redirect Just a preview how to of what will be.
open your [i]overall_header.html[/i]
and where this code:
[code]<!-- IF S_ENABLE_FEEDS -->[/code]
or by the way, as soon is possible, inside [i]<head> </head>[/i] tags, add the following code:
[code]<script>
// START w3all redirect to iframe
(function() {
var r = window.location.href.indexOf("iframe=");
if(r > 0){ // avoid a loop
var red0 = window.location.href.split('/');
var u = red0[red0.length-1].replace("iframe=true&","");
var red1 = window.btoa(unescape(encodeURIComponent(u)));
var red2 = 'https://localhost/mysite/forum/?w3=' + red1;
window.location.replace(red2);
}
})();
// END w3all redirect to iframe
</script>[/code]
on code added change
[code]var red2 = 'https://localhost/mysite/forum/?w3=' + red1;[/code]
to fit your needs. It need to point to your wp iframed phpBB page, so may something like this:
[code]var red2 = 'https://mysite.com/wordpress/board/?w3=' + red1;[/code]
Note [c]https://mysite.com/wordpress/board[/c]
that point to wordpress iframed wordpress page.
Save, remember to recompile phpBB template.
Now open your page-forum.php on your active template folder (or page-board or whatever named) and search for this code:
[code]if( isset($_GET["w3"]) ){
$phpbb_url = base64_decode($_GET["w3"]);
$phpbb_url = trim(utf8_encode($phpbb_url));
if( preg_match('/[^-0-9A-Za-z\._#\:\?\/=&%]/i',$phpbb_url) ){
$w3all_url_to_cms = $w3all_url_to_cms;
} else {
$phpbb_url = substr($phpbb_url, 1);
$w3all_url_to_cms = $w3all_url_to_cms . "".$phpbb_url."";
}
}[/code]
[b]change with this:[/b]
[code]if( isset($_GET["w3"]) ){
$phpbb_url = base64_decode($_GET["w3"]);
$phpbb_url = trim(utf8_encode($phpbb_url));
if( preg_match('/[^-0-9A-Za-z\._#\:\?\/=&%]/i',$phpbb_url) ){
$w3all_url_to_cms = $w3all_url_to_cms;
} else {
if($phpbb_url[0] != '/'){
$w3all_url_to_cms = $w3all_url_to_cms . "/" . "".$phpbb_url."";
} else {
$phpbb_url = substr($phpbb_url, 1);
$w3all_url_to_cms = $w3all_url_to_cms . "".$phpbb_url."";
}
}
}[/code]
Now it is necessary to add the needed var on phpBB email template files sent out as explained on this article:
[url]https://www.axew3.com/w3/2017/04/wp-w3all-htaccess-phpbb-rewrite-links-point-iframe-how-to/[/url]
[b]NOTE: NOT CONSIDER[/b] on the article, as may obvious, the part about [i].htaccess[/i], (remove it if previously using, by apply this js way) but just the example on how to edit phpBB notification email template files, adding the needed var and related value: [c]iframe=true[/c]
Cheers to all cool people ;)