NextGEN Gallery Optimizer

Description

NextGEN Gallery Optimizer

NextGEN Gallery Optimizer improves your site’s page load speed, by preventing NextGEN’s scripts and stylesheets from loading on posts and pages without NextGEN Gallery content.

Additionally…

If you’re using NextGEN v2 (v2.0.0 to v2.1.60), Optimizer also provides you with complete granular control of the scripts and stylesheets that load on posts and pages with NextGEN Gallery content. For a live example of these settings in action, please view the source of Optimizer’s homepage (a NextGEN v2 gallery page with AJAX pagination) in your browser.

If you’re using NextGEN Legacy (v1.6.2 to v1.9.13) or NextCellent Gallery (v1.9.14 to v1.9.31), Optimizer will intelligently fine-tune all your posts and pages with NextGEN Gallery content automatically… detecting every shortcode and setting, to only load the scripts and stylesheets required on each page.

For a full overview of the optimization process, please see…
http://www.nextgengalleryoptimizer.com/optimization-flowcharts/.

Optimizer also includes an enhanced version of the fantastic Fancybox lightbox script, and only loads it on appropriate posts and pages with NextGEN Gallery content. The result? Gorgeous galleries and a speedy site.

Optimizer v2.1.5 currently supports (and is tested compatible with) NextGEN Gallery (v2.0.0 to v2.1.60), NextGEN Legacy (v1.6.2 to v1.9.13) and NextCellent Gallery (v1.9.14 to v1.9.31).

NextGEN Gallery Optimizer Pro

Upgrade to Optimizer Pro for the new NextGEN Gallery Deactivator feature.
A whole new level of speed optimization.
Only load NextGEN’s PHP code on posts and pages with NextGEN Gallery content.

Upgrade to Optimizer Pro for the new Dynamic Fancybox Settings Interface.
The fastest and easiest way to customize Fancybox.
Set title styles, background color and opacity, make Fancybox responsive and more.

For more information, please see the following…
http://www.nextgengalleryoptimizer.com/
http://www.nextgengalleryoptimizer.com/documentation/
http://www.nextgengalleryoptimizer.com/nextgen-gallery-optimizer-pro/
http://www.nextgengalleryoptimizer.com/purchase/

Key features:

  1. Improves your site’s page load speed when using NextGEN Gallery.
  2. Prevents NextGEN’s scripts & styles from loading on non-NextGEN posts/pages.
  3. Additionally fine-tunes NextGEN’s scripts and styles on NextGEN posts/pages.
  4. 1-click install of the Enhanced Fancybox Lightbox to display your images in style.

NEW in Version 2.1.5:

  1. Tested: Fully compatible with NextGEN Gallery up to v2.1.60.
  2. Tested: Fully compatible with NextCellent Gallery up to v1.9.31 (unchanged).
  3. Tested: Fully compatible with WordPress up to v4.7.
  4. Updated: Incremented all version numbers in the in-plugin documentation to reflect our new “tested up to” compatibilities.
  5. Added: NextGEN Pro’s new checkout, checkout return and proofed images pages are now allowed in Deactivator by default (Pro).
  6. Fixed: Compatibility with WP-CLI in Deactivator (Pro).

NEW in Version 2.1.4:

  1. Tested: Fully compatible with NextGEN Gallery up to v2.1.46.
  2. Tested: Fully compatible with NextCellent Gallery up to v1.9.31 (unchanged).
  3. Tested: Fully compatible with WordPress up to v4.5.3.
  4. Tested: PHP 7 ready.
  5. Added: WP v4.5 compatibility for our plugin description JavaScript on the “plugins.php” page.
  6. Updated: Incremented all version numbers to document our new “tested up to” compatibilities.
  7. Updated: The download URL to NextGEN’s repository page is now in the new WordPress.org format.
  8. Fixed: Character encoding issues in readme.txt. Now saved strictly as UTF-8.
  9. Fixed: Single-quote encoding issues in the header comment documentation.

NEW in Version 2.1.3:

  1. Tested fully compatible with NextGEN Gallery up to v2.1.23.
  2. Tested fully compatible with NextCellent Gallery up to v1.9.31.
  3. Tested fully compatible with WordPress up to v4.4.2.
  4. Updated all in-plugin documentation to reflect our new “tested up to” compatibility.
  5. Added styling updates to Optimizer’s settings page, for header tag changes in WordPress v4.4.
  6. Added full compatibility with NextCellent Gallery v1.9.30+ for our lightbox effects page integration, after its major admin rewrite in v1.9.30.
  7. Added detection of NextCellent Gallery’s new admin management PHP pages in NextGEN Gallery Deactivator (Pro), after the full admin rewrite in NextCellent v1.9.30.

NEW in Version 2.1.2:

  1. Tested fully compatible with NextGEN Gallery up to v2.1.15.
  2. Tested fully compatible with NextCellent Gallery up to v1.9.26 (unchanged).
  3. Tested fully compatible with WordPress up to v4.3.
  4. Updated all in-plugin documentation to reflect our new “tested up to” compatibility.
  5. Added detection of base_url query string parameter pages in NextGEN Gallery Deactivator (Pro).
  6. Added detection of NextGEN’s “Manage Gallery” meta links in NextGEN Gallery Deactivator (Pro).

NEW in Version 2.1.1:

  1. Tested fully compatible with NextGEN Gallery up to v2.1.0.
  2. Tested fully compatible with NextCellent Gallery up to v1.9.26.
  3. Tested fully compatible with WordPress up to v4.2.2.
  4. Updated all in-plugin documentation to reflect our new “tested up to” compatibility.
  5. Added 256×256, 128×128 and svg plugin icons for the new WordPress plugin installer screen.

NEW in Version 2.1 (at a glance):

  1. Now fully compatible with the major update of NextGEN Gallery v2.0.71 (up to v2.0.77).

  2. Now fully compatible with the major update of NextCellent Gallery v1.9.25 (up to v1.9.25.3).

  3. Now fully compatible down to WordPress v3.7.

  4. Tested fully compatible with WordPress v4.1 and v4.1.1.

  5. Now fully compatible with the NextGEN Plus (v1.1.3) and NextGEN Pro (v2.1.4) premium add-ons.

  6. Improved plugin descriptions and documentation throughout.

