by axew3 » Wed Nov 21, 2018 2:28 pm
Thank to an help by friend with iPAD and iOS devices, i discovered that the fix about correct iframe centered on certain type of phpBB links, in other hand lead to a not correct result on safary and chrome on iOS, that seem for those browsers on iOS the fix isn't required.
To resolve the bug, the iframe code added into
overall_footer.html has been easily updated (deeply tested working fine now on any device and OS)
Code: Select all
// fix vertical iframe centered on viewtopic.php, preview or where # anchor etc
$(window).load(function() {
var bd = document.getElementsByTagName("body");
for (var i = 0; i < bd.length; i++) {
var bdID = bd[i].getAttribute("id");
}
var elt = document.getElementById(bdID);
elt.setAttribute("style", "position:fixed;top:0%;left:0%;width:100%;margin:0px;");
});
changed into:
Code: Select all
// fix vertical iframe centered on viewtopic.php, preview or where # anchor etc
// skip iOS
var w3iOS = !!navigator.platform && /iPad|iPhone|iPod/.test(navigator.platform);
if(w3iOS == false){
$(window).load(function() {
var bd = document.getElementsByTagName("body");
for (var i = 0; i < bd.length; i++) {
var bdID = bd[i].getAttribute("id");
}
var elt = document.getElementById(bdID);
elt.setAttribute("style", "position:fixed;top:0%;left:0%;width:100%;margin:0px;");
});
}
Related code on procedure hint has been updated about this. To fix just replace the code as above indicated and remember to recompile phpBB template.
wordpress phpBB Iframe procedure V2
Thank to an help by friend with iPAD and iOS devices, i discovered that the fix about correct iframe centered on certain type of phpBB links, in other hand lead to a not correct result on safary and chrome on iOS, that seem for those browsers on iOS the fix isn't required.
To resolve the bug, the iframe code added into [b]overall_footer.html[/b] has been easily updated (deeply tested working fine now on any device and OS)
[code]// fix vertical iframe centered on viewtopic.php, preview or where # anchor etc
$(window).load(function() {
var bd = document.getElementsByTagName("body");
for (var i = 0; i < bd.length; i++) {
var bdID = bd[i].getAttribute("id");
}
var elt = document.getElementById(bdID);
elt.setAttribute("style", "position:fixed;top:0%;left:0%;width:100%;margin:0px;");
});[/code]
[b]changed into:[/b]
[code]// fix vertical iframe centered on viewtopic.php, preview or where # anchor etc
// skip iOS
var w3iOS = !!navigator.platform && /iPad|iPhone|iPod/.test(navigator.platform);
if(w3iOS == false){
$(window).load(function() {
var bd = document.getElementsByTagName("body");
for (var i = 0; i < bd.length; i++) {
var bdID = bd[i].getAttribute("id");
}
var elt = document.getElementById(bdID);
elt.setAttribute("style", "position:fixed;top:0%;left:0%;width:100%;margin:0px;");
});
}[/code]
Related code on procedure hint has been updated about this. To fix just replace the code as above indicated and remember to recompile phpBB template.
[url=https://www.axew3.com/w3/2018/09/wordpress-phpbb-template-embed-v2/]wordpress phpBB Iframe procedure V2[/url]