Hi ibeedug.
Thanks for using NextGEN Gallery ColorBoxer, and for your kind words!
This is quite a tricky one, and I’ll definitely look into integrating this feature in a future version of the plugin. However, it’s no simple task to override NextGEN’s built-in functionality just by adding an extra shortcode attribute. Some significant modifications would need to be made to NextGEN itself.
There is a much simpler approach however, whereby we could replace the dynamic rel attribute with a static value. This would achieve the functionality you’re after – grouping all images from separate galleries on a page in a single ColorBox lightbox instance – and without having to go through old posts editing shortcodes.
To do this, simply navigate to Plugins –> Editor –> NextGEN Gallery ColorBoxer –> nextgen-gallery-colorboxer/nextgen-gallery-colorboxer.php, and near the bottom…
Replace this:
if (($nggcb_nextgen_options['thumbEffect'] != 'custom') ||
($nggcb_nextgen_options['thumbCode'] != 'class=\"mycolorbox\" rel=\"%GALLERY_NAME%\"')) {
// if nextgen's effects settings are accidentally changed while colorboxer is activated
// update colorbox integration and show notification message
$nggcb_nextgen_options['thumbEffect'] = 'custom'; // insert field or update value in array
$nggcb_nextgen_options['thumbCode'] = 'class=\"mycolorbox\" rel=\"%GALLERY_NAME%\"'; // insert field or update value in array
update_option('ngg_options', $nggcb_nextgen_options); // update option array
add_action('admin_notices', 'nggcb_please_deactivate_colorboxer');
}
With this:
if (($nggcb_nextgen_options['thumbEffect'] != 'custom') ||
($nggcb_nextgen_options['thumbCode'] != 'class=\"mycolorbox\" rel=\"show_all\"')) {
// if nextgen's effects settings are accidentally changed while colorboxer is activated
// update colorbox integration and show notification message
$nggcb_nextgen_options['thumbEffect'] = 'custom'; // insert field or update value in array
$nggcb_nextgen_options['thumbCode'] = 'class=\"mycolorbox\" rel=\"show_all\"'; // insert field or update value in array
update_option('ngg_options', $nggcb_nextgen_options); // update option array
add_action('admin_notices', 'nggcb_please_deactivate_colorboxer');
}
Click “Update File” when you’re done, refresh the admin, and your rel tags will now all read rel=”show_all” (instead of set_1,2,3 etc), instructing ColorBox to group all images across separate galleries in a single lightbox.
Hope this helps!
Cheers,
Mark.
Mark
Thanks for getting back to me. Your coding abilities are amazing to say the least. Thank you for your time to offer a solution.
I LOVE that your plug-in separates the galleries like it currently does, and I understand how difficult it would be to modify nextGen’s Gallery via shortcode.
There are other colorbox plugins that already group ALL page galleries together. I need one that can selectively combine a few galleries while not grouping others.
I thought that maybe you could set a variable or something.