• Resolved faeronsayn

    (@faeronsayn)


    I’ve been looking at the support threads here and a lot of them relate to users wanting to display their posts or more specifically their post contents in the fancybox.

    Would it be possible to wrap fancybox divs around php code?

    <div class="fancybox">
    <?php the_title(); ?> <br />
    <?php the_content(); ?>
    </div>

    Would something like this be possible? Maybe the title of the post could be a permalink to the post which opens a fancybox with the following code

    <?php the_title(); ?> <br />
    <?php the_content(); ?>

    I’ve also tried a custom template for a custom post type like single-books.php

    I then only pasted the above code in it

    <?php the_title(); ?> <br />
    <?php the_content(); ?>

    Assuming that the header/footer and other aesthetic elements wouldn’t be called when I use the traditional way of adding the iframe class to the permalink of the post. However, it didn’t help since it still brought up the whole website in the iframe essentially.

    Anyway to work around this?

    https://www.ads-software.com/extend/plugins/easy-fancybox/

Viewing 7 replies - 16 through 22 (of 22 total)
  • Resolved o.o?

    No, this second issue (the iframe getting cleared after closing) is not resolved…

    I tried the same embed code with the same move on https://demo.status301.net/easy-fancybox-sandbox/ and there it does not show this issue. On your site, there is just too much javascript being loaded at the same time. Let alone the two other lightbox scripts: prettyPhoto and colorBox that are active right now… I’m afraid I cannot find out what is going wrong. Sorry.

    Thread Starter faeronsayn

    (@faeronsayn)

    I’ve noticed a couple of things, the fancybox on your site that displays the video is noticeably different than the one that I had implemented. The one that I had implemented was a lot similar to the one that pops up when you click on one of the images below on your site. You can notice the difference in animation and appearance. Maybe you’re using a different fancybox / class?

    The one that I was using for the video looked and functioned similar to the one that your images are popping in on your site.

    The one that you have the video in has a very different animation.

    Hmmm… you might want to install the development version then. Go to https://www.ads-software.com/extend/plugins/easy-fancybox/developers/ and find it under Other Versions. Download, unpack and upload via FTP.

    Then you will see on Settings > Media a new section dedicated for Inline content (as opposed to Images+Inline combined) where you can differentiate these effects.

    Maybe it does make the difference. Who knows…

    Thread Starter faeronsayn

    (@faeronsayn)

    I’d first like to thank you for being so helpful. I’ve tried countless other overlay plugins and some of them work but none of their developers are giving any support.

    So I’d like to thank you for being so supportive and helping me out so much.

    On another note, I’ve added the dev4 version of the plugin. I’ve customized it a little bit, it looks great. But the problem presists. I think it could be something to do with what the fancybox does when you hit the close button. I’ve read somewhere that when the fancybox closes, there’s a function for it, and you can tell it exactly what to do. Maybe this function is somehow clearing the iframe src.

    It’s quite weird since it’s working perfectly fine on your site. Additionally, everything else seems to be displaying fine even the iframe’s height and width remain unchanged, just the iframe src is removed. I’ve tried the prettyPhoto plugin and it seems to work fine with not removing the iframe src. But it has its own problems.

    Hey, looking at your site now, the video shows the second time too… Did you clear your browser cache?

    Oh, by the way: you need to give that chatandgo Falsh object a wmode=”opaque” (or even “transparent” if you need to) otherwise it will give problems with z-index positioning in many browsers. Result is that it always goes over the fancybox layer.

    Thread Starter faeronsayn

    (@faeronsayn)

    I’m actually trying to make it usable while the video is playing, so sometimes it’s usable and other times it’s not. So I can’t figure that part out.

    That’s quite weird how it’s magically working again :D. Thanks for the help once again ??

Viewing 7 replies - 16 through 22 (of 22 total)
  • The topic ‘wrapping fancybox around php code? Example: the_content();?’ is closed to new replies.