Disable Autoscroll?

Post a reply

This question is a means of preventing automated form submissions by spambots.
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :arrow: :| :mrgreen: :geek: :ugeek:

BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON

Topic review

If you wish to attach one or more files enter the details below.

Expand view Topic review: Disable Autoscroll?

Re: Disable Autoscroll?

by thewebguys » Thu Jun 10, 2021 12:51 pm

Thank you very much :-)

Re: Disable Autoscroll?

by axew3 » Thu Jun 10, 2021 10:19 am

the above answer, that was wrong, as been updated

Re: Disable Autoscroll?

by axew3 » Thu Jun 10, 2021 6:49 am

hi, the unique code that interact with this, is the one into page-forum.php
that is the file you have into your active template folder, named as the blank page you created (that so when you call the url, the page load).
Into this file, there is this code:

Code: Select all

      var w3all_lochash = /.*(#w3all_lochash)=([0-9]+).*/ig.exec(res);
      if(w3all_lochash !== null && w3all_lochash[2] != 0){ 
         jQuery('html, body').animate({ scrollTop: w3all_lochash[2]}, 400);
       } else {
         jQuery('html, body').animate({ scrollTop: ".$w3all_iframe_custom_top_gap."}, 400);
the var w3all_lochash is sent back to the wp page-forum by the phpBB overall_footer.html code you added into phpBB when it is called into the wp page as an iframe:
by default, the scroll isset to w3all_lochash[2] value or $w3all_iframe_custom_top_gap.

$w3all_iframe_custom_top_gap is the value to set for the default position to scroll to, when w3all_lochash[2] is NOT 0

You can manually change these values or even remove and substitute the entire code.

400 is the value of the scroll speed

The whole iframe logic, the scroll and several iframe issues will be soon moved to the next step on next coming soon version


Disable Autoscroll?

by thewebguys » Wed Jun 09, 2021 2:43 pm

A lot of our users are complaining about the auto scroll feature with the forum embedded on a wordpress page, as it always scrolls back to the top for example when click the back button. Is it possible to disable this feature? I tried setting various integers in the options page, but it always does the same. Can I remove some code from a file to disable this?