• Resolved benzouye

    (@benzouye)


    Hi,

    I would like to know if you have an idea to enable simple lightbox slideshow ONLY for galleries (standard wordpress gallery).

    I have a page with a gallery of 10 pictures and also some independants pictures. I want the slideshow to occur and consider ONLY the pictures content in the gallery, and normal single display (no slideshow) for independants pictures.

    Thank you for the help and advise !

    • This topic was modified 8 years, 5 months ago by benzouye. Reason: syntax correction
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Archetyped

    (@archetyped)

    Hi, slideshow grouping is currently a global setting, but I’ve added your suggestion for selective grouping to the list. Thanks!

    Thread Starter benzouye

    (@benzouye)

    Ok, thank you for the answer.

    Do you see any way to do this with the current version of your plugin, any idea (even vague) of what should be done ? I’m not afraid about coding, PHP or JS side … and would share my work of course !

    By the way, I started to translate your plugin in locale fr_FR, hope it’ll be validate …

    • This reply was modified 8 years, 5 months ago by benzouye.
    • This reply was modified 8 years, 5 months ago by benzouye.
    Plugin Author Archetyped

    (@archetyped)

    Hi, this would affect how SLB activates links at a fundamental level, so it would likely require more than changing some code here or there. Most of the logic is in SLB’s controller.php if you want to have a crack at it though.

    • This reply was modified 8 years, 5 months ago by Archetyped.
    Thread Starter benzouye

    (@benzouye)

    Thank you for time spent on this.

    So, I worked on it, and I give you the way I got what I need. I only made small changes, only on controller.php file :

    First I create a new options called ‘group-not-single’ in the function _options() in $opts array., by simply adding :
    'group_not_single' => array('title' => __('Don\'t group single items', 'simple-lightbox'), 'default' => false, 'group' => array('grouping', 25)),

    I also create à new private property for the class : $group_id, initiate with 0.
    private $group_id = 0;

    Finally, in the process_links method, after the group setting, I put a test :

    if( $this->options->get_bool('group_not_single') && count($group) == 0 ) {
    	array_push( $group, $this->group_id );
    	++$this->group_id;
    }

    This way, if you disable grouping by post and enable the new options, for each single item (not include in a gallery) a new group id is defined and item is display without slideshow …

    This do the job correctly for me …

    Hope you’ll look at it and integrate this on a further updates ??

    Plugin Author Archetyped

    (@archetyped)

    Hi, glad to hear you found a solution that worked for your needs. Just remember to keep a back up, as any future updates to the plugin will overwrite your modifications.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Enable slideshow only for gallery’ is closed to new replies.