Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Contributor webEng

    (@webeng)

    Hi McRiot,
    You did nothing wrong. The component doesn’t scroll because your list has only four videos and the container is too big. If you add more than one video, you’ll see the right sliding effect. Your real problem is that fancybox doesn’t trigger in the right way. That’s because you have two fancybox script in your page. In a new post I’ll try to post the right solution.

    Cheers, Luca

    Plugin Contributor webEng

    (@webeng)

    Ok maybe I have the solution.
    If you use firebug, in the console you will see this error:

    TypeError: a.fancybox.init is not a function …ction(){},onComplete:function(){},onCleanup:function(){},onClosed:function(){},o…

    This due to a duplicated fancybox script inclusion with different version, one from your theme (probably included statically with <script> tag, in this case 1.x) and one from my plugin (2.1.4).

    In the latest version of my plugin I use fancybox 2.1.4 and I load correctly with the proper wordpress function:

    // include fancybox
    wp_register_script('fancybox', $view['fancybox_js_url'], array(), SygConstant::SYG_VERSION, true);
    wp_enqueue_script('fancybox');

    In order to fix this you must investigate your theme and check where fancybox is included (probably in the header file) and see if it’s included statically or dinamically. If you see here you could go deep inside this kind of problems.

    Honestly there’s a little defect also in my script because instead of do this:

    wp_register_script('fancybox', $view['fancybox_js_url'], array(), SygConstant::SYG_VERSION, true);

    I should do this (according to the fancybox version, not the plugin):

    wp_register_script('fancybox', $view['fancybox_js_url'], array(), '2.1.4', true);

    In this case wordpress is sure on which version of the script include.

    Tomorrow I will release a fix in order to substitute the line of code mentioned above. Anyway, I suggest you to look in your header and see how fancybox is included.

    Thanks, let me know, Luca

    Thread Starter mcriot

    (@mcriot)

    First

    “The component doesn’t scroll because your list has only four videos and the container is too big”

    I was aware of that and tried a small box with more videos, it just goes off the page. example: http://skylarkproductions.ca/films/
    (Maximum Video Count: 6 Box Width: 450)

    I apologize, I am a novice coder. I checked the header.php file but did not see an include for fancybox.

    header.php

    <head profile="http://gmpg.org/xfn/11">
    <link rel="shortcut icon" href="/images/favico.ico" />
    <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
    <title><?php bloginfo('name'); ?><?php wp_title(); ?></title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=1">
    <link rel="stylesheet" href="<?php echo get_stylesheet_uri(); ?>" type="text/css" media="screen" />
    <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
    
    	<?php wp_head(); ?>
    
    </head>
    
    <body <?php body_class(); ?>>
    
        <div class="center <?php echo of_get_option('head_select'); ?>-social">
     <!--SOCIAL ICONS-->
    <div class="social_wrap">
        <div class="social">
    <ul>
    <?php if ( of_get_option('fbsoc_text') ) { ?>
    <li class="soc_fb"><a title="Facebook" target="_blank" href="<?php echo of_get_option('fbsoc_text'); ?>">Facebook</a></li><?php } ?>
    <?php if ( of_get_option('ttsoc_text') ) { ?>
    <li class="soc_tw"><a title="Twitter" target="_blank" href="<?php echo of_get_option('ttsoc_text'); ?>">Twitter</a></li><?php } ?>
    <?php if ( of_get_option('gpsoc_text') ) { ?>
    <li class="soc_plus"><a title="Google Plus" target="_blank" href="<?php echo of_get_option('gpsoc_text'); ?>">Google Plus</a></li><?php } ?>
    <?php if ( of_get_option('ytbsoc_text') ) { ?>
    <li class="soc_ytb"><a title="Youtube" target="_blank" href="<?php echo of_get_option('ytbsoc_text'); ?>">Youtube</a></li><?php } ?>
    <?php if ( of_get_option('flkrsoc_text') ) { ?>
    <li class="soc_flkr"><a title="Flickr" target="_blank" href="<?php echo of_get_option('flkrsoc_text'); ?>">Flickr</a></li><?php } ?>
    <?php if ( of_get_option('lnkdsoc_text') ) { ?>
    <li class="soc_lnkd"><a title="Linkedin" target="_blank" href="<?php echo of_get_option('lnkdsoc_text'); ?>">Linkedin</a></li><?php } ?>
    <?php if ( of_get_option('pinsoc_text') ) { ?>
    <li class="soc_pin"><a title="Pinterest" target="_blank" href="<?php echo of_get_option('pinsoc_text'); ?>">Pinterest</a></li><?php } ?>
    <?php if ( of_get_option('rsssoc_text') ) { ?>
    <li class="soc_rss"><a title="Rss Feed" target="_blank" href="<?php echo of_get_option('rsssoc_text'); ?>">RSS</a></li><?php } ?>
    </ul>
        </div>
    </div>
      <!--SOCIAL ICONS END-->
    </div>
    <!--HEADER START-->
    <div class="headcenter">
    <div id="header">
    
        	<!--LOGO START-->
            <div class="logo" align="center">
    <img src="/images/skylarklogo3.png">
            </div>
    
            <!--LOGO END-->
    
            <!--MENU STARTS-->
            <div id="menu_wrap"><div class="center"><div id="topmenu"><?php wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary' ) ); ?></div></div></div>
            <!--MENU END-->
    
    </div>
    </div>
    
    <?php if ( is_singular()) {?><div class="center"><div class="slide_shadow"></div></div><?php } ?>
    <!--HEADER END-->
        <div class="center">

    So I think from what I understand, the theme that is in use already uses some version of “fancybox” and this is messing things up. Under the functions.php I found a number of “fancybox” references. I’m not to sure what to do from here?

    Thank you for your quick response and attempting to find a solution. I do like the design of your plugin if I can get it to work properly.

    Plugin Contributor webEng

    (@webeng)

    Hi there!
    At first, please install the latest version. After, if doesn’t work yet please email me over the blog, I will give you my personal email so you can send me a zipped copy of your theme. I will be happy to help you.

    Cheers, Luca

    Thread Starter mcriot

    (@mcriot)

    Hi thanks, I did update to the latest version, no luck. I’ll be happy to email you you a copy of the theme.

    Plugin Contributor webEng

    (@webeng)

    Ok, send me your email there:

    http://blog.webeng.it/webeng/contattaci/

    I will reply to you, so you can send me the zipped theme.

    Cheers, Luca

    Thread Starter mcriot

    (@mcriot)

    filled it out and sent my email address to you via your link. I’ll get the theme zipped and sent as soon as I get a email response. Thank you very much 🙂

    Plugin Contributor webEng

    (@webeng)

    Hi there,
    as I said to you before, the problem is related to fancybox script duplication with different version.

    Go to line 197 functions.php and you’ll see with your eyes:

    wp_enqueue_script(‘theron_fancybox’,get_template_directory_uri().’/js/fancybox.js’);

    This line will cause old fancybox script version to get loaded in every page of your website. Two fancybox with diff version causes problem. Basicly, fancybox is a plugin that display a modal window with content, on a dark background.

    How do you solve problem?

    Consider that in sliding youtube gallery, fancybox is included only in page that displayes gallery, so, if you want to mantain a general compability and use the plugin, you should not erase the line above (I suppose the theme use fancybox somewhere). In other words, you must upgrade your theme to support fancybox 2.

    In order to do this I suggest you to:
    1) copy the fancybox folder available in /wp-content/plugins/sliding-youtube-gallery/js/3dParty/fancybox in your directory theme /wp-content/themes/theron-lite/js
    2) update your functions.php script like this:

    if(of_get_option('disslight_checkbox') == "0") { wp_enqueue_script('theron_fancybox',get_template_directory_uri().'/js/fancybox.js');
    }

    should be changed as the following:

    if(of_get_option('disslight_checkbox') == "0") {
    wp_register_script('fancybox', get_template_directory_uri().'/js/fancybox/source/jquery.fancybox.pack.js', array(), '2.1.3', true);
    wp_enqueue_script('fancybox');
    }

    After the changing, please see if fancybox works else you have to change the call method and parameters according to fancybox2 documentation. Just back up your theme and try.

    Let me know. Luca

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Won't Scroll or Pop up when clicked’ is closed to new replies.