You are here

function theme_photos_block in Album Photos 6.2

2 theme calls to theme_photos_block()
_photos_block_album in ./photos.module
_photos_block_image in ./photos.module

File

./photos.module, line 823

Code

function theme_photos_block($images = array(), $type) {

  //print_r($images);

  //$type: latest user rand
  $label = variable_get('photos_title_0', false);
  switch ($type) {
    case 'image':
      foreach ($images as $image) {
        $item[] = theme('photos_imagehtml', $image['thumb'][$label], array(
          'filename' => $image['filename'] . ' - ' . t('By: @name', array(
            '@name' => $image['name'],
          )),
          'href' => 'photos/image/' . $image['fid'],
        ));
      }
      break;
    case 'album':
      foreach ($images as $album) {
        $op['attributes']['title'] = $album['node']->count ? t('A total of @title images', array(
          '@title' => $album['node']->count,
        )) : t('Album is empty');
        $item[] = $album['view'] . '<div class="photos_block_album_title">' . l($album['node']->title, 'node/' . $album['node']->nid, $op) . '</div>';
      }
  }
  return theme('item_list', $item);
}