You are here

function theme_itweak_upload_images_body in iTweak Upload 6.2

Theme function to show image attachments in full node view.

Parameters

$files: Array of file descriptors, incl. links to thumbnails.

$limit: Maximum number of thumbnails to display.

$options: Optional. Array of options for the gallery and thumbnail links. See theme_itweak_upload_images().

Return value

The themed list

2 calls to theme_itweak_upload_images_body()
theme_itweak_upload_images_comment in ./itweak_upload.module
Theme function to show image attachments in comments.
theme_itweak_upload_images_teaser in ./itweak_upload.module
Theme function to show image attachments in teaser view.
1 theme call to theme_itweak_upload_images_body()
itweak_upload_nodeapi in ./itweak_upload.module
Implementation of hook_nodeapi().

File

./itweak_upload.module, line 1221
iTweakUpload - Tweak attachments display and file upload forms.

Code

function theme_itweak_upload_images_body($files, $limit = -1, $options = NULL) {
  $items = array();
  foreach ($files as $file) {
    if ($limit != -1 && count($items) >= $limit) {
      break;
    }
    $file = (object) $file;
    if ($file->list && empty($file->remove)) {
      if (isset($file->preview)) {
        $items[] = array(
          'data' => $file->preview['#value'],
          'class' => '',
        );
      }
    }
  }
  if (count($items)) {
    return theme('itweak_upload_images', $items, $options);
  }
}