Auto scroll UP

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

Re: Auto scroll UP

Post by axew3 » Tue Sep 26, 2017 5:02 pm

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: 1603
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: Auto scroll UP

Post by axew3 » Tue Sep 26, 2017 11:17 pm

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: 1603
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: Auto scroll UP

Post by axew3 » Wed Sep 27, 2017 7:55 am

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: 1603
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: Auto scroll UP

Post by axew3 » Wed Sep 27, 2017 2:10 pm

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: 1603
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: Auto scroll UP

Post by axew3 » Wed Sep 27, 2017 2:58 pm

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: 1603
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: Auto scroll UP

Post by axew3 » Thu Sep 28, 2017 2:05 pm

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.

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

Re: Auto scroll UP

Post by axew3 » Thu Sep 28, 2017 2:56 pm

in overall_footer.html added code, need to be replaced the following line:

Code: Select all

if ('parentIFrame' in window) window.parentIFrame.scrollTo(0,mfs);
with this:

Code: Select all

  if ( w3all_onclick_smile === false && w3all_onview_attach === false ) {
   if ('parentIFrame' in window) window.parentIFrame.scrollTo(0,mfs);
  }
remember to recompile phpBB template.
The online code procedure has been updated about this.

Let say i do not like this latest switch to scroll.
I will improve and finalize a definitive correct way to scroll as soon i can.

User avatar
Lantern
User www
User www
Posts: 67
Joined: Fri Sep 09, 2016 12:07 pm
Location: The Netherlands
Contact:

Re: Auto scroll UP

Post by Lantern » Thu Nov 23, 2017 3:07 pm

Sorry for the very late reply - i will follow your instructions a.s.a.p and let you know

User avatar
Lantern
User www
User www
Posts: 67
Joined: Fri Sep 09, 2016 12:07 pm
Location: The Netherlands
Contact:

Re: Auto scroll UP

Post by Lantern » Fri Nov 24, 2017 10:08 am

Hi Axew3 - i tried all options but the Auto Scroll UP is not working if you click Post Reply (at the bottom) of the page :cry: Even when i use the standard Prosilver theme.

Any suggestions left?

I can pm my develop site .

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

Re: Auto scroll UP

Post by axew3 » Fri Nov 24, 2017 11:24 am

have you update all to latest?
https://www.axew3.com/w3/2016/02/embed- ... esponsive/
Yes of course you can pm the link so i can take a look

Post Reply