• Love the plug-in! Works fantastically and the support is great.

    I would like to know if this is possible.
    Currently, your plug-in adds a class and rel to keep the galleries separated from each other in the colorbox view.

    class="mycolorbox" rel="set_1"

    Could you incorporate, as part of the shortcode, a way to override the rel tag so that 2 galleries would be separated on the page, but are viewed as one within the colorbox?

    Example:

    [nggallery id=1 template=caption rel=set_1]
    [nggallery id=2 template=caption rel=set_1]

    http://ww.wp.xz.cn/extend/plugins/nextgen-gallery-colorboxer/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Mark Jeldi

    (@mark-jeldi)

    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.

    Thread Starter ibeedug

    (@ibeedug)

    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.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Feature Request: Override REL’ is closed to new replies.