by axew3 » Wed Jan 01, 2020 8:01 pm
OBSOLETE since date of this post:
viewtopic.php?p=4549#p4549
This is an excerpt of a reply that easily explain how to fix the iframe template integration into domain/subdomain installations
..... iframe not resize ..... .....
Hi there! So, resuming here all things about iframe and correct configuration for subdomains.
May something will be setup to fix these issues, in the while this is the point.
then i installed both phpBB WP into this subdomain:
[code]https://subdomain.w3host.com/wordpress
https://subdomain.w3host.com/phpbb3[/code]
all work sparkly, i've just setup for the overall_footer.html code, subdomain.w3host.com, and nothing else needed.
But of course, the problem have come out when i installed
linking it to the subdomain phpBB.
So,in this kind of scenario, wp is at
w3host.com, while phpBB is on subdomain
subdomain.w3host.com.
What to do to make it work fine is just this
into phpBB overall_footer.html:
Code: Select all
document.domain = 'w3host.com'; // MANDATORY! // Set/Change this value to your domain (example: axew3.com (or leave localhost if on localhost))
then open page-forum (or whatever named)
where this:
Code: Select all
document.domain = '".$document_domain."';
//document.domain = 'w3host.com'; // NOTE: reset/setup this with domain if js error when WP is installed like on mysite.domain.com and phpBB on domain.com: js origin error can come out for example when WordPress is on subdomain install and phpBB on domain. The origin fix is needed: (do this also on phpBB overall_footer.html added code)
change into:
Code: Select all
//document.domain = '".$document_domain."';
document.domain = 'w3host.com'; // NOTE: reset/setup this with domain if js error when WP is installed like on mysite.domain.com and phpBB on domain.com: js origin error can come out for example when WordPress is on subdomain install and phpBB on domain. The origin fix is needed: (do this also on phpBB overall_footer.html added code)
then change this:
Code: Select all
// array() of allowed domains
var w3all_orig_domains = ['".$w3all_orig."','".$w3all_orig_www."','https://localhost','http://localhost'];
into this:
Code: Select all
// array() of allowed domains
var w3all_orig_domains = ['".$w3all_orig."','".$w3all_orig_www."','https://localhost','http://localhost','https://w3host.com','http://w3host.com'];
All will work fine.
NOTE IMPORTANT: http://w3host.com is recognized differently by
http://www.w3host.com (like http and https).
So if your server not force a way or other, and is accessible may both via https or http, and www or not www, then you have to add these possible variants into this array.
I will try to automatize for subdomains all this, by the way it will be not simple, because the problem are domains like:
mydomain.co.uk
that's not clearly a subdomain.
So it is not so easy to work around this. I've do a little code that using array of possible registered valid domains, check for correct value and never fail. By the way to use it, then the code should iterate into each time, or it's needed to provide a one time procedure, that will setup correct values.
[size=150][b]OBSOLETE since date of this post:[/b]
https://www.axew3.com/w3/forums/viewtopic.php?p=4549#p4549
[/size]
[strike][size=130][color=#BF0040]This is an excerpt of a reply that easily explain how to fix the iframe template integration into domain/subdomain installations[/color][/size]
..... iframe not resize ..... .....
[/strike]
[strike]Hi there! [b]So, resuming here all things about iframe and correct configuration for subdomains.[/b]
May something will be setup to fix these issues, in the while this is the point.
then i installed both phpBB WP into this subdomain:
[code]https://subdomain.w3host.com/wordpress
https://subdomain.w3host.com/phpbb3[/code]
all work sparkly, i've just setup for the overall_footer.html code, [i][b]subdomain.w3host.com[/b][/i], and nothing else needed.
[/strike]
[b]But of course, the problem have come out when i installed[/b]
[code]https://w3host.com/wordpress[/code]
linking it to the subdomain phpBB.
So,in this kind of scenario, wp is at [c]w3host.com[/c], while phpBB is on subdomain [c]subdomain.w3host.com[/c].
[b]What to do to make it work fine is just this[/b]
[b]into phpBB [i]overall_footer.html[/i]:[/b]
[code]document.domain = 'w3host.com'; // MANDATORY! // Set/Change this value to your domain (example: axew3.com (or leave localhost if on localhost))[/code]
then open page-forum (or whatever named)
[b]where this:[/b]
[code]document.domain = '".$document_domain."';
//document.domain = 'w3host.com'; // NOTE: reset/setup this with domain if js error when WP is installed like on mysite.domain.com and phpBB on domain.com: js origin error can come out for example when WordPress is on subdomain install and phpBB on domain. The origin fix is needed: (do this also on phpBB overall_footer.html added code)[/code]
[b]change into:[/b]
[code]//document.domain = '".$document_domain."';
document.domain = 'w3host.com'; // NOTE: reset/setup this with domain if js error when WP is installed like on mysite.domain.com and phpBB on domain.com: js origin error can come out for example when WordPress is on subdomain install and phpBB on domain. The origin fix is needed: (do this also on phpBB overall_footer.html added code)[/code]
[b]then change this:[/b]
[code] // array() of allowed domains
var w3all_orig_domains = ['".$w3all_orig."','".$w3all_orig_www."','https://localhost','http://localhost'];[/code]
[b]into this:[/b]
[code] // array() of allowed domains
var w3all_orig_domains = ['".$w3all_orig."','".$w3all_orig_www."','https://localhost','http://localhost','https://w3host.com','http://w3host.com'];[/code]
All will work fine.
[b][size=120]NOTE IMPORTANT:[/size][/b] http://w3host.com is recognized differently by http://www.w3host.com (like http and https).
So if your server not force a way or other, and is accessible may both via https or http, and www or not www, then you have to add these possible variants into this array.
I will try to automatize for subdomains all this, by the way it will be not simple, because the problem are domains like:
[i][b]mydomain.co.uk[/b][/i]
that's not clearly a subdomain.
So it is not so easy to work around this. I've do a little code that using array of possible registered valid domains, check for correct value and never fail. By the way to use it, then the code should iterate into each time, or it's needed to provide a one time procedure, that will setup correct values.