Please see Optimizer v2.1’s development blog post for the full list of improvements and additions.

NEW in Version 2.0 (at a glance):

  1. Now optimizes the new NextGEN v2.0.xx codebase, and the new NextGEN Legacy fork called NextCellent Gallery.

  2. Completely rewritten utilizing class encapsulation, and with a strong focus on WordPress coding standards and best practices.

  3. Virtually all of Optimizer’s former Premium functionality for NextGEN Legacy is now included in the Basic version here at the WordPress repository.

  4. Completely rounds out support for all features and options available in NextGEN Legacy (and the NextCellent Gallery fork).

  5. Optimizer Pro is introduced, including the all new NextGEN Gallery Deactivator feature, and the Dynamic Fancybox Settings Interface.

  6. Optimizer’s website is introduced.

Please see Optimizer v2.0’s development blog post for the full list of improvements and additions.

NEW in Version 1.1.2:

  1. Tested compatible with WordPress 3.5 (Basic and Premium)
  2. Latest Google-hosted jQuery 1.8.3 to match new WP version (Basic and Premium)
  3. New admin notifications to assist with NextGEN installation (Basic and Premium)
  4. Improvements to Optimizer’s automatic Fancybox installation (Basic and Premium)

This release brings us up to date with WordPress 3.5, and features a number of additions and refinements to improve user experience. These include new admin notifications to assist users who don’t have the required NextGEN Gallery plugin installed and activated, new step-by-step installation instructions via the WordPress admin (to ensure the correct file ownership and permissions are set), a streamlined settings page, and improvements to Optimizer’s automatic Fancybox installation.

NEW in Version 1.1.1:

  1. Dynamic messaging for admins on unsupported shortcodes (Basic)
  2. Checks to ensure jQuery isn’t being deregistered (Basic and Premium)
  3. Includes blank index.php files for enhanced security (Basic and Premium)

This release aims to improve communication between Optimizer and end-users, including dynamic messaging for admins on unsupported shortcodes, and a clever regex that detects and alerts you if your theme (or child-theme) is deregistering jQuery…which causes Fancybox to break. Additionally, security is enhanced with the addition of blank index.php files in each folder, preventing bots from scanning your server’s directory tree.

NEW in Version 1.1 (first major release):

  1. Fancybox title now included in image height calculations (Basic and Premium)
  2. New options: WordPress’s included jQuery or go Google-hosted (Basic and Premium)
  3. Support for the Thickbox effect (Basic and Premium)
  4. Support for the Shutter effect (Basic and Premium)
  5. Support for JW Image Rotator slideshow integration (Premium)
  6. Support for AJAX pagination on [imagebrowser id=x] (reqs. Shutter) (Premium)
  7. Fancybox gets extra fancy…auto-resizes when the browser is resized (Premium)

This first major release for Optimizer sees a number of new additions and features…
Fancybox now includes space for a single-line title in its image height calculations, vastly improving vertical alignment of the lightbox. Also, Optimizer now lets you choose between using WordPress’s included jQuery (for greater compatibility), or the Google-hosted version (for faster page loads). Support for the Thickbox and Shutter effects has also been added thanks to user requests.

On top of this, the Premium version now includes AJAX pagination when using Shutter on the [imagebrowser id=x] shortcode, supports the JW Image Rotator for slideshows and features a super-fancy, auto-resize function that resizes Fancybox when the browser window is resized!

NEW in Version 1.0.8:

  1. Tested fully-compatible with WordPress 3.4 (Basic and Premium)
  2. Improved compatibility with other plugins and themes (Basic and Premium)
  3. Display fix for Fancybox when no title is available (Basic and Premium)
  4. Latest jQuery 1.7.2 (Basic and Premium)

This version adds the jQuery.noConflict(); method for improved compatibility with plugins and themes using other javascript libraries/frameworks including script.aculo.us, Prototype and MooTools. It also includes a fix for Fancybox/NextGEN Gallery integration where a small white line would appear underneath the lightbox when no title was set.

NEW in Version 1.0.7:

  1. Improved compatibility with other scripts and plugins. (Basic and Premium)
  2. Minor bug fix in admin message. (Basic and Premium)

This version enhances compatibility with other plugins and includes a few minor improvements.

NEW in Version 1.0.6:

  1. Fully-automated Fancybox installation! (Basic and Premium)

This version features completely automated Fancybox integration with NextGEN Gallery, so now you can be up and running even faster.

NEW in Version 1.0.5:

  1. Precision matching with WordPress’s built-in shortcode finder.
  2. NextGEN Gallery Optimizer Premium (an optional upgrade for a small donation).

This version uses WordPress’s native get_shortcode_regex() function for EXACT shortcode matching, ensuring scripts and styles don’t load unexpectedly unless the FULL shortcode is present. If WordPress doesn’t detect a shortcode, neither do we!

Also, this update introduces the new NextGEN Gallery Optimizer Premium version, which adds support for ALL TEN of NextGen’s shortcodes, support for the [show as slideshow] link, the removal of NextGEN’s version number comment and more.

NEW in Version 1.0.4:

  1. Easier set up

This version automatically redirects first time users to the options page on activation and sets a default stylesheet for easier set up.

NEW in Version 1.0.3:

  1. Optimized code for better compatibility and page load speed
  2. Improved settings page

This update results in faster page loads on gallery pages by avoiding duplicate scripts. It reduces the chance of conflicts with other plugins and makes setting up Fancybox even easier.

NEW in Version 1.0.2:

  1. Support for WordPress Pages
  2. Fancybox overlap fix
  3. Fix for Fancybox not working in IE6 & IE8
  4. Latest JQuery

This update lets you display galleries on both Posts AND Pages in style, but only load code when they’re present.

It also fixes an issue where some page elements overlap Fancybox and prevent the close button from functioning (in particular the title text, header image and menu bar in Twenty Eleven).

