Page 1 of 2

Template Iframe integration fixes (the awesome phpBB iframe integration)

Posted: Thu Dec 07, 2023 11:43 pm
by axew3
Note that the page-forum.php has been updated on latest 2.7.7
and while the template integration via shortcode do not require any action to be updated, the page-forum.php instead, require to be rebuilt or manually substituted into the active template folder if you wish to do so, with the new one (renaming it if necessary in accord with your forum-name page setting on plugin admin)
/wp-content/plugins/wp-w3all-phpbb-integration/addons/page-forum.php

Note important, that also the overall_footer.html code has been updated
https://www.axew3.com/w3/2020/01/phpbb- ... iframe-v5/

where it was

Code: Select all

      if(/#p/ig.exec(window.location.hash)){
        let e = document.getElementById(window.location.hash.substr(1)).getBoundingClientRect();
        let w3append = '#w3all_phpbbpmcount=' + pmn + '#w3all_phpbb_u_logged=' + w3all_phpbb_u_logged + '#w3all_lochash=' + parseInt(e.top);
       window.parent.postMessage({
        'message': w3append
       }, w3allAllowDomain);

      } else {
         let w3append = '#w3all_phpbbpmcount=' + pmn + '#w3all_phpbb_u_logged=' + w3all_phpbb_u_logged + '#w3all_lochash=0';

         window.parent.postMessage({
          'message': w3append
         }, w3allAllowDomain);
        }
has been changed into

Code: Select all

      if(/#p/ig.exec(window.location.hash)){
        //let e = document.getElementById(window.location.hash.substr(1)).getBoundingClientRect();
        let p = document.getElementById(window.location.hash.substr(1));
        let e = $(p).offset().top;
        let w3append = '#w3all_phpbbpmcount=' + pmn + '#w3all_phpbb_u_logged=' + w3all_phpbb_u_logged + '#w3all_lochash=' + parseInt(e);
       window.parent.postMessage({
        'message': w3append
       }, w3allAllowDomain);

      } else {
         let w3append = '#w3all_phpbbpmcount=' + pmn + '#w3all_phpbb_u_logged=' + w3all_phpbb_u_logged + '#w3all_lochash=0';

         window.parent.postMessage({
          'message': w3append
         }, w3allAllowDomain);
        }
to always and correctly scroll the page to the right position, when there are many replies and/or the page's height is very high.
Minor fixes.
https://www.axew3.com/w3/2020/01/phpbb- ... iframe-v5/
Remember to recompile stale template.
Enjoy.

Re: Template Iframe integration fixes (the awesome phpBB iframe integration)

Posted: Fri Dec 22, 2023 9:24 pm
by Ezrael
Do you recommend to update all running iFrames?

The only open issue which I have with my integration, if I login or logout in the forum the code doesn't reload the whole page.

That´s the reason why I`m not logged in the WP until I refresh the whole page.

Re: Template Iframe integration fixes (the awesome phpBB iframe integration)

Posted: Sat Dec 23, 2023 6:41 pm
by axew3
The only open issue which I have with my integration, if I login or logout in the forum the code doesn't reload the whole page
You have reason. I also noted the same... so going to check what i broken (the related js function that should reload the page do not fire) with the last update!
After this issue resolved all should work very fine at moment.
I will return in reply asap

Re: Template Iframe integration fixes (the awesome phpBB iframe integration)

Posted: Sat Dec 23, 2023 10:33 pm
by Ezrael
Okay thanks for your reply! I will wait till you fixed this issue before I update to the current version of your code.

Re: Template Iframe integration fixes (the awesome phpBB iframe integration)

Posted: Sun Dec 24, 2023 7:15 pm
by axew3
While via shortcode it was working fine, it was not using the page-forum.php:
do not know if the correct file was loaded into last version, since into my localhost was working, and also here now, after switched to the same:
https://plugins.trac.wordpress.org/expo ... -forum.php

Substitute/replace the existent page-whatEverYouNamedIt.php with the new page-forum.php into your active template folder.
Cheers!

The page-forum.php has been updated on repository
https://plugins.trac.wordpress.org/brow ... order=name

Re: Template Iframe integration fixes (the awesome phpBB iframe integration)

Posted: Mon Dec 25, 2023 7:02 pm
by Ezrael
Thanks for the Info, I will replace the forum-page.php and update the footer directly after Christmas