• Resolved Ramzii

    (@ramzii)


    Well, try it for yourself and see.

    Just search and install the plugin “Dynamic To Top” with this plugin and you will see that when both are activated “Dynamic To Top” does not load, at all..

    I fixed this by, well, inserting Fancybox the good ol’ fashioned manual way.. since I dont know how to insert “Dynamic To Top” manually, lol.

    To save me the trouble in the future, I would like to know if theres an easy fix for this? Or am I doomed to eternally inserting Fancybox manually? 🙁

    CHEERS, and btw LOVE the plugin. Especially the part where youre keeping it up to date and such 😀 kudo’s.

    http://wordpress.org/extend/plugins/easy-fancybox/

Viewing 10 replies - 1 through 10 (of 10 total)
  • Hi Ramzii, thanks for reporting… and for the sarcasm (or am I reading that wrong?) 😉

    I have not tested this but looking at Dynamic To Top source code, I think I see why the two plugins bite each other…

    Dynamic To Top does this:

    wp_register_script( 'jquery-easing', MV_DYNAMIC_TO_TOP_URL . '/js/libs/jquery.easing.js', array( 'jquery' ), '1.3', true );

    and after registering the easing script under the name jquery-easing it gets included by way of a dependency for the main script:

    wp_enqueue_script( 'dynamic-to-top', MV_DYNAMIC_TO_TOP_URL . '/js/dynamic.to.top.' . $env . '.js', array( 'jquery-easing' ), MV_DYNAMIC_TO_TOP_VERSION, true );

    Easy FancyBox does this (at a later stage):

    // first get rid of previously registered variants of jquery.easing by other plugins or theme
    wp_deregister_script('jquery.easing');
    wp_deregister_script('jqueryeasing');
    wp_deregister_script('jquery-easing');
    wp_deregister_script('easing');
    // then register our version
    wp_enqueue_script('jquery.easing', plugins_url(FANCYBOX_SUBDIR.'/fancybox/jquery.easing-'.EASING_VERSION.'.pack.js', __FILE__), array('jquery'), EASING_VERSION, true);

    Which effectively removes the easing version that is registered under the name jquery-easing to replace it with its own version but under a different name: jquery.easing … The reason for this is to rule out as many plugin/theme conflicts as possible because of the easing script being loaded twice or more.

    Now comes the problem: since the easing script is no longer available under the name jquery-easing (but instead under jquery.easing) the To Top script will not be loaded since WordPress thinks it cannot fulfil the dependency! If only there was a good naming convention for these script library extensions. Hyphen, underscore, dot or not or just single name… I’ve seen it all 😉

    The solution in this case could be for me to alter Easy FancyBox but that would mean many others will suddenly start having problems because of double loading of the easing script. So I would like to suggest to Matt Varone, the developer of Dynamic To Top, to approach the inclusion of the easing script differently: to simply use wp_enqueue_script for easing.js instead of registering it then and making the main script dependant on it…

    Matt, what do you think? Or do you have a better solution for this?

    Thread Starter Ramzii

    (@ramzii)

    RavanH! NO., you totally misread that, I truly love your work / plugin and the way your keeping this plugin up2date. 😀

    Thanks for the clear explanation in human language, I appreciate it.
    Lets hope Matt agrees, how do we know he’s reading this? Lol.

    Ramzii, no problem!

    how do we know he’s reading this? Lol.

    Let’s hope the dynamic-to-top tag you added will draw his attention… that’s how you got mine anyway 😉

    Destillator

    (@destillator)

    Good to know the cause of this problem! I’ve reported it a couple of months ago (http://wordpress.org/support/topic/plugin-dynamic-to-top-plugin-button-disappears-in-wp-33), hopefully this thread will help Matt to find a solution.

    Could you guys try the latest development version straight from http://downloads.wordpress.org/plugin/easy-fancybox.zip ? I changed the naming scheme wich might just fix this problem without breaking in combination with other plugins.

    Unzip and then upload via FTP overwriting the old plugin files and test it with Dynamic to Top…

    Thanks, and please let me know the result 🙂

    Thread Starter Ramzii

    (@ramzii)

    Im currently not at home but will see to it that this will be tested, thanks!

    Matt

    (@sksmatt)

    Hey Guys,

    Thanks for tagging this thread. And thanks RavanH for modifying the naming scheme, it it seems core does it this way too for built in scripts: library-plugin (eg: jquery easing).

    I’s a little confusing however since the example on the codex uses _ to separate the name.

    We definitely need more standardization on this.

    Kind Regards!

    Matt

    (@sksmatt)

    Hi Again,

    Little update:

    After asking core developer Andew Nacin he suggested going with ‘-‘. I have updated the Codex example accordingly, hopefully it will help prevent future issues like this.

    Kind Regards!

    That’s excellent news 🙂 Thanks Matt, for verifying this with Andrew Nacin and updating the Codex. It’s a good thing to have less confusion on this naming thing…

    UPDATE: marked http://wordpress.org/support/topic/script-handle-naming-convention as solved 🙂

    Thread Starter Ramzii

    (@ramzii)

    You guys are awesome (: thanks dudes, much appreciated

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘[Plugin: Easy FancyBox] its not compatible with "Dynamic To Top" ! :(’ is closed to new replies.