function theme_itweak_upload_images in iTweak Upload 6.2
Theme function to show image attachments
Parameters
$list: An array of links to thumbnails
$options: An array of options. If 'gallery_type' element is given, it selects custom image gallery type.
Return value
The themed list
1 theme call to theme_itweak_upload_images()
- theme_itweak_upload_images_body in ./
itweak_upload.module - Theme function to show image attachments in full node view.
File
- ./
itweak_upload.module, line 1136 - iTweakUpload - Tweak attachments display and file upload forms.
Code
function theme_itweak_upload_images($list, $options = NULL) {
$gallery_type = $options && isset($options['gallery_type']) ? $options['gallery_type'] : 'none';
$carousel_visible = ITU_CAROUSEL_VISIBLE_ITEMS;
$div_class = 'itu-attachment-images';
$list_class = 'itu-attachment-thumbs';
$jcarousellite = FALSE;
// Check modules: we want to fallback if setting is left behind from disabled module
if ($gallery_type == 'jcarousel' && !module_exists('jcarousel')) {
$gallery_type = 'none';
}
if ($gallery_type == 'jcarousellite') {
if (!module_exists('jcarousellite') || count($list) <= $carousel_visible) {
// This avoids jCarousel Lite bug with tiles fewer than carousel size
$gallery_type = 'none';
}
else {
$jcarousellite = TRUE;
}
}
if ($gallery_type != '' && $gallery_type != 'none') {
$div_class .= ' ' . $gallery_type;
// add class
$list_class .= '-' . $gallery_type;
// change class
}
$output = '<div class="' . $div_class . '">';
if ($jcarousellite) {
$output .= '<a href="#" class="itu-attachment-jcarousellite-prev"> </a>';
}
$output .= theme('item_list', $list, NULL, 'ul', array(
'class' => $list_class,
));
if ($jcarousellite) {
$output .= '<a href="#" class="itu-attachment-jcarousellite-next"> </a>';
}
$output .= '</div>';
return $output;
}