Is it possible Lightbox image scroll over iFrame?

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

re: Is it possible Lightbox image scroll over iFrame?

Post by axew3 »

thinking that this kind of adjustment need to be done to scroll anyway (to top) many other things.
But let me see as i can ... in the while, this the solution, for mod menu on post and lightbox on phpBB if installed to display nice photos.

This will be default on wp_w3all WordPress phpBB integration embedded page.

Replace the page-forum.php with this one in attach:
[attachment=0]page-forum_x_next_1.2.2(iframe-scroll-on-actions+lightbox)_page-forum.rar[/attachment]
so edit the overall_footer.html of the phpBB template, look the wp_w3all code you have add, where start with:

Code: Select all

<script type="text/javascript">
immediately after add this code:

Code: Select all

$(document).on('mouseout', '.postimage', function(){
      var w3allappend = "getw3all_lightbox";
if ('parentIFrame' in window) window.parentIFrame.sendMessage(w3allappend);return;
});
so the entire code added for wp_w3all on bottom of your overall_footer.html should result like this now:

Code: Select all

<script type="text/javascript">
$(document).on('mouseout', '.postimage', function(){
      var w3allappend = "getw3all_lightbox";
if ('parentIFrame' in window) window.parentIFrame.sendMessage(w3allappend);return;
});

  $(document).on("click", "a", function() {
   var href = $(this).attr("href");
   var w3allappend = href;
 if ('parentIFrame' in window) window.parentIFrame.sendMessage(w3allappend);return;
});
</script>
		<script type="text/javascript" src="./iframeResizer.contentWindow.min.js" defer></script>
remember to load template modifications on phpBB after done this. And to reset to no the option after done.

On page-forum.php, +- on bottom, there are two lines of code likee this:

Code: Select all

    if (w3all_phpBB_lightbox == true) {
     window.scrollTo(0, 150);
0 is the X to scroll to, 150 is Y value if you need to adjust where the page will scroll when image on post is clicked:[/size] try with this value should be ok...

any help on improvements and ideas very welcome!
Attachments
page-forum_x_next_1.2.2(iframe-scroll-on-actions+lightbox)_page-forum.rar
(2.85 KiB) Downloaded 188 times
falcon
User www
User www
Posts: 76
Joined: Tue Apr 05, 2016 6:56 pm

Re: Is it possible Lightbox image scroll over iFrame?

Post by falcon »

You're a king!!! :D

That`s IT!!! Thanks bro!

Image
Post Reply