• Hi there,

    I’m trying to disable all the Javascripts (jQuery, circle, slideshow, etc) and CSS called in the head of the front-end of my site since I added NextGen Gallery plug-in.

    Do you know an easy way to do this?
    I’ve commented code in nggallery.php but that’s pretty dirty…
    I’ve tried wp_deregister_script() and that works pretty well too but there’s still a lot of crap in the <head>.

    That’s really painful for the perfs…
    Some ideas, people?
    Thx =)

Viewing 5 replies - 1 through 5 (of 5 total)
  • Sorry no answers, but just to say I am interested in this question too. I am a WP beginner who ended up using NexGen gallery because it seems the only one with both “photo album” for clients wanting a photo site, and “slideshow” capabilities suitable for clients wanting to decorate their articles and blogs. Plus very well supported with numerous add-ons. However I believe it’s best to travel light. NexGen has 80% stuff I don’t need, while the NexGen stuff I need is barely passable in quality. After my tests of all NexGen options I find that: (a) Only one of the NexGen photo album settings is “passable.” NexGen uses mainly “lightbox” album displays which is not efficient to surf many photos. I prefer “highslide“–similar to lightbox but the visitor can click on other thumbnails while still viewing one large image. (b) Only one NexGen slideshow option is useful to me (although it is nice to have the others)–and there are no align or margin settings (though this can be done fairly easily using CSS hacks).

    I.e., to avoid complications, I prefer not to have separate plug-ins for slideshows and photo album… NexGen seems the only reliable option for this combination. (Except for the $70/year/site Cincopa Video Playlist and Gallery. By the way, Cincopa’s paid version is top quality but free version is totally impractical, with no way to adjust sizes.) Therefore, I am considering to get only one of many lightweight “slideshow” plug-ins, and forget about photo albums. For photo albums, clients can use Flickr. Or just posting photos manually is almost as well as using NexGen. Also I might be using Buddypress which has some photo add-ons that I have not yet studied. Anyway, after considering all this, I might just stay with NexGen if I could know more about:

    1.) What if any are the problems with using the topheavy NexGen? (Evidently there are notable problems according to Francois!)

    2.) Can unnecessary NexGen components be selectively removed to reduce its unjustified complexity? (Which seems to be what Francois is asking!) Thank you anyone who knows!

    One big issue I have with NextGen is that it loads a lot of files without checking if they are needed. For instance it will load the slideshow JS and CSS even though I’ve selected not to use the slideshow in the options. It will also load them on pages that don’t have a slideshow which is totally unnecessary on sites where only a few pages have a gallery.

    An option to disable at least css completely would be nice…

    Don’t know if this is still a issue, but I just used NextGen for a site and needed the same thing, to remove the CSS and JS so I can use my own. What I found was this:

    * CSS is simple, in admin under Gallery -> Style just uncheck “Activate and use style sheet:”

    * JS is a little trickier, but I found this in the code in the load_scripts function:

    // if you don't want that NGG load the scripts, add this constant
            if ( defined('NGG_SKIP_LOAD_SCRIPTS') )
                return;

    So just add
    define('NGG_SKIP_LOAD_SCRIPTS', true);
    to your functions.php and you should have all the fun without the extra files.

    DazVision

    (@dazvision)

    Great solution, but I can’t seem to get it to work conditionally, ie ONLY on my page called ‘images’:

    if ( !is_page('images') ) {define('NGG_SKIP_LOAD_SCRIPTS', true);}
    else {define('NGG_SKIP_LOAD_SCRIPTS', false);}

    Am I missing something?

    I would also love for a solution to this, as im trying to get another lightbox to work with the gallery, without the extra plugins and all the extra bloated crap i don’t need.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: NextGEN Gallery] Disable all scripts and styles’ is closed to new replies.