$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) {
$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) {
$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'),
'#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'),