It fixes the “Fancybox not working in IE6 & IE8” issue by automatically updating the Fancybox stylesheet to use the correct file paths, and we’re now running Fancybox on JQuery version 1.7.1, resulting in faster page loads where galleries are present.

Installation

Install NextGEN Gallery Optimizer:

  1. Download NextGEN Gallery Optimizer to your computer
  2. Log into your WordPress admin
  3. Click Plugins –> Add New
  4. Click Upload (in the header)
  5. Search your computer for nextgen-gallery-optimizer.zip
  6. Click Install Now
  7. Click Activate Plugin
  8. Click Settings –> NextGEN Optimizer to complete installation.
  • Note: If your computer automatically unzips your download, you’ll need to re-compress it first.
  • On Mac OSX: Ctrl+click the plugin folder –> Compress.
  • On Windows: Right-click the plugin folder –> Send To –> Compressed (zipped) Folder.

How do I set up a gallery?

Firstly, you’ll need a copy of NextGEN Gallery…
https://wordpress.org/extend/plugins/nextgen-gallery/

Once you’ve activated NextGEN Gallery on your plugins page, look for a “Gallery” tab at the bottom of your left sidebar in your WordPress admin.

  1. Go to Gallery –> Add Gallery/Images
    Click the “Add New Gallery” tab, enter a name for your gallery and click the “Add gallery” button.

  2. Click the “Upload Images” tab, click the “Select Files” button and choose which images you want to upload from your computer, select the gallery you just created from the “in to” dropdown menu, and click the “Upload images” button to begin the transfer.

  3. Finally, to insert your gallery, just create a new post or page (Posts –> Add New or Pages –> Add New), type the shortcode [nggallery id=1] into the editor, and click the “Publish” button on the right to save your changes. Note: The “1” in the shortcode should be the id number of the gallery you wish to display.

  4. That’s it! Navigate to the page you just created and your gallery should be live!

If you’d like to optimize this for speed, and add the Fancybox lightbox effect when you click on your gallery thumbnails, simply activate NextGEN Gallery Optimizer from your plugins page. With Optimizer enabled, your site will feel lighter and faster as it ensures the required scripts and styles only load on pages with galleries.

FAQ

General
Does Optimizer have any known limitations?

Please see the following page in Optimizer’s documentation…
http://www.nextgengalleryoptimizer.com/docs/limitations/

How is NextGEN Legacy (v1.6.2 to v1.9.13) faring these days without updates?
  1. As of WordPress v4.2 (possibly earlier) the Sort Gallery page in the admin fails to save changes to the image sort order. It gives the following notice on-save when WP_DEBUG is active: “Notice: Undefined variable: sortArray in …nextgen-gallery/admin/manage-sort.php on line 19”. One workaround would be to simply upload your images in the order you want them displayed.

  2. There are also a few new notices (when WP_DEBUG is active) in WordPress v4.3, however the widgets do still appear to be working: “Notice: The called constructor method for WP_Widget is deprecated since version 4.3.0! Use __construct() instead. in …/wp-includes/functions.php on line 3457″.

Why aren’t my image uploads working in NextGEN 2.0.xx?

There are many possibilities (typically ownership/permissions issues), but here’s an odd one from personal experience. Hopefully it’ll help…

I had created several development installs across numerous WordPress releases to test Optimizer with the latest NextGEN 2.0.xx version (v2.0.66.37 specifically), but NextGEN’s image uploads weren’t working on any of them. All file ownership and permissions were correct, but NextGEN’s uploads page was just showing a yellow error triangle with a tooltip of “HTTP error”.

After watching the JavaScript console in Chrome, I discovered there was not only a JS error on every NextGEN settings page, but also a “Not found” error on the image upload page itself. It turned out this was due to a compatibility issue with WordPress’ default permalink structure (e.g. “?p=123”), as “index.php” was being inserted after the base URL, causing a 404. Changing the permalink settings in WordPress to the “Month and name” structure (e.g. “/2015/02/sample-post/”) fixed the issue. Note: this was happening in both WordPress 3.7 and the latest v4.1.

Wait…my galleries are displaying properly, but my images load in a new window!

If you’re sure Fancybox is activated on Optimizer’s settings page, and the lightbox still won’t display using the “Use WordPress jQuery [greater compatibility]” setting, it is highly likely you have a conflict caused by two or more instances of jQuery loading on the same page. This is typically due to jQuery calls having been hard-coded into your theme.

Please inspect your theme files (the header.php and footer.php in particular) for lines including jquery.js or jquery.min.js and either comment them out, or remove them altogether.

Additionally, make sure you have wp_head(); in your theme’s header.php file. It will usually be right before the closing </ head > tag, and is an essential hook for plugins such as Optimizer to be able to load the necessary scripts and styles.

Help!…I can’t see the NextGEN “Gallery” tab!!!
  1. Please make sure the “NextGEN Gallery” plugin is both installed and activated on your plugins page in the admin (it’s a separate plugin available here). Once activated, the “Gallery” options tab should appear near the bottom of your left sidebar in the admin.

  2. If you can’t find the tab for your plugins page either, it’s likely you’re logged in as a user without administrative privileges. You can verify this by visiting http://www.yoursite.com/wp-admin/plugins.php.

How do I set the Shutter or Thickbox effect?

Firstly, you’ll need to deactivate Fancybox on the Optimizer settings page and click “Save Options”. After that, simply navigate to Gallery –> Options –> Effects, select your effect and click “Save Changes”.

Is this plugin compatible with minification/caching tools?

Yes. However the small, already minified Fancybox script must be excluded from combining/minification or it won’t function. This is true of any lightbox script.

For WP Minify, simply add /wp-content/plugins/nextgen-gallery-optimizer/fancybox/jquery.fancybox-1.3.4.pack.js in its js file exclusion options and clear the cache.

For W3 Total Cache, you’ll need to select the “manual” minify option at Performance –> General Settings. After that, jump to Performance –> Minify where you can hand-pick the scripts and styles you want minified/combined (excluding Fancybox).

