Page 1 of 2

phpBB embedded on WordPress - Resize not working

Posted: Fri Mar 20, 2020 6:54 am
by KlausiMaus
Hi,

I have some trouble wit the resizing of my forum page.

I have changed the overall_footer.html

Code: Select all

// START MANDATORY CHANGES
document.domain = 'kuhnert.ch'; // MANDATORY! // Set/Change this value to fit your domain (example: axew3.com (or leave localhost if on localhost)) 
var wordpress_url_page_forum = 'https://kuhnert.ch/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 into WP plugin admin, then change this value to match what your choosed fancy URL setting is
// END MANDATORY CHANGES
But resize will not work.

I have moved to a new web host with my site, from Windows//IIS to Linux/Apache.
I've had already some trouble with that since Linux is case-sensitive and Windows not,

Re: phpBB embedded on WordPress - Resize not working

Posted: Fri Mar 20, 2020 11:02 pm
by axew3

Re: phpBB embedded on WordPress - Resize not working

Posted: Sat Mar 21, 2020 10:31 pm
by KlausiMaus
Hi.

I have now also adjusted the "forum page" as described in your link, only nothing has changed.
Only the header of the forum appears and unfortunately not the whole page.
https://kuhnert.ch/forum/

The forum runs under subdomain "https://forum.kuhnert.ch/" and the files are directly in the root of the subdomain

WordPress is a bit different, the WordPress structure is not in the root of the domain, but in the WP directory.
That comes from the integration with TNG (https://www.tngsitebuilding.com/) which also works.

So:
kuhnert.ch/WP
kuhnert.ch/TNG

the page is accessed from the root, i.e. from kuhnert.ch/

This may have something to do with the problem, but this construction worked without any problems with my old web hosting.

What can I do now?

Thanks,
Klaus

Re: phpBB embedded on WordPress - Resize not working

Posted: Sun Mar 22, 2020 11:54 pm
by axew3
Hello Klaus!
open page-forum.php into your wp template folder and edit trusted domains line:
change

Code: Select all

var w3all_orig_domains = ['".$w3all_orig."','".$w3all_orig_www."','https://localhost','http://localhost','https://kuhnert.ch','http://kuhnert.ch'];
as actually is, into

Code: Select all

var w3all_orig_domains = ['https://kuhnert.ch','https://www.kuhnert.ch','https://forum.kuhnert.ch','http://forum.kuhnert.ch','https://kuhnert.ch','http://kuhnert.ch'];
i note also another error (but this is not related on how you configured things), that i will check asap and return back, may it do not influence code execution, but need to be resolved.

check if the above work in the while

Re: phpBB embedded on WordPress - Resize not working

Posted: Mon Mar 23, 2020 12:38 am
by KlausiMaus
Perfect, now it's working.

So I have just to eliminate "$w3all_orig" and "localhost". That's not described on your link.
Still wondering why it was working without any change on this page on the old host, but however it's now working.

Thanks alot!

Re: phpBB embedded on WordPress - Resize not working

Posted: Mon Mar 23, 2020 10:54 am
by axew3
The linked procedure say exactly how to do, you do not need to change the code (or yes, of course!) but add the
http/s://subdomain.mydomain.com into the array.
I coded to be auto configured on common installations but the problem is:

the value to setup thise array is retrieved by phpBB config, the cookie setting, that as you noted it os required you setup to be available overall the domain so:
.domain.com

but then using iframe the problem come out: this array need to contain, if in subdomain, exactly the entire subdomain url, or the browser thrown security js error. This javascript could also be disabled, removing this line:
checkOrigin : w3all_orig_domains,

and exclude the check: but in this case, security issues come out because maybe, someone can embed the iframe into some other domain that is not the one you want allow requests.
This lead to security problems.

Can be improved the code to setup it correctly also into sub domains? Yes! In the while, the linked procedure should help all on understand how the joke works.
Cheers!