Page 3 of 4

Re: Common overall_footer.html js questions help

Posted: Thu Jul 18, 2024 11:48 am
by Ezrael
Hey
As you know, I'm using the Lightbox-Extension which works after all the changes we have done but I found a new bug.


When I open a new Topic and add an image, then click on this image while no one else has replied to the thread, the image gets cropped to the size of the post. I don't know if it's possible to adjust the resizer or the code so that the iframe can be enlarged. But currently, the images are cropped to the size of the iframe, even though the images are larger in terms of pixel count.

Re: Common overall_footer.html js questions help

Posted: Thu Jul 18, 2024 4:01 pm
by axew3
Or i have not understand how to reproduce or i cannot reproduce the issue into my test (using default phpBB theme).
Should i add a new topic into your, with an attachment of an image to test what it come out or do you have an example to see?

Re: Common overall_footer.html js questions help

Posted: Sat Jul 20, 2024 8:56 am
by Ezrael
Feel free to open a new topic. Just take care to images you upload is HD

Re: Common overall_footer.html js questions help

Posted: Sat Jul 20, 2024 11:33 am
by Ezrael
Check the images I uploaded in your topic

https://forum.surferparadise.de/viewtop ... p=232#p232

Re: Common overall_footer.html js questions help

Posted: Sun Jul 21, 2024 8:16 pm
by axew3
The default overall_footer.html code has been updated
https://www.axew3.com/w3/2020/01/phpbb- ... iframe-v5/

the old

Code: Select all

// Lightbox scroll fix, #phpbb_confirm scroll fix, #phpbb_alert scroll fix
$(".postimage,.dropdown-contents li a,#add_files").on("click", function(e) {
  var g = $($(this.getBoundingClientRect().top));
  var t = parseInt(g[Object.keys(g)[0]]);
  $("#phpbb_alert,#phpbb_confirm,#lightbox").animate({top: t+'px'}, 100);
});
become

Code: Select all

// Lightbox scroll fix, #phpbb_confirm scroll fix, #phpbb_alert scroll fix, #bbcode_wizard + abbc3_button fix
$(".dropdown-contents-cp,.abbc3_button,.postimage,.dropdown-contents li a,#add_files").on("click", function(e) {
  var g = $($(this.getBoundingClientRect().top));
  var t = parseInt(g[Object.keys(g)[0]]);
  $("#bbcode_wizard,#phpbb_alert,#phpbb_confirm").animate({top: t+'px'}, 100);
  t = parseInt(t-100); // re-position bottom gap so to set LB images always fully visible
  $("#lightbox").animate({top: t+'px'}, 100);
});
The lightbox selector/function has been separated from others so to move the #lightbox elem and re-position to correctly fit any image. It seem now a very acceptable (and better than previous) result.

All other extensions you are using are already included into the default code, i assume these are extensions may used by many.

[EDITED CODE]

Re: Common overall_footer.html js questions help

Posted: Mon Jul 22, 2024 5:58 pm
by Ezrael
I will test the new code now. Why did you changed the following line?

Code: Select all

   {
         t.setAttribute("style", "position:fixed;top:0;left:0;width:100%;padding:0");
      //t.setAttribute("style", "position:fixed;top:0;left:0;width:100%;");
   }