What version of NextGEN Gallery is this plugin compatible with?

Any version since 1.6.2

Premium Version
Why won’t my images click-through to a gallery on my [album id=x] shortcodes?

It looks as though there may be a bug with one of NextGEN’s settings. Go to Gallery –> Options –> Gallery Settings and make sure the first option “Deactivate gallery page link” is checked (as it is by default).

I’ve just added a gallery to an album in NextGEN and I get a “Notice: Undefined property: stdClass::$gallery_ids” error message on my page.

The drag-and-drop “Manage Albums” page in NextGEN does not auto-save like the WordPress widgets page. Click the “Update” button and your albums will display as they should.

Help! My slideshows aren’t working…they just show a rotating loading circle.

Please go to GALLERY -> MANAGE GALLERY and select the gallery that’s causing you trouble. Inside this gallery, ensure ALL image thumbnails are displaying and re-upload them if necessary. If they’re missing, the “Path” field may have been changed, which will cause the slideshow to break.

Also, slideshows require two or more images in your galleries to function, else they’ll break as above.

How do I get regular pagination on NextGEN Album pages?

By default, Album pages don’t include pagination…but you can activate this feature by adding a custom field called “ngg_paged_Galleries” on the edit screen for your album page in the WordPress admin. The value of the custom field should be the number of albums you wish to display per page.

Why doesn’t Optimizer support NextGEN widgets?

After spending weeks working on integrating this, I’ve discovered it’s not presently possible in WordPress to:

  1. Conditionally load the required scripts in the header AND

  2. ONLY load them if the widget is actually present on the page.

Since both the Fancybox and the NextGEN slideshow scripts must be loaded in the head section of the page so they don’t break, and since the whole point of this plugin is to NOT load scripts on every page, I’ve had to abandon this idea for the time being. If you know of a solution, do let me know and I’ll add it in the next version!

Why doesn’t Premium support AJAX pagination on gallery pages?

Apart from the [imagebrowser id=x] shortcode, I had hoped to add support for this on regular galleries and album galleries too, but unfortunately NextGEN’s implementation to date is just too buggy, inconsistent and restrictive. For example…

  1. You have to use the Shutter effect across your whole site.
  2. It breaks the [Show as slideshow] links when activated.
  3. It causes several error notices per page (visible in debug mode) read: massive error log.
  4. It isn’t coded to work at all on album main pages or on most shortcodes (UI inconsistency).

I’ve tried to iron out some of these issues myself, but to no avail. Hopefully the team at Photocrati will look into this for a future release.

When I activate the JW Image Rotator in NextGEN Gallery, my slideshows only display a big black box!

Before you can use JW Image Rotator, you’ll need to download it here, upload it to your wp-content/uploads folder and enter the FULL filepath to its imagerotator.swf file at Gallery –> Options –> Slideshow –> “Path to the Imagerotator (URL)”.

Eg. http://sitename.com/wp-content/uploads/imagerotator/imagerotator.swf

Click “Save Changes” when you’re done and you’ll be all up and running.

UPDATE: JW Image Rotator now comes bundled with NextGEN Gallery v1.9.9 and above, and requires no manual installation.
Why isn’t Optimizer Premium detecting my Album gallery pages or the [Show as slideshow] links?

This issue is likely caused by the “Activate permalinks” option at Gallery –> Options –> General Options, which changes NextGEN’s URL structure for things such as the “Show as slideshow” and “Show picture list” links, as well as navigation through your Album pages.

Optimizer Premium looks for NextGEN’s default URL structure, which appends query string parameters to much of the navigation. With “Activate permalinks” switched on, these parameters are no longer present, which results in the plugin not recognizing where to add the necessary scripts for either Fancybox or slideshow functionality.

I’m currently working on a way to target these permalink URLs for a future version of the plugin, but for now, correcting the issue is as simple as navigating to Gallery –> Options –> General Options, switching off the “Activate permalinks” setting and clicking “Save Changes”.

Reviews

Conflito relatado

Aviso que desde a versão Wp4.5
a ativação deste plugin desativa a finalização
de compras da minha loja web no tema wootique.

As formas de pagamento ficam acinzentadas, sem
possibilidade de seleção.

Basta desativar o plugin para restaurar o processo
de vendas.

Enfim…

Read all 29 reviews

Contributors & Developers

“NextGEN Gallery Optimizer” is open source software. The following people have contributed to this plugin.

Contributors

Changelog

v2.1.5 – 2016-12-12

Optimizer Basic and Pro:

  • Tested: Fully compatible with NextGEN Gallery up to v2.1.60.
  • Tested: Fully compatible with NextCellent Gallery up to v1.9.31 (unchanged).
  • Tested: Fully compatible with WordPress up to v4.7.
  • Updated: Incremented all version numbers in the in-plugin documentation to reflect our new “tested up to” compatibilities.

Optimizer Pro:

  • Added: NextGEN Pro’s new URLs for its checkout, checkout return and proofed images pages are now flagged as “Allowed Pages” in Deactivator by default.
  • Fixed: “Undefined index: HTTP_HOST” notices in WP-CLI when calling “wp plugin (activate|deactivate) nextgen-gallery-optimizer-pro”.

v2.1.4 – 2016-7-13

Optimizer Basic and Pro:

  • Tested: Fully compatible with NextGEN Gallery up to v2.1.46.
  • Tested: Fully compatible with NextCellent Gallery up to v1.9.31 (unchanged).
  • Tested: Fully compatible with WordPress up to v4.5.3.
  • Tested: PHP 7 ready.
  • Added: WP v4.5 compatibility for our plugin description JavaScript on the “plugins.php” page.
  • Updated: Incremented all version numbers (as appropriate) to document our new “tested up to” compatibilities.
  • Updated: The download URL to NextGEN’s repository page is now in the new WordPress.org format (i.e. omit “/extend/”, and include SSL).
  • Fixed: Character encoding issues in readme.txt. Now saved strictly as UTF-8 (dropped the BOM).
  • Fixed: Single-quote encoding issues in the header comment documentation.

