Page 1 of 8
Last topic widget + registration redirect to iframe
Posted: Tue Feb 18, 2020 1:09 pm
by Dysphoria
Hey there,
At the moment I have the widget 'Last topics' installed on my side menu and I made the registration page always redirect to the phpBB3 registration page.
All works fine, but when I click on those links, I get redirected to my real phpBB3 forum. So not the one embedded in the Iframe on wordpress. Is it possible to always make me redirect to the phpBB3 forum in the iframe?
Re: Last topic widget + registration redirect to iframe
Posted: Tue Feb 18, 2020 9:22 pm
by axew3
Yes! Set to
Yes the option
Last Topics links for embedded phpBB iframe into WordPress
It should be maybe fixed about inline hints to explain better, that setting this option as yes, also these links will points so to the wp page forum and not real urls.
Thank to this, i checked that the result into widget about registration, point to:
Code: Select all
https://www.axew3.com/w3/index.php/index.php/forum/?mode=sendpassword
instead that:
Code: Select all
https://www.axew3.com/w3/index.php/forum/?mode=sendpassword
It do not cause any issue here into this install, the Last Pass link correctly redirect by the way to
Code: Select all
https://www.axew3.com/w3/forum/?mode=sendpassword
but need to be fixed, even if it do not cause any issue here, may it is not the same into another server configuration. It will be fixed as soon together with a more precise html markup into related default /views/ widget/shortcode files.
P.s you abandoned the js iframe overall_header.html code?
Because with the overall_header.html js code, you should be redirected in any case to the wp forum page.
You can always disable javascript on browser and access the real phpBB url any time if in rare cases you are in trouble and you do not know more advanced ways to come out from problems when overall_header.html code applied.
Re: Last topic widget + registration redirect to iframe
Posted: Tue Feb 18, 2020 9:47 pm
by Dysphoria
That worked perfectly, thank you!
Sorry, what do you mean? You mean the code I had to put in the overall_header.html of my template or?
Re: Last topic widget + registration redirect to iframe
Posted: Tue Feb 18, 2020 10:10 pm
by axew3
yes! the phpBB overall_header.html js code to be added to fully integrate as iframe, that redirect all direct links that points to phpBB, to the wordpress forum page (that contain the phpBB iframe).
Of course, you can use or not. Consider that as you see here, any email notification link for example, that as you can see on email is the direct real phpBB url, is instead after redirected to the wp page (this the overall_header js code do), while without overall_header javascript code, the real phpBB url will display (almost until javascript is active on browser).
Same goes for all direct phpBB links, if the javascript overall_header code has not been added, real phpBB url will display/be opened. That's maybe obvious.
Re: Last topic widget + registration redirect to iframe
Posted: Wed Feb 19, 2020 7:48 am
by Dysphoria
Just to be sure, you mean this code right?
Code: Select all
<!-- IF not S_IS_BOT --><script>
// START MANDATORY CHANGES
var wordpress_url_page_f = 'https://talkatastic.be/forum'; // MANDATORY! // (DO NOT ADD/INCLUDE final slash here) Url that point to your iframed wordpress forum page
var w3all_custom_wp_w3fancyurl = 'w3' // MANDATORY! If you changed w3 to have 'fancy URL' query string for the WP page forum, then change this value to match what your fancy URL setting is after you changed it on plugin admin page
// END MANDATORY CHANGES
function w3all0Normalize_phpBBUrl(u){
var bu = "{BOARD_URL}";
w3allappend = "{BOARD_URL}";
if ( /^https?/ig.exec(u) !== null ){
phpbburl = u.split(bu);
w3allappend = phpbburl[1];
}
if(/^\W/ig.exec(w3allappend) !== null){
w3allappend = w3allappend.split(/^.+?(\w+.+)$/);
if(w3allappend[1]){
w3allappend = w3allappend[1];
}
if ( w3allappend[1] && w3allappend[1].charAt(0) == '/' ){
w3allappend = w3allappend[1].substr(1);
}
}
return w3allappend;
}
if ((window.self !== window.top) != true) {
if(/adm\//ig.exec(window.location.href) === null){ // avoid x ACP
var w3all_r = window.location.href.replace(/sid=.+/gi, '');
w3all_r = w3all0Normalize_phpBBUrl(w3all_r);
hrefEnc = window.btoa(unescape(encodeURIComponent(w3all_r)));
href0 = wordpress_url_page_f + '/?'+ w3all_custom_wp_w3fancyurl + '=' + hrefEnc;
//document.location.replace(href0);
}}
// END force w3all to iframe redirect
</script>
<!-- ENDIF -->
Re: Last topic widget + registration redirect to iframe
Posted: Wed Feb 19, 2020 7:53 am
by axew3
Yes! Oh S*IT! (sorry)
Code: Select all
//document.location.replace(href0);
to correctly work need to be of course:
it will be immediately fixed in the online code snippet!
https://www.axew3.com/w3/2020/01/phpbb- ... iframe-v5/
and again you see, i need to thank you that let me know that there is something to fix!