You are here

function photos_album_slide in Album Photos 7.3

Same name and namespace in other branches
  1. 6.2 inc/photos.album.inc \photos_album_slide()

Album slide show.

1 string reference to 'photos_album_slide'
photos_menu in ./photos.module
Implements hook_menu().

File

inc/photos.album.inc, line 264
Handles album views and content.

Code

function photos_album_slide($node) {
  if ($node->album['count'] || $node->subalbum['count']) {
    $type = $node->type == 'photos' ? 'album' : 'sub_album';
    _photos_breadcrumb(array(
      l(t('@name\'s albums', array(
        '@name' => $node->name,
      )), 'photos/user/' . $node->uid . '/album'),
      l($node->title, 'photos/' . $type . '/' . $node->nid),
    ));
    $page_title = t('Slide: @title', array(
      '@title' => $node->title,
    ));
    drupal_set_title($page_title);
    $share_code = l(t('Share code'), 'photos/' . $type . '/' . $node->nid . '/share', array(
      'query' => array(
        'KeepThis' => 'true',
        'TB_iframe' => 'true',
        'height' => '450',
        'width' => '650',
      ),
      'attributes' => array(
        'title' => t('Share code'),
        'class' => array(
          'colorbox',
        ),
      ),
    ));
    $v = '<p>' . l(t('Back'), 'photos/' . $type . '/' . $node->nid) . ' | ' . $share_code . '</p>';
    $v .= _photos_slide($node);
  }
  else {
    $v = t('No image');
  }
  return $v;
}