You are here

function theme_photos_comment_count in Album Photos 6.2

4 theme calls to theme_photos_comment_count()
photos_album_page in inc/photos.album.inc
photos_image_page in inc/photos.image.inc
photos_page_image in inc/photos.page.inc
photos_sub_album_page in inc/photos.album.inc

File

./photos.module, line 1324

Code

function theme_photos_comment_count($comcount, $url = 0) {
  if (!$comcount) {
    if (!user_access('post comments')) {
      $comment = t('<a href="@login">Login</a> to post comments', array(
        '@login' => url('user/login', array(
          'query' => drupal_get_destination(),
        )),
      ));
    }
    else {
      $comment = '<a href="' . ($url ? $url . '#comment-form' : '#comment-form') . '">' . t('Add new comment') . '</a>';
    }
  }
  else {
    if ($comcount > 1) {
      $comment = '<a href="' . ($url ? $url . '#comments' : '#comments') . '">' . t('!con comments', array(
        '!con' => $comcount,
      )) . '</a>';
    }
    else {
      $comment = '<a href="' . ($url ? $url . '#comments' : '#comments') . '">' . t('!con comment', array(
        '!con' => $comcount,
      )) . '</a>';
    }
  }
  return $comment;
}