v2.1.3 – 2016-2-13

Optimizer Basic and Pro:

  • TESTED: Fully compatible with NextGEN Gallery up to v2.1.23.
  • TESTED: Fully compatible with NextCellent Gallery up to v1.9.31.
  • TESTED: Fully compatible with WordPress up to v4.4.2.
  • UPDATED: All in-plugin, repository and website documentation to reflect our new “tested up to” compatibilities.
  • ADDED: Explicitly defined the original WordPress admin h2 header tag styling in Optimizer’s settings page CSS, to override a size reduction introduced with changes in WP v4.4.
  • ADDED: Extra checks, sanitization and styling in our integration with NextCellent Gallery’s lightbox effects page, for full compatibility with the major admin rewrite in NextCellent v1.9.30.

Optimizer Pro:

  • ADDED: Detection of NextCellent Gallery’s new admin management PHP pages in NextGEN Gallery Deactivator, after the full admin rewrite in NextCellent v1.9.30.

v2.1.2 – 2015-9-12

Optimizer Basic and Pro:

  • TESTED: Fully compatible with NextGEN Gallery up to v2.1.15.
  • TESTED: Fully compatible with NextCellent Gallery up to v1.9.26 (unchanged).
  • TESTED: Fully compatible with WordPress up to v4.3.
  • UPDATED: All in-plugin, repository and website documentation to reflect our new “tested up to” compatibility.

Optimizer Pro:

  • ADDED: Detection of base_url query string parameter pages in NextGEN Gallery Deactivator. These dynamic pages are sometimes generated by plugins (e.g. the “Calculated Fields Form” plugin) for AJAX calls, to pull in extra data. And where that extra data involves NextGEN functionality, we needed to be able to flag them as Allowed Pages.

  • ADDED: Detection of NextGEN’s “Manage Gallery” meta links in NextGEN Gallery Deactivator. The URL’s of the linked PHP files needed to be flagged as Allowed Pages, as although they’re loaded in the admin, they’re actually located in the “nextgen-gallery” plugin directory (therefore undetectable by is_admin() checks).

v2.1.1 – 2015-6-18

Basic and Pro:

  • TESTED: Fully compatible with NextGEN Gallery up to v2.1.0.
  • TESTED: Fully compatible with NextCellent Gallery up to v1.9.26.
  • TESTED: Fully compatible with WordPress up to v4.2.2.
  • UPDATED: All in-plugin, repository and website documentation to reflect our new “tested up to” compatibility.
  • NEW: Added 256×256, 128×128 and svg plugin icons for the new WordPress plugin installer screen.

v2.1 – 2015-3-09

Basic and Pro:

NextGEN Gallery v2.0.71+:

  • NEW: Now fully compatible with the major update of NextGEN Gallery v2.0.71 (up to v2.0.77).

  • NEW: Optimizer’s Enhanced Fancybox Lightbox is now additionally integrated with the “C_Lightbox_Library_Manager” class, for front-end, in-memory lightbox registration in NextGEN v2.0.71+.

  • NEW: Added conditional removal of several script dependencies (when using Optimizer’s “Advanced options”), that were introduced in NextGEN v2.0.71+. This enables us to continue to provide granular control of the scripts that load on posts and pages with NextGEN Gallery content in NextGEN v2.0.71+.

  • NEW: The exact version of NextGEN Gallery in current use is now taken directly from NextGEN’s main plugin file header, as we can’t count on Photocrati to not remove/rename the “NGG_PLUGIN_VERSION” constant (which had already replaced Legacy’s “$ngg->version” in NextGEN v2.0+), nor provide any graceful deprecation or backwards compatibility to prevent errors after doing so (re: the NextGEN v2.0.71+ update. See below…).

  • FIXED: “Fatal error: Class ‘C_Lightbox_Installer’ not found” after Photocrati completely removed the “C_Lightbox_Installer” class in NextGEN v2.0.71 (without any graceful deprecation, or backwards compatibility in place).

  • FIXED: “Fatal error: Call to undefined method C_Lightbox_Installer::uninstall_lightbox()” after Photocrati reintroduced the “C_Lightbox_Installer” class in NextGEN v2.0.74+, but without the original “uninstall_lightbox()” method.

  • FIXED: “Fatal error: Class ‘C_NextGen_Settings’ not found” when activating other plugins. This is caused by new methods introduced by Photocrati in NextGEN v2.0.71+ intended to hide (instead of fix) PHP warnings when using their NextGEN Plus/Pro plugins or their theme. They are called “is_activating()” and “is_not_activating()”, and are added to the “C_NextGEN_Bootstrap” class in “nggallery.php”. This appears to prevent NextGEN from initializing on the activation of other plugins, and as a result, NextGEN doesn’t load its includes…causing all third-party calls to its “C_NextGen_Settings” class in the NextGEN 2.0 API to fail.

NextCellent Gallery v1.9.25+

  • NEW: Now fully compatible with the major update of NextCellent Gallery v1.9.25 (up to v1.9.25.3).

  • NEW: Optimizer now deregisters the new sitewide stylesheet “framework-min.css” added in NextCellent Gallery 1.9.25+, and only loads it on posts and pages with NextCellent Gallery content. Re: https://wordpress.org/support/topic/latest-nextcellent-gallery-1925-loading-frameworkcss-file-on-every-page

  • NEW: Optimizer now deregisters the new slideshow script “owl.carousel.min.js” added in NextCellent Gallery 1.9.25+, and only loads it as required on posts and pages with slideshows (e.g. posts/pages with the [slideshow id=x] shortcode, or on [Show as slideshow] link sub-pages).

