Commit 705fd23b authored by kiz_0987's avatar kiz_0987

#64498 - Added support for specific album in image block and grid image block. Thanks rbroberts.

parent 7eda3ef1
......@@ -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) {
......
......@@ -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'),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment