iFrame integration doesn't work with phpbb Lightbox Extension

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

Re: iFrame integration doesn't work with phpbb Lightbox Extension

Post by Ezrael »

I can replace this whole part

Code: Select all

// Lightbox scroll fix
  $(".postimage").on("click", function(e){
	var topg = $($(this.getBoundingClientRect().top));
	 var t = parseInt(topg[Object.keys(topg)[0]]);
	$("#lightbox").animate({top: t+'px'}, 100);
  });
 // #phpbb_alert scroll fix
 $("#add_files").on("click", function(e) {
	var topg = $($(this.getBoundingClientRect().top));
	 var t = parseInt(topg[Object.keys(topg)[0]]);
	$("#phpbb_alert").animate({top: t+'px'}, 100);
 });
 
$("#quickmod,.bookmark-link").on("click", function(event) {
var pos = window.scrollY + document.querySelector('#quickmod').getBoundingClientRect().top;
  $(parent.window).scrollTop( 200 );
$("#darkenwrapper").on("click", function() {
  $(parent.window).scrollTop( pos );
});
 $("#darken").on("click", function() {
  $(parent.window).scrollTop( pos );
});
});
now by

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

Re: iFrame integration doesn't work with phpbb Lightbox Extension

Post by axew3 »

Yes but be careful to put/remove the code so to not broke it.
I am preparing the definitive overall_footer code (the unique change for the shortcode or page-forum on it, is the inclusion on last line, of the old library or the new, beside some more improvement). Should be all switched to the new library?
In that case, the page-forum require to be updated about a method name, iframeResize and some little more, that is different from the old iframe resizer lib. Ex V5> use iframeResize. Old lib use iFrameResize.
User avatar
Ezrael
User www
User www
Posts: 95
Joined: Wed Nov 15, 2023 9:11 pm
Contact:

Re: iFrame integration doesn't work with phpbb Lightbox Extension

Post by Ezrael »

The alert box and lightbox are functioning correctly, but I have noticed that other pop-ups, such as those you see when subscribing to a topic, are appearing at the top instead of the bottom.

You can test the behaviour here as well.
User avatar
axew3
w3all User
w3all User
Posts: 2852
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: iFrame integration doesn't work with phpbb Lightbox Extension

Post by axew3 »

Check that the overall_footer.html code has been finally updated!
https://www.axew3.com/w3/2020/01/phpbb- ... iframe-v5/
I just tested that's all working here.
Which device/browser you are testing?
User avatar
Ezrael
User www
User www
Posts: 95
Joined: Wed Nov 15, 2023 9:11 pm
Contact:

Re: iFrame integration doesn't work with phpbb Lightbox Extension

Post by Ezrael »

I saw you updated to 2.8.6

Coming from 2.8.4 I just have to update the overall_footer code and copy the iframe-resizer.child.js IN the phpbb root folder, haven't I?
User avatar
axew3
w3all User
w3all User
Posts: 2852
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: iFrame integration doesn't work with phpbb Lightbox Extension

Post by axew3 »

Substitute the code.
As ever then, change values to fit yours into it.
Change the SRC url of the penultimate line into

Code: Select all

<script type="text/javascript" src="http://linktoThe/iframe-resizer.child.js"></script>
that need to point to your iframe-resizer.child.js (that you can put everywhere you like, maybe the phpBB root is ok, because so it is loaded from same phpBB folder by phpBB that will find it faster).

Recompile phpBB template!

Rebuild page forum if your are using it.
Done.
Let know!
Post Reply