summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gallery_block.inc8
-rw-r--r--gallery_settings.inc18
2 files changed, 24 insertions, 2 deletions
diff --git a/gallery_block.inc b/gallery_block.inc
index 36b8326..7c98754 100644
--- a/gallery_block.inc
+++ b/gallery_block.inc
@@ -57,7 +57,9 @@ function _gallery_block($op = 'list', $delta = 0, $edit = array()) {
$params['albumFrame'] = variable_get('gallery_album_frame', 'none');
$params['itemFrame'] = variable_get('gallery_item_frame', 'none');
$params['linkTarget'] = variable_get('gallery_link_target', '');
-
+ if (variable_get('gallery_item_id', '') != '') {
+ $params['itemId'] = variable_get('gallery_item_id', '');
+ }
$block = array();
list($ret, $content, $head) = GalleryEmbed::getImageBlock($params);
if ($ret) {
@@ -105,7 +107,9 @@ function _gallery_block($op = 'list', $delta = 0, $edit = array()) {
$params['albumFrame'] = variable_get('gallery_grid_album_frame', 'none');
$params['itemFrame'] = variable_get('gallery_grid_item_frame', 'none');
$params['linkTarget'] = variable_get('gallery_grid_link_target', '');
-
+ if (variable_get('gallery_grid_item_id', '') != '') {
+ $params['itemId'] = variable_get('gallery_grid_item_id', '');
+ }
$block = array();
list($ret, $content, $head) = GalleryEmbed::getImageBlock($params);
if ($ret) {
diff --git a/gallery_settings.inc b/gallery_settings.inc
index 2058a77..0af1db8 100644
--- a/gallery_settings.inc
+++ b/gallery_settings.inc
@@ -220,6 +220,15 @@ function _gallery_block_settings($typeMap , $paramMap) {
$form['block']['gallery_block_block'][$i-1]['#description'] =
t('Pick the type of images you\'d like to see. You can select the same type more than once.');
+ $form['block']['gallery_item_id'] = array(
+ '#type' => 'textfield',
+ '#title' => t('Album or Item ID'),
+ '#default_value' => variable_get('gallery_item_id', ''),
+ '#size' => 20,
+ '#maxlength' => 20,
+ '#description' => t('Enter the Gallery image or album ID (or blank). If an album or item ID is specified, random images will only be selected from that album and its sub-albums.'),
+ );
+
$form['block']['gallery_block_show'] = array(
'#type' => 'checkboxes',
'#title' => t('Image data'),
@@ -303,6 +312,15 @@ function _gallery_grid_block_settings($typeMap , $paramMap) {
'#description' => 'Pick the type of images you\'d like to see in the grid.',
);
+ $form['grid']['gallery_grid_item_id'] = array(
+ '#type' => 'textfield',
+ '#title' => t('Album or Item ID'),
+ '#default_value' => variable_get('gallery_grid_item_id', ''),
+ '#size' => 20,
+ '#maxlength' => 20,
+ '#description' => t('Enter the Gallery image or album ID (or blank). If an album or item ID is specified, random images will only be selected from that album and its sub-albums.'),
+ );
+
$form['grid']['gallery_grid_block_show'] = array(
'#type' => 'checkboxes',
'#title' => t('Image data'),