Support » Plugins and Hacks » [Resolved] [Plugin: Easy FancyBox] Youtube usage

[Resolved] [Plugin: Easy FancyBox] Youtube usage

  • I am trying to make things as easy as possible for my site contributors, and have had issues with embedding Youtube videos using either embed codes or iframe, so I started using Vladimir Prelovac Smart Youtube plug in. with his plugin I am supposed to add a “v” after “http” for video and an “h” for the high quality version of the video followed by the address, i.e.

    I tried putting the class="fancybox-swf" at the end, but I guess that isn’t working.

    Can that work? Or should I be trying to embed in a different way?


Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author RavanH


    If you want to embed the Youtube movies straight in your post content, FancyBox will not do anything… But if you use a LINK to the Youtube page with class=”fancybox-swf”, then FancyBox will show that movie in an overlay window. Wrapped inside the link you can place either text or a thumbnail image of the movie but – again – it won’t work on embedded movies.

    Plugin Author RavanH


    The latest version of Easy FancyBox will auto-detect links to youtube but they HAVE to be in a normal working format like

    <a href="http://www.youtube.com/watch?v=ybTg7VmC55E">...your link text or thumbnail image here...</a>

    Clicking the link will open a FancyBox overlay with the movie (not the whole Youtube page) in the viewport.

    As far as I understand, the Smart Youtube plugin does a completely different job, embedding the movie straight in your page. If you want to switch from embedded movies to overlay movies, you can do two things:
    1. Manually go through all your pages to change the adapted URL’s to proper links, or…
    2. (let someone) write a small plugin that automates that process to replace Smart Youtube…

    …and then let Easy FancyBox take it from there 🙂

    I’m having a similar issue, but Easy Fancybox is not recognizing my video link. However, when I add class “fancybox” to my video link, it works but only loads the “loading” gif and doesn’t ever load the actual video. Any ideas?

    <a class="fancybox" href="http://www.youtube.com/watch?v=md0BFO3ACds"><img src="<?php bloginfo(template_directory) ;?>/img/feature/feature-1vid.jpg" /></a>

    Plugin Author RavanH


    Gaberosser, do not use class="fancybox" for video links (it is reserved for normal image or inline content) but use class="fancybox-youtube" for Youtube links.

    The fact that Easy Fancybox does not automatically recognize the link, can be caused by several things. Do you have a link for me so I can take a look?

    I added class="fancybox-youtube" to the video link, but still no luck. Easy Fancybox is automatically working for the “About” page photo, just not in the hard-coded link on the homepage. Could this be the issue? Just not sure…

    Here’s the link:

    Plugin Author RavanH


    Gabe, two things:
    1. Enable the Youtube feature under Settings > Media > FancyBox and then
    2. Either let it autodetect (check that option) youtube links or use class=”fancybox-youtube” not id=”fancybox-youtube”…

    Thanks RavanH! I didn’t even see the settings there. However, there’s still something missing. It initiates, but never loads the video. Any ideas?

    Plugin Author RavanH


    You need to remove the line

    <script src="http://www.nimbitmusic.com/nrp/includes/javascript/jquery.js"></script>

    that is part of the Email Signup form (is that a widget?) because the jQuery library already gets loaded in the page header. Loading it twice is asking for trouble.

    AHH! Thank you @ravanh!

    Yeah, that was copied over by client. Didn’t even see that jquery was loaded there. Good eye, good eye!

    Works now. 🙂


    Thanks for these tips! I wonder how I can get the white border around the YouTube clips? It’s on the images but not on the clips…

    Thanks for your time!

    Plugin Author RavanH


    riis, to get a border around youtube movies too, set the option ‘border’ on Settings > Media > FancyBox > YouTube to a value other than 0. Make it 10 to match the default for images.

    Ah… I should have seen that!


Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘[Resolved] [Plugin: Easy FancyBox] Youtube usage’ is closed to new replies.