• Resolved xkaaay

    (@xkaaay)


    Hey @ all πŸ˜‰

    i use this plugin. i have create a site on my wordpress with a youtube-link.
    example: <a href="http://www.youtube.com/watch?v=uXCkiQgSkQQ">Test</a>
    when i click on this link the fancybox opens, but the site changed to youtube.com. please change it or say, what i have to do.

    greets from germany, xkaaay *g

Viewing 9 replies - 1 through 9 (of 9 total)
  • Hi,

    Do you have a link for me so I can see what happens live? Also, which browser are you using?

    Allard

    Thread Starter xkaaay

    (@xkaaay)

    here is a test-link for you:
    http://www.xhasen.de/test-2/

    i used IE (newest version), firefox, opera and google chrome.

    Yep, I see it happen too. So I copied that exact YouTube link to my test page http://test.4visions.nl/about-2 (it’s that last one there), set the same theme and Easy FancyBox settings … but the video plays as it should without ‘escaping the iframe’ as what seems to be happening on your site.

    The only thing I can think of is that the jQuery click() function that FancyBox uses here, does not prevent the browser catching it (even though it has return false; for that) … I have no idea why that would happen in your site but it might be other javascript that is interfering.

    Would you mind trying to switch off WP Slimstat for a minute and test the link again?

    Thread Starter xkaaay

    (@xkaaay)

    well ok. when i switch off the WP Slimstat, the youtube-video works correct. i will search an other stat-plugin πŸ˜€

    thx for your help .. very great plugin !!

    I can recommend Google Analytics with the plugin Google Analyticator… Apart from inserting the GA code for you, it gives you a nice graph on your dashboard so you do not have to log in to your GA account for basic traffic data. Ofcourse, if you do want to study very indepth traffic analysis, you can always log into the associated GA account for a wealth of information. πŸ™‚

    But the main advantage of an external traffic counter like GA is that it does not stress your server and database like ‘internal’ counters do. Down-side is that they generally are not ‘real-time’…

    Anyway, thanks for reporting the incompatibility with WP Slimstat. I’ll make a note of it in under Known Issues.

    … Or … It might be possible to keep WP Slimstat and use another kind of YouTube link (I have not tested this):

    Instead of linking with URL’s like http://www.youtube.com/watch?v=uXCkiQgSkQQ you could adapt them manually to target the movie itselt (instead of the complete youtube page) like so http://www.youtube.com/v/uXCkiQgSkQQ. Notice the watch?v= has been replaced with v/. Then use this URL in your content link and add a class="fancybox-youtube".

    The result would like like

    <a href="http://www.youtube.com/v/uXCkiQgSkQQ" class="fancybox-youtube">Youtube Test</a>

    To improve page speed, you can now safely switch off the auto-detection of YouTube (and Vimeo) links on the Settings > Media admin page.

    If you get around to testing this, let me know if it works πŸ™‚

    I just found this discussion involving my plugin. This is a known behavior of WP SlimStat and the workaround is easy to implement and doesn’t require other plugin developers to change the way their plugins work. Please take a look at

    http://lab.duechiacchiere.it/index.php?topic=2.0#post_avoidconflicts

    Long story short. Let’s say you have a link associated to Lightbox (or one of its hundreds flavors):

    <a href="/wp-slimstat">Open Image in LightBox</a>

    To tell WP SlimStat to adjust its behavior, change it to:

    <a href="/wp-slimstat" class="noslimstat">Open Image in LightBox</a>

    This will allow my plugin to still track the click on that resource, but to avoid any conflicts with third party Javascript codes.

    Please keep me posted,
    Camu

    Hi camu, I had hoped you find this discussion. I added wp-slimstat as tag for that reason.

    So what you are saying is that a link like

    <a href="http://www.youtube.com/watch?v=uXCkiQgSkQQ" class="noslimstat">text</a>

    would do the trick?

    Hmmm… My plugin adds the class fancybox-youtube to that link by jQuery’s addClass(). I suppose the noslimstat class would survive that… In any case, because my plugin does the fancybox thing automatically without users having to add any class or other tags, and to keep it simple (easy), I would have to add this class automatically too. This should be possible but I’d like to keep the javascript load to a minimum… Maybe if I code some WP Slimstat detection routine so the extra work is done only when Slimstat is running on the same site… Will have to think about it πŸ˜‰

    Hi RavanH,

    I suppose that inline class would ‘survive’ your javascript injection, so that’s probably the best approach. As you can see, I had to implement a workaround using a class attribute because there are thousands of different ‘Lightbox’ scripts out there, and unfortunately as far as I can see, there’s no way for me to detect if an event has already been attached to a given A tag. If there was such a thing, I would have skipped those elements to avoid any conflicts πŸ™‚ Anyway, please let me know if you need help or have any questions.

    Camu

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