Common overall_footer.html js questions help

User avatar
Ezrael
User www
User www
Posts: 95
Joined: Wed Nov 15, 2023 9:11 pm
Contact:

Re: Common overall_footer.html js questions help

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

Re: Common overall_footer.html js questions help

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

Re: Common overall_footer.html js questions help

Post by Ezrael »

Feel free to open a new topic. Just take care to images you upload is HD
User avatar
Ezrael
User www
User www
Posts: 95
Joined: Wed Nov 15, 2023 9:11 pm
Contact:

Re: Common overall_footer.html js questions help

Post by Ezrael »

Check the images I uploaded in your topic

https://forum.surferparadise.de/viewtop ... p=232#p232
User avatar
axew3
w3all User
w3all User
Posts: 2852
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: Common overall_footer.html js questions help

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

Re: Common overall_footer.html js questions help

Post 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%;");
   }
Post Reply