Auto scroll UP

User avatar
axew3
w3all User
w3all User
Posts: 2689
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: Auto scroll UP

Post by axew3 »

i've just finish on fly to add the code about banned users into phpBB for 1.7.7.
more some fix.
so i've come over your issue and iframe issues.

you mean, the page not scroll to top, isn't it? if you're on bottom, it remain on bottom.
You would like to be scrolled to top instead when page change. Isn't it?

i would like to reset all this scroll events to the default passed by phpBB ... i guess the preloader will resolve many of those or all at once ...
User avatar
axew3
w3all User
w3all User
Posts: 2689
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: Auto scroll UP

Post by axew3 »

since i'm over for a while to prepare 1.7.7 i've just fix the above adding the following code (that will be switched maybe in this way for also others cases, maybe not i will see, but this will be added in this way for sure):
open your phpBB overall_footer.html
on code you've add, search for this line:

Code: Select all

var w3all_onsubmit_post = /^post?/ig.exec(href);
immediately after, add the follow:

Code: Select all

  var w3all_ck_npage  = (href.indexOf('start') > -1);
  if ( w3all_ck_npage == true ){ 
	 if ('parentIFrame' in window) window.parentIFrame.scrollTo(0,100);
} 
  if ( href.indexOf('f=') > -1 && href.indexOf('t=') > -1 && href.indexOf('p=') === -1 ){
  	if ('parentIFrame' in window) window.parentIFrame.scrollTo(0,100);
  }
remember to rebuild phpBB stale template.

p.s on code above note on two lines:

Code: Select all

scrollTo(0,100);
change 100 to another value if you need to scroll more or less (until 0), may to fit your theme.

This still has not been applied on this online example.
User avatar
axew3
w3all User
w3all User
Posts: 2689
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: Auto scroll UP

Post by axew3 »

this morning after long time, i've find out the way to resolve any scroll, for any phpBB event/page, in just one instruction to assign:
3 lines of code, will replace 50 lines of code (+-) between overall_footer.html and page-forum.php.
So correct scroll aspect will be fixed on next coming soon 1.7.7. And all will be more short/easy.
User avatar
axew3
w3all User
w3all User
Posts: 2689
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: Auto scroll UP

Post by axew3 »

this morning after long time, i've find out the way to resolve any scroll, for any phpBB event/page, in just one instruction to assign:
3 lines of code, will replace 50 lines of code (+-) between overall_footer.html and page-forum.php.
So correct scroll aspect will be fixed on next coming soon 1.7.7. And all will be more short/easy.
the patch has been applied and is effective here in this example, the code about phpBB overall_footer.html and addons/page-forum.php will be updated within today to fit new changes about this:
https://www.axew3.com/w3/2016/02/embed- ... esponsive/
User avatar
axew3
w3all User
w3all User
Posts: 2689
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: Auto scroll UP

Post by axew3 »

https://www.axew3.com/w3/2016/02/embed- ... esponsive/
iframe procedure and code has been updated.
It fix also a problem about notification PM ink on admin bar (if option active), to be for iframe or not (this fix has been updated on page-forum.php file at repository, after two hours by the date of this post).

Memo about the iframe procedure: how to update in short

Download updated file page-forum.php:
https://plugins.trac.wordpress.org/expo ... -forum.php
put it into plugin addons folder, replacing the old one, so on WP_w3all config page, rebuild the template by clicking on related button.
OR manually
paste the downloaded page-forum.php file into your template folder, replacing the old one (rename it into what need to be if your iframe template page is named as board, community etc in WP_w3all config, so you'll rename in case into page-community.php etc.)
Now open overall_footer.html
substitute the old added code, with new code
https://www.axew3.com/w3/2016/02/embed- ... esponsive/
Remember to set the correct domain name value into pasted code as explained on inline code and on procedure.
Remember so to Recompile stale style components in phpBB ACP -> Server configuration -> Load settings (as explained on procedure).
User avatar
axew3
w3all User
w3all User
Posts: 2689
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: Auto scroll UP

Post by axew3 »

I note that on inserting smiles on posts, the scroll is done, and should not.
It is required to add a little code mod into overall_footer.html.
I will patch right now the thing.
Post Reply