Time to improve a little bit the iframe mode. I'm around to fix all things about this time on these days
It was a bug about iframe i aimed from long time, the problem for example was coming out by clicking the link to view a last post which link point to phpBB viewtopic.php, where there are many posts to display, or maybe an inline image to display like this post) the result was this:
- wrongTop1-forum.jpg (110.13 KiB) Viewed 1574 times
instead than the correct vertical alignment of the iframe, like this:
- correctTop1-forum.jpg (93.74 KiB) Viewed 1574 times
the solution seem to be this:
open overall_footer.html
where added the iframe resizer code, search for this:
Code: Select all
window.onload = function() {
var pmn = "{PRIVATE_MESSAGE_COUNT}";
var w3all_phpbb_u_logged = "{S_USER_LOGGED_IN}";
// to send to wp at once here, like this: #w3all_phpbbpmcount=val#w3all_phpbbnotifycount=val#etc etc etc
var w3appendevents = '#w3all_phpbbpmcount=' + pmn + '#w3all_phpbb_u_logged=' + w3all_phpbb_u_logged;
parent.w3all_ajaxup_from_phpbb(w3appendevents);
}
just after, add this code:
Code: Select all
// WoW! fix vertical align on viewtopic.php or preview, 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%;");
});
Recompile phpBB template.
Even if it work and has been applied on this online example it has not been still added into
overall_footer.html help page code.
The complete fix will be added on code of the procedure with all hints as soon tests finished. If any cool hint by someone about this would be nice ...
Time to improve a little bit the iframe mode. I'm around to fix all things about this time on these days
It was a bug about iframe i aimed from long time, the problem for example was coming out by clicking the link to view a last post which link point to phpBB viewtopic.php, where there are many posts to display, or maybe an inline image to display like this post) the result was this:
[attachment=0]wrongTop1-forum.jpg[/attachment]
[b]instead than the correct vertical alignment of the iframe, like this:[/b]
[attachment=1]correctTop1-forum.jpg[/attachment]
the solution seem to be this:
[b]open [i]overall_footer.html[/i][/b]
where added the iframe resizer code, search for this:
[code]window.onload = function() {
var pmn = "{PRIVATE_MESSAGE_COUNT}";
var w3all_phpbb_u_logged = "{S_USER_LOGGED_IN}";
// to send to wp at once here, like this: #w3all_phpbbpmcount=val#w3all_phpbbnotifycount=val#etc etc etc
var w3appendevents = '#w3all_phpbbpmcount=' + pmn + '#w3all_phpbb_u_logged=' + w3all_phpbb_u_logged;
parent.w3all_ajaxup_from_phpbb(w3appendevents);
}[/code]
just after, add this code:
[code]// WoW! fix vertical align on viewtopic.php or preview, 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%;");
});[/code]
Recompile phpBB template.
Even if it work and has been applied on this online example it has not been still added into [url=https://www.axew3.com/w3/2016/02/embed-phpbb-into-wordpress-template-iframe-responsive/]overall_footer.html help page[/url] code.
The complete fix will be added on code of the procedure with all hints as soon tests finished. If any cool hint by someone about this would be nice ...