Closed (duplicate)
Project:
Image
Version:
5.x-2.x-dev
Component:
image_gallery
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
1 Feb 2008 at 13:01 UTC
Updated:
18 Aug 2008 at 16:40 UTC
I've added a setting on the settings form [image_gallery.module]
+ $form['gallery']['image_gallery_list_empty_galleries'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('List empty galleries'),
+ '#default_value' => variable_get('image_gallery_list_empty_galleries', 1),
+ '#description' => t("Checking this will always list galleries, even if they are empty."),
+ );
which is used during while theming function theme_image_gallery($galleries .. to
NOTlist a gallery when it's $gallery->count is ZERO
+ if(!variable_get('image_gallery_list_empty_galleries', 1) and !($gallery->count)){
+ //don't display empty galleries
}
| Comment | File | Size | Author |
|---|---|---|---|
| image_gallery.module.patch | 2.63 KB | demeester_roel |
Comments
Comment #1
demeester_roel commentedsubscribe
Comment #2
underpressure commentedCould this be modified to hide a gallery that isn't empty? If I just added 100 photos to a new gallery I don't want site visitors to see this photos until I've labeled and added descriptions to all the photos.
Comment #3
drewish commentedthis should be done against the 2.x branch. i'm not considering new features for the 1.x branch.
Comment #4
Hetta commentedComment #5
Hetta commentedduplicate: http://drupal.org/node/234845 - later, but has a patch.
Comment #6
demeester_roel commentedirw http://drupal.org/node/216684#comment-713403
Could you make that an extra feature request. It is not really related to this request