Viewing 18 posts - 1 through 18 (of 18 total)
  • Author
    Posts
  • #244169

    Any idea why Enfold with NexGen Gallery isn’t fading out the background unless the browser is resized in Chrome and Opera? Firefox and Safari seem good?

    Pretty jarring with the caption not knocking out from the background behind it.

    #244465

    Hey kork!

    Can you post the link to your website so we can take a look?

    Regards,
    Yigit

    #244488

    Can I send a link via email rather than having the URL in the forums?

    #244494

    Hi!

    You can make your post private by checking “Set as private reply (Only you and moderators will see the content of this post)” above Submit button

    Regards,
    Yigit

    #244535
    This reply has been marked as private.
    #244540

    Looks like the issue exists with the main enfold theme as well…

    http://kriesi.at/themes/enfold/shortcodes/gallery/

    I click on the thumbnail and it shows the background… Close it and open it again and no background fade.

    • This reply was modified 10 years, 8 months ago by kork.
    #244701

    Hi!

    Thank you for the link. Unfortunately, the theme is not using the NextGen Gallery plugin. It is using the prettyPhoto lightbox plugin by default. If you want to add the NextGen Gallery and disable the default lightbox plugin, edit js > avia.js. Find this code on line 60:

    //activates the prettyphoto lightbox
            $(container).avia_activate_lightbox({callback:'avia_lightbox_callback'});
    

    Replace it with:

    //activates the prettyphoto lightbox
            //$(container).avia_activate_lightbox({callback:'avia_lightbox_callback'});
    

    Install the NextGen Gallery. You might encounter few incompatibility issues with the plugin so we suggest that you hire a freelance developer to fix them. For further customization, please visit Werkpress.

    Best regards,
    Ismael

    #244761

    Hi Ismael. I appears that it has nothing to do with the Nexgen gallery.

    It exhibits the exact same problem on the demo Enfold website at http://kriesi.at/themes/enfold/shortcodes/gallery/

    I click on the thumbnail and it fades… Close it and open it again and no background fade.

    Additionally, would there be a way to disable PrettyPhoto through the functions.php file? I’m using a child theme and don’t want to modify avia.js in case of future updates to the parent.

    #244990

    Hi!

    Thank you for the info. If you’re talking about the black overlay background when you click on a thumbnail then I can see it on my end properly fading in and out. On what browser and OS are you testing this? I tested mine on Chrome Windows 8 and I think Firefox will function the same. If you want to modify avia.js on the child theme, add this on the child theme’s functions.php:

    /*
     * Register frontend javascripts:
     */
    if(!is_admin())
    {
    	add_action('wp_enqueue_scripts', 'avia_register_child_frontend_scripts', 100);
    }
    
    function avia_register_child_frontend_scripts()
    {
    	$child_theme_url = get_stylesheet_directory_uri();
    
    	//register js
    	wp_register_script( 'avia-default-child', $child_theme_url.'/js/avia.js', array('jquery'), 1, false );
    	wp_enqueue_script( 'avia-default-child' );
    }

    Create a js folder with avia.js file on it. I hope that helps.

    Best regards,
    Ismael

    #245197

    Hi Ismael,

    Chrome and Opera on Mac OSX Mavericks shows the issue. FF and Safari both work fine. On the default Enfold theme mentioned above, it’s only the second time the modal box is open and closed. It doesn’t do it initially.

    #245250

    Hmmm, Also, the above code in the function.php file didn’t work either. I did take the avia.js file and put it in the child themes js folder.

    #246439

    Hi!

    The code Ismael posted will not replace the default avia.js file but it just loads a custom avia.js file in addition to the default file. If you want to replace the default avia.js file with a custom version insert this code:

    
    if(!is_admin()) add_action('wp_enqueue_scripts', 'avia_register_child_frontend_scripts', 100);
    function avia_register_child_frontend_scripts()
    {
    	$child_theme_url = get_stylesheet_directory_uri();
    	wp_dequeue_script('avia-default');
    
    	//register js
    	wp_register_script( 'avia-default-child', $child_theme_url.'/js/avia.js', array('jquery'), 1, true);
    	wp_enqueue_script( 'avia-default-child' );
    }
    

    into your child theme functions,php file and then place the custom avia.js file into your child theme folder (url path must be wp-content/themes/enfold-child/js/avia.js ).

    Cheers!
    Peter

    #246529

    Hi Peter,

    Sorry, I’m confused. Ideally, I don’t want to replace the default avia.js file in its entirety for a single line of commented out code. I’d rather just use Ismael’s solution if it’s just going to append the single line of code.

    That said, my child theme folder is not named as the default. Is that why the modifications are not taking effect? How would I go about this keeping the child theme folder the same if that’s the case?

    #247439

    Hey!

    Unfortunately you must overwrite the entire file if you don’t want to modify the original avia.js of the parent theme. Otherwise the theme will still execute the code line of the parent theme avia.js and you won’t notice any difference. The child theme name is not important and won’t affect the custom avia.js.

    Best regards,
    Peter

    #248547

    Hi Peter,

    If I remove the line of code from the main theme avia.js file then it functions as I expect. However, following Ismael’s code does not seem to work. my child theme folder is not called “enfold-child” but it’s called “wgr-child”

    Does the naming of the child theme matter?

    #248673

    Hey!

    Please use the code I posted here: https://kriesi.at/support/topic/nextgen-gallery-with-enfold-background-fade-with-chrome-not-working/#post-246439 instead of Ismaels code. The child theme name doesn’t matter.

    Best regards,
    Peter

    #250526

    Worked perfect, thanks Peter!

    #250959

    Hey!

    Great :)

    Cheers!
    Peter

Viewing 18 posts - 1 through 18 (of 18 total)
  • You must be logged in to reply to this topic.