Hi there!
This is the v4 (released when will be ready)
going on code as it is applied on this example at moment:
open page-forum(or whatever you named it).php into your active wp template folder and where this code:
Code: Select all
history.pushState({w3all_passed_url: w3all_passed_url}, \"Forum\", w3all_passed_url_push);
immediately after add this:
Code: Select all
jQuery('#w3all_phpbb_iframe').load(function(){
var scto = window.pageYOffset - 200;
window.scrollBy({
top: -scto,
behavior: 'smooth'
});
});
now on the overall_footer.html added code, where:
Code: Select all
if( /posting\.php\?mode=[reply|post|bump]/ig.exec(href) !== null || /mcp\.php\?/ig.exec(href) !== null ){
var w3allNOappend = true;
}
change into:
Code: Select all
if( /posting\.php\?mode=[reply|post|bump|contactadmin]/ig.exec(href) !== null || /mcp\.php\?/ig.exec(href) !== null ){
var w3allNOappend = true;
if ('parentIFrame' in window) window.parentIFrame.scrollTo(0,50); // change 50 to another value may 0 or 100 or 500. Top distance gap in px when page scroll top
return;
}
(but this step need and will be surely changed into something else)
then where this code:
Code: Select all
if ( w3all_onclick_smile == false && w3all_onview_attach == false && w3all_onreview_post == null ) {
if ('parentIFrame' in window) window.parentIFrame.scrollTo(0,50); // change 50 to another value may 0 or 100 or 500. Top distance gap in px when page scroll top
}
change into
Code: Select all
if ( w3all_onclick_smile == false && w3all_onview_attach == false && w3all_onreview_post == null ) {
//if ('parentIFrame' in window) window.parentIFrame.scrollTo(0,50); // change 50 to another value may 0 or 100 or 500. Top distance gap in px when page scroll top
}
and recompile phpBB template.
The idea is good, but still lack of some adjustment: whenever you or someone apply, please report issues to be fixed.
I will log patches here until the code will be stable and acceptable then will be so published as v4 procedure.
P.s another fix: for the
print view mode on iframe, the good solution that will be added is:
where this code:
Code: Select all
if( /\/adm\//ig.exec(href) !== null ){
e.preventDefault();
window.open(href,'_blank');
return;
}
will be simply changed into:
Code: Select all
if( /\/adm\//ig.exec(href) !== null || href.indexOf('view=print') > -1){
e.preventDefault();
window.open(href,'_blank');
return;
}
Hope to not forget nothing, Cheers!