Template Iframe integration fixes (the awesome phpBB iframe integration)

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

Template Iframe integration fixes (the awesome phpBB iframe integration)

Post 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.
User avatar
Ezrael
w3 User
w3 User
Posts: 102
Joined: Wed Nov 15, 2023 9:11 pm
Contact:

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

Post 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.
User avatar
axew3
w3all User
w3all User
Posts: 2883
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

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

Post 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
User avatar
Ezrael
w3 User
w3 User
Posts: 102
Joined: Wed Nov 15, 2023 9:11 pm
Contact:

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

Post 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.
User avatar
axew3
w3all User
w3all User
Posts: 2883
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

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

Post 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
User avatar
Ezrael
w3 User
w3 User
Posts: 102
Joined: Wed Nov 15, 2023 9:11 pm
Contact:

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

Post by Ezrael »

Thanks for the Info, I will replace the forum-page.php and update the footer directly after Christmas
Post Reply