function gallery_assist_image_more_info in Gallery Assist 6
Calculate necessary parameters to build the gallery item boxes.
Parameters
$type: A string containing the node type.
$img: An associative array containing the gallery item data.
$conf: An associative array containing the gallery settings data.
$my_image_height: A integer containing the image height if force_image_height is setted to TRUE.
6 calls to gallery_assist_image_more_info()
- gallery_assist_image_box in ./
gallery_assist_display.inc - Build and return the image box.
- gallery_assist_image_box_list in ./
gallery_assist_list_display.inc - Build and return the image box.
- gallery_assist_sorting_items_standard in ./
gallery_assist.module - _gallery_assist_block_display in ./
gallery_assist.module - Display the GA-Block Galleries (0).
- _gallery_assist_block_display_1 in ./
gallery_assist.module - Display the GA-Block My Galleries (1).
File
- ./
gallery_assist.module, line 5256 - Drupal content type with gallery functionality.
Code
function gallery_assist_image_more_info($type, $img, $conf, $my_image_height = '') {
$symbol = $conf['force_image_height'] == 1 ? $my_image_height : $conf['thumbnail_size'];
$img['padding'] = $conf['item_padding'];
$img['margin'] = $conf['item_margin'];
$img['dsize'] = $conf['thumbnail_size'];
$img['pos'] = $img['height'] >= $img['width'] ? 'v' : 'h';
if ($img['pos'] == 'h') {
$img['new_width'] = $symbol;
$img['new_height'] = $img['new_width'] * 100 / $img['width'] * $img['height'] / 100;
$minus = $conf['force_image_height'] == 1 ? $conf['thumbnail_height_size'] : $img['new_height'];
$img['top'] = $img['height'] < $img['width'] ? ($symbol - $minus) / 2 : 0;
}
else {
$img['new_height'] = $symbol;
}
if ($conf['disable_margin_top'] == 1) {
unset($img['top']);
}
return $img;
}