WordPress v3.7 to v4.1.1:

  • NEW: Optimizer is now fully compatible down to WordPress v3.7.

  • NEW: Optimizer is tested fully compatible with WordPress v4.1 and v4.1.1.

  • NEW: Added a “Thanks for updating” admin notification with a link to Optimizer’s settings page, which displays after a user performs either a 1-click or manual update of Optimizer. This message is automatically removed once the settings page is visited, and is important so that users are aware of the major changes and extra options available in Optimizer’s v2.0 codebase and beyond.

  • IMPROVED: Changed a small section of our Dynamic Fancybox Settings Interface initialization, for compatibility with the old-style admin in WordPress v3.7.

  • IMPROVED: Increased the help text font size in our Dynamic Fancybox Settings Interface, for the old-style admin in WordPress v3.7 (as the font rendering is less clear).

  • IMPROVED: Optimizer now references home_url() instead of site_url(), to support WordPress installations both stored in their own subdirectory (e.g. http://example.com/wordpress/), and that are configured to serve pages from the website root (e.g. http://example.com/).

NextGEN Plus and NextGEN Pro:

  • NEW: Now fully compatible with the NextGEN Plus (v1.1.3) and NextGEN Pro (v2.1.4) premium add-ons. Re: https://wordpress.org/support/topic/interferes-with-nextgen-pro-lightbox-controls

  • NEW: Added checks for the “post_type” query-string parameter when removing NextGEN’s scripts and stylesheets from all over the WordPress admin. This is required in order to detect some menu items under NextGEN Pro’s Ecommerce tab.

  • NEW: Optimizer now detects if the NextGEN Pro lightbox is currently being displayed. The lightbox loads a separate page inside an iframe, and script and stylesheet removal on that page breaks its icon images.

Plugin description and documentation:

  • IMPROVED: Replaced all instances of “pages without galleries” and “gallery pages” to “posts and pages with (or without) NextGEN Gallery content”. Whilst longer, this should be far less open to misinterpretation, as it tackles two possible elements of confusion at once…

  • 1. Of the word “gallery/Gallery” being taken too literally. E.g. pages displaying a “gallery” display type vs pages displaying an “album” display type, even though they’re both displaying NextGEN “Gallery” content.

  • 2. Ensuring we’re clear there is no differentiation between WordPress Posts and WordPress Pages.

  • Re: https://wordpress.org/support/topic/this-plugin-doesnt-do-what-it-says

  • IMPROVED: Replaced all instances of “NextGEN Legacy” with “NextGEN Legacy (v1.6.2 to v1.9.13)” to be clear we still fully support the original NextGEN codebase. The Legacy nomenclature was introduced by Photocrati (NextGEN’s new developers), and was required in the documentation as of Optimizer v2.0, in order to differentiate between the original and v2.0 NextGEN codebases.
    Re: https://wordpress.org/support/topic/announcement-nextgen-gallery-optimizer-v20-now-available

  • IMPROVED: Made some minor improvements to the text and layout on Optimizer’s settings pages, to enable users to better differentiate between the features included in the Basic and Pro versions.
    Re: https://wordpress.org/support/topic/question-about-pro-version-1

Additional changelog for Optimizer Pro:

  • NEW: NextGEN Gallery Deactivator now automatically flags the “nextgen-galleria-gallery” page in NextGEN Plus as an Allowed Page. This is used by the Pro slideshow in NextGEN Plus and NextGEN Pro, and is embedded in posts and pages inside an iframe.

  • NEW: NextGEN Gallery Deactivator now automatically flags the “nextgen-pro-lightbox-gallery” page and the “nextgen-pro-lightbox-load-images” page in NextGEN Plus and NextGEN Pro as Allowed Pages. These are embedded into gallery/slideshow posts and pages (when using the Pro lightbox), seemingly one iframe inside another.

  • NEW: NextGEN Gallery Deactivator now checks and allows the new AJAX path introduced in NextGEN v2.0.71+, which is required for comments and cart functionality in the NextGEN Pro lightbox, and save functionality in the Attach to Post interface. Now: http://www.example.com/?photocrati_ajax=1.

  • NEW: Added transient caching in the 1-click plugin updater to improve performance.

  • IMPROVED: A few minor coding improvements in NextGEN Gallery Deactivator.

  • SECURED: NextGEN Gallery Deactivator’s directory now includes an index.php file (like all other directories in Optimizer) to prevent bots from scanning the directory tree.

v2.0 – 2014-12-11

Script and stylesheet optimization changelog:

  • NEW: Plugin completely rewritten to support the new NextGEN 2.0 codebase, and the NextGEN Legacy fork called NextCellent Gallery.

  • NEW: Completely restructured to ensure all admin-related code loads only in the admin.

  • NEW: Master shortcode regex.

  • NEW: Support for NextGEN’s activate permalinks option.

  • NEW: Support for the link attribute in [singlepic id=x] shortcode.

  • NEW: Support for the “Show first –> Slideshow” option at Gallery –> Options –> Gallery.

  • NEW: Support for the new [nggalbum id=x] shortcode (for NextGEN v.1.9.12).

  • NEW: Support for AJAX pagination on [nggallery id=x] and album gallery pages.

  • NEW: Rewritten primary optimization logic.

  • NEW: Refined shortcode regex loop for multi-post pages to avoid conflicts with some plugins.

  • NEW: Sanitization, validation and error messaging for all settings on Optimizer’s options page, including an if file exists headers check on Legacy’s custom stylesheet URL field using the WordPress HTTP API.

  • NEW: Check if WordPress is at least v3.8 (the minimum version our Dynamic Fancybox Settings Interface currently supports).

  • NEW: Now using “wp_localize_script()” to insert NextGEN Legacy’s CDATA blocks.

  • NEW: Refactored lightbox script/style/CDATA loading into single functions.

  • NEW: The code behind Optimizer 2.0 now utilizes class encapsulation, with a strong focus on WordPress coding standards and best practices.

  • NEW: Now getting NextGEN Legacy’s query string parameters the WordPress way (replaced all $get variables with $wp_query->query_vars).

  • NEW: Replaced all calls to NextGEN’s database options array, in favor of accessing settings via the $ngg object (NextGEN Legacy) and the C_NextGEN_Settings object (NextGEN v2.0). This saves up to 15KB of memory depending on the NextGEN codebase we’re using.

  • NEW: Now storing all shortcode regex results (required for multi-post pages) in an array for further processing. This ensures we only run the regex operation once per load, speeding up execution.

  • FIXED: Small shortcode regex bug that affected some users (replaced our while have posts loop with a foreach iterating over the results of $wp_query->posts).

  • ADDED: jQuery migrate plugin in NextGEN Legacy (when Google-hosted jQuery is selected on Optimizer’s Legacy settings page), for backwards compatibility with other themes and plugins.

  • UPDATED: Legacy’s Google-hosted jQuery is now v1.11.1 to match the WordPress version included in WP 4.0.1.

Fancybox changelog:

  • NEW: Modified the Fancybox script for full compatibility with jQuery v1.9 and v1.10+ (doesn’t require jQuery migrate).

  • NEW: Rewritten auto Fancybox installation with full integration with NextGEN’s lightbox select menu at both Gallery –> Options –> Effects (NextGEN Legacy) and Gallery –> Other Options –> Lightbox Effects (NextGEN 2.0).

  • NEW: Support for AJAX pagination (inc. imagebrowser) when using the Fancybox lightbox (Shutter no longer required).

  • NEW: Improved our Fancybox stylesheet regex to accommodate devs moving sites from development servers to production.

  • NEW: Overhauled our responsive resize method. Now much faster!

  • NEW: Uniquely prefixed Fancybox function and selector names to avoid conflicts with themes simultaneously loading other versions.

  • NEW: Replaced Fancybox’s fading-out / fading-in of the actual image on resize with a transparent overlay, as it’s much less processor intensive. This runs a lot smoother in IE6/7/8 especially, and even improves performance in modern browsers when the CPU is being overworked.

  • NEW: Expanded the iframe “allowTransparency” conditional to include IE7 and 8, as they require this property also.

  • NEW: Improved a previous fix for NextGEN Legacy compatibility (space in empty title issue) so that it works perfectly in IE6 and 7.

  • NEW: Improved the responsive resize method invocation. Instead of firing independently on window.resize, this is now integrated into the Fancybox script itself. It’s set to only fire once Fancybox’s wrap centering is fully complete, ensuring smoother animations on older browsers, older equipment, or simply on overworked CPUs.

  • NEW: Adjusted vertical positioning of the loading animation, when adding room for the title position in Fancybox’s image height calculations.

  • NEW: Fancybox now factors in the dynamic address and tab bar in Safari on iOS8 in its height calculations, ensuring perfect vertical centering.

  • FIXED: Fancybox’s overlay width. When our document is wider than the browser window, we need to ensure the overlay covers the whole width (as it does the length), in case a user scrolls horizontally.

  • FIXED: The WordPress admin bar was hiding Fancybox’s background overlay and “x” close image. I’ve increased all z-index values to bring them to the top.

  • FIXED: Some minor Fancybox errors in JSHint.

v1.1.2 – 02/01/2013

  • Added new checks to make sure NextGEN Gallery is both installed and activated. A new admin notification accompanies this to assist new users with downloading, activating and setting up NextGEN.

  • Major improvements to Optimizer’s automatic Fancybox installation. 1. Checks to make sure NextGEN Gallery is actually installed. 2. Automatically resets if the NextGEN database settings are deleted (so it can run again if reinstalled). 3. Now deactivates and restores former NextGEN Effects values when Optimizer’s Fancybox option is switched off (as well as on plugin deactivation).

  • Improved our “can’t write css file” admin notification to include a small “how to” guide on changing file permissions, to assist users who are new to managing self-hosted sites.

  • Replaced all upload instructions with a step-by-step guide to installing Optimizer via the WordPress admin. This method of installation is much faster than FTP, largely automated and most importantly, ensures the correct file ownership and permissions are set.

  • Changed Google-hosted jQuery to version 1.8.3 to match the version now included in WordPress 3.5.

  • Updated the Basic version’s messaging in regards to the [Show as slideshow] text link for greater clarity.

  • Removed the donate and hire me boxes from the Basic version’s settings page, as some users had expressed annoyance.

  • Explicitly defined database settings variables as globals so they’re able to be used inside functions called on register_activation_hook().

v1.1.1 – 08/11/2012

  • Added a dynamic administrative message on the front-end for logged-in admins, which displays on posts/pages where unsupported shortcodes are being used. It’s intended to inform admins about the Basic version’s limitations in case they skipped the documentation, and highlight the Premium version’s feature set in case it would be more appropriate for their requirements. [Basic only]

  • Added a check to make sure jQuery isn’t being deregistered in a user’s theme, as it will break Fancybox. This regex runs on the plugins page and Optimizer’s settings page in the admin, and looks for variants of “wp_deregister_script(‘jquery’);” in the functions.php files of both the main active theme and the child theme (if present). If detected (and not re-registered with a CDN version), users are alerted via a message in the admin. [Basic and Premium]

  • Added a blank index.php file inside each of Optimizer’s folders to prevent Google from accessing and indexing the Apache directory tree. [Basic and Premium]

v1.1 – 12/07/2012

  • Added a conditional bottom margin in Fancybox’s image height calculations to make room for single-line titles. By default, especially with large images, the titles would be squished against the bottom of the viewport.

  • Added new options that allow users to choose between WordPress’s included jQuery or Google-hosted jQuery. We used to just run the Google-hosted script, but as users have reported compatibility issues (even with the jQuery.noConflict(); method added in the last update) — and that those issues have been resolved simply by using the built-in version instead — I thought it would be best to make WordPress’s jQuery the default and provide Google-hosted as an option.

  • Added support for WordPress’s native Thickbox lightbox integrated with NextGEN Gallery.

  • Added support for NextGEN’s built-in Shutter effect.

  • Added support for NextGEN’s JW Image Rotator assistant (Premium) after permission granted from the authors. Turns out we only needed to include WordPress’s native swfobject.js on the slideshow shortcode (if activated at Gallery –> Options –> Slideshow –> “Enable flash slideshow”), and grab the file path to the user’s downloaded imagerotator.swf file entered below that.

  • Added support for NextGEN’s AJAX pagination on the [imagebrowser id=x] shortcode (Premium). NextGEN also applies this to Gallery pages and Album gallery pages, but as I’ve outlined in the FAQ, the implementation is far too buggy, inconsistent and restrictive to add here. From a user interface perspective, it works rather well with imagebrowser (albeit, issuing notices), so I have added it in…but for the galleries, it’s really not necessary. I’d say it’s better to be without, than have it break the [Show as slideshow] links on the gallery pages.

  • Added a function to Fancybox’s scripts (Premium) to trigger an auto-resize when a user resizes their browser window. I’ve also added a slight delay for smooth animation and it looks great! Previously, the lightbox did center itself on window resize, but the image wouldn’t rescale without first exiting and re-entering the lightbox.

  • Changed three function names after adding support for Shutter and Thickbox (to be more descriptive and consistent).

  1. nggo_load_fancybox is now nggo_load_fancybox_scripts
  2. nggo_fancybox_style is now nggo_load_fancybox_styles
  3. nggo_nextgen_style is now nggo_load_nextgen_styles
  • Removed nggo_custom_style. Its functionality has been merged into nggo_load_nextgen_styles.

  • Added version number to Optimizer’s HTML comment to assist with support.

  • Added a link to Premium in the plugin description.

v1.0.8 – 18/06/2012

  • Changed “compatible up to” version number after thorough testing on WordPress 3.4.

  • Added the jQuery.noConflict(); method to improve compatibility with plugins and themes using other javascript libraries/frameworks including script.aculo.us, Prototype and MooTools.

  • Fixed a Fancybox/NextGEN Gallery integration issue where a small white line would appear underneath the lightbox when no title was set.

  • Recompiled jquery.fancybox-1.3.4.pack.js with Google Closure Compiler after above fix.

  • Switched Google-hosted jQuery to the latest version (1.7.2).

v1.0.7 – 29/05/2012

  • Converted all jQuery “$” selectors in Fancybox’s invocation code to “jQuery” to prevent conflicts with other plugins and scripts.

  • Fixed a minor bug in the “file not writable” admin message whereby the filename was omitted.

v1.0.6 – 04/04/2012

  • Installation of Fancybox is now fully automated and set by default.
    The plugin saves a copy of existing settings on the Gallery –> Options –> Effects page, then updates them with the Fancybox code so we don’t have to enter it manually.
    Any changes to this code are then overridden as long as the Fancybox option on the settings page is checked. This helps prevent accidental changes that would break integration. A safety switch, if you will.
    There’s also an admin message that prompts users to uncheck the Fancybox setting on the options page if they want to use another custom lightbox/effect.
    On deactivation, Optimizer will attempt to restore the former values…but only if Fancybox is selected (don’t want to write over newer custom values!)

  • Removed installation instructions from the options pages as, well, we don’t need them any more.

  • After discovering WordPress’s auto-update downloads the full version of the plugin (not just the files that have changed), and with no way to redirect back to the plugin settings page from the upgrade page, I’ve set the Fancybox stylesheet regex to run on admin_init instead. Since we only want it to run once (on first activation and after auto-update), I’ve defined a version number in the code and added a “version” option to the settings array to check against.

  • Added (if !defined()) to skip_load_scripts to avoid possible error messages when both basic and premium versions of the plugin are installed.

  • Added extra fields to the options page for persistent plugin settings.

v1.0.5 – 20/03/2012

  • Replaced my shortcode regex with WordPress’s native get_shortcode_regex() function for more precise matching.

  • Added a pre-emptive fix to solve a common problem where jQuery dependent scripts (such as Fancybox and NextGEN’s slideshow) break if jQuery doesn’t load first. Added array(‘jquery’) dependencies to wp_register_script calls (which forces jQuery to not only load when these scripts are called, but load first), as well as add_action priority values to influence their order.

  • Launched my new NextGEN Gallery Optimizer Premium version which supports ALL TEN of NextGen’s shortcodes, supports the [show as slideshow] link, adds targeting for shortcode sub-pages (eg. stylesheet only on album page / both styles and scripts (if selected) on album GALLERY pages) and adds the removal of NextGEN’s version number comment.

  • Added promotional box to the basic version’s settings page.

v1.0.4 – 18/03/2012

  • Added an automatic redirect that sends first time users to the plugin options page on first activation.

  • Added a one time welcome message on the redirect.

  • Added a default setting for the stylesheet in case anyone forgets to set it.

  • Added email contact to the settings page and main page at the plugin repository.

  • Changed all instances of $nextgen_gallery_optimizer to a global $nggo_options variable for less cumbersome handling of database options.

  • Moved the stylesheet drop-down if statements to scripts-and-styles.php to keep them together with their register and enqueue calls.

v1.0.3 – 09/03/2012

  • Replaced all hard-coded scripts and styles with WordPress’s built-in wp_enqueue_scripts and wp_print_styles functions for better compatibility with other plugins.

  • Added several instances of wp_deregister_script to pages we’re serving jquery and jquery.fancybox.js on. This will prevent conflicts (and page load overhead) if any other installed plugins try to serve duplicate scripts.

  • Added /wp-content/ url prefix to custom css input box on the settings page. Also made the Fancybox installation instructions clearer with larger text, a link to the NextGEN Effects page, and extra advice in the Tips section on plugin conflicts.

v1.0.2 – 07/03/2012

  • Added support for WordPress Pages

  • Fixed an issue where some page elements overlap Fancybox and prevent the close button from functioning (in particular the title text, header image and menu bar in Twenty Eleven).

  • Fixed a surprisingly common issue involving Fancybox not working in IE6 & IE8. My solution was to develop a regular expression that runs on the plugin options page ONLY to write the full urls Microsoft.AlphaImageLoader requires into the static Fancybox stylesheet. Much more efficient than some methods I’ve seen (such as dynamically rebuilding the stylesheet on every page view in php).

  • Switched JQuery to the latest version 1.7.1 (Google hosted)

v1.0.1 – 01/03/2012

  • Resolved issue regarding upload to WordPress.org repository

v1.0 – 28/02/2012

  • Initial release on February 28th, 2012.