2.8.8 template integration improvements and 2.8.8 pre-logs

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

2.8.8 template integration improvements and 2.8.8 pre-logs

Post by axew3 »

About the template integration
coming fixes:
the console log an origin error, intentionally leaved in place at the release time last night on 2.8.7. Even if all works as expected, the check of the origin is not done into the parent wp page, and despite it do not lead to any security breach, it require to be fixed and the js code require a little improvement, But it is, as said, nothing very important.

the template integration via shortcode
, place the iframe, when the shortcode is added via gutenberg into new templates, in a way that is not completely vertically centered. The iframe result to be with a minor padding/margin respect to the top of the containing element.
Into the old code of the phpBB overall_footer.html , it was fixed by this simple (accepted by the same library developer as the (one of) good way to fix it) code:

Code: Select all

 // fix vertical iframe centered in certain cases
  var w3iOS = !!navigator.platform && /iPad|iPhone|iPod/.test(navigator.platform);
  if(w3iOS == false)
  {
   var bd = document.getElementsByTagName("body");
   var t = document.getElementById(bd[0].getAttribute("id"));
   
   if( typeof t != 'undefined' || t != false )
   {
    t.setAttribute("style", "position:fixed;top:0%;right:0%;bottom:0%;left:0%;width:100%;margin:0px;");
   }
  }
but it seem to me that into the news WP theme Templates (or himself the integration via shortcode) the issue come out, and i will check how it can be resolved. Any hint very appreciated!
And please report here any bug you may find out on 2.8.7 in the while.
p.s why to not solve it into the parent? Possible?
User avatar
axew3
w3all User
w3all User
Posts: 2852
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: Coming 2.8.8 logs

Post by axew3 »

The iframe padding space gap (vertical centered on resize)
....the template integration via shortcode, place the iframe, when the shortcode is added via gutenberg into new templates, in a way that is not completely vertically centered. The iframe result to be with a minor padding/margin respect to the top of the containing element.
Into the old code of the phpBB overall_footer.html , it was fixed by this simple (accepted by the same library developer as the (one of) good way to fix it) code:....
Testing it, i see that editing this line and adding another into the overall_footer.html code:
so just changing

Code: Select all

t.setAttribute("style", "position:fixed;top:0%;left:0%;min-width:100%;");
into this:

Code: Select all

    t.setAttribute("style", "position:fixed;top:0%;left:0%;min-width:100%;min-height:100%;padding:0");
   document.getElementById("wrap").setAttribute("style", "position:relative;top:0%;min-height:100%;margin:10px;");
it perfectly fit any template, and plus, you can choose how much gap to have for the phpBB into the WP template.
Substantially changing margin:10px into the second line (top,right,bottom,left), it is possible to fit any requirement.
But i will see how could be without using this trick.

And however, the code require to be wrapped in another way, when the document is ready, and NOT loaded (that's too late). The overall_footer js code will be soon updated about this.

I tested 3 different ways to fix it, all working, it is an issue that can be easily managed. Both into the iframed phpBB, or into the template integration page-forum/shortcode code.

These fixes are intended to be "LONG TIME" stable fixes that will not require updates or any modification and basically will fit any phpBB/WP theme.
User avatar
axew3
w3all User
w3all User
Posts: 2852
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: Coming 2.8.8 logs

Post by axew3 »

The check origin

The check origin, will be will be solved server side, then the resulting value injected to the js shortcode/page-forum template output. It look like this:

Code: Select all

 # A trick to set the Origin check for the phpBB iframed

 $phpBBckOrigin = $w3all_url_to_cms_clean;

 if(!empty($phpBBckOrigin)){

  $abs0 = explode("//", $phpBBckOrigin);

  if(!empty($abs0[1])){
    $abs1 = explode("/", $abs0[1]);
   }

  if(!empty($abs1[0])){
    $phpBBckOrigin = filter_var($abs0[0] . '//' . $abs1[0], FILTER_VALIDATE_URL);
    $phpBBckOrigin = empty($phpBBckOrigin) ? $w3all_url_to_cms_clean : $phpBBckOrigin;
   }
 }
that will never fail on setting up the correct origin check on parent, into any scenario/domain.
User avatar
Ezrael
User www
User www
Posts: 95
Joined: Wed Nov 15, 2023 9:11 pm
Contact:

Re: Coming 2.8.8 logs

Post by Ezrael »

Is the template integration issue from 2.8.5 solved?

The header just appeared and forum wasn't accessible anymore
User avatar
axew3
w3all User
w3all User
Posts: 2852
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: Coming 2.8.8 logs

Post by axew3 »

It should be all fixed!
Anyway, if you update and it do not work for you, i am available to see what's going on (for free) on your site, resolving eventual issues.
But as you can see here, it is working fine, and into my localhost tests, it work without any problem into same and domain/subdomains installations.
Using page-forum for old themes, and via shortcode for gutenberg themes, as it is here as example on the twentytwentyfour WP default theme.
Check that the overall_footer.html code has been updated and the resizer library is the last v5.
The page-forum and shortcode files have been all updated and fixed.
User avatar
Ezrael
User www
User www
Posts: 95
Joined: Wed Nov 15, 2023 9:11 pm
Contact:

Re: Coming 2.8.8 logs

Post by Ezrael »

Done! I updated the Page and sent you an PM. Overall the forum works but has several issues I mentioned in the PM
Post Reply