Is it possible Lightbox image scroll over iFrame?

Post a reply


This question is a means of preventing automated form submissions by spambots.
Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :arrow: :| :mrgreen: :geek: :ugeek:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

If you wish to attach one or more files enter the details below.

Maximum filesize per attachment: 1 MiB.

Expand view Topic review: Is it possible Lightbox image scroll over iFrame?

Re: Is it possible Lightbox image scroll over iFrame?

by falcon » Mon Apr 11, 2016 6:29 pm

You're a king!!! :D

That`s IT!!! Thanks bro!

Image

re: Is it possible Lightbox image scroll over iFrame?

by axew3 » Mon Apr 11, 2016 6:06 pm

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 265 times

re: Is it possible Lightbox image scroll over iFrame?

by axew3 » Mon Apr 11, 2016 2:16 pm

got it ... solved, with the magic code of resizer ...
let me fix the thing...
yes it seem to work perfect for sticky/delete/etc ... so let me fix it also for lightbox ... WP side, on page forum. No phpBB modifications needed. Will add here the code as example so you'll use immediately, while will be also added on 1.2.2 as iframe mode fix

re: Is it possible Lightbox image scroll over iFrame?

by falcon » Mon Apr 11, 2016 12:00 pm

axew3 wrote:i think this is the same problem when for example we go to Sticky or Delete a post as admin in phpBB, where in iframe mode, the lightbox appear (or what it is) but to confirm the action, you have to scroll up as the form is on top of the page....think it is the same issue .... yes it is a problem i've see that should be solved. Looking if something ready that do not require to put eyes on it come out somewhere ...
This is other issue and yes, i confirm it but i can live with that (users not see it :) ). That is ajax script darkenwarpper in phpbb.

I have "problem" with this https://www.phpbb.com/community/viewtopic.php?t=2236221 .

Here you can see what i mean:
http://www.238-lbae.com/index.php/forum ... ewtopic=28

Please use last page and click for example on last picture. After that lightbox will apear but you must to scroll up to see that picture.

Thanks for your time.

re: Is it possible Lightbox image scroll over iFrame?

by axew3 » Mon Apr 11, 2016 11:39 am

The css of the embedded iframe page is the responsible of this behavior, so hard thing to solve within WP side ... i've find out an example on your forum, yes it is the same behavior i speak above. I think the best way to solve is via CSS of lightbox, or maybe not ... but let think on it ...

re: Is it possible Lightbox image scroll over iFrame?

by falcon » Mon Apr 11, 2016 10:34 am

For several days I'm looking for a solution but no luck.

If I find some solution i will share it here.

Top