You are here

function theme_guestbook_entry_comment in Guestbook 6

Same name and namespace in other branches
  1. 5.2 guestbook.module \theme_guestbook_entry_comment()
  2. 5 guestbook.module \theme_guestbook_entry_comment()
  3. 6.2 guestbook.module \theme_guestbook_entry_comment()
  4. 7.2 guestbook.module \theme_guestbook_entry_comment()
1 theme call to theme_guestbook_entry_comment()
theme_guestbook_entry in ./guestbook.module

File

./guestbook.module, line 805

Code

function theme_guestbook_entry_comment($uid, $entry, $comment_entry) {
  $display = (array) variable_get('guestbook_display', array(
    'date',
    'email',
    'website',
    'comments',
  ));
  $output = '';
  if ($comment_entry == $entry['id']) {

    // display comment edit form
    $output .= guestbook_form_comment($uid, $entry);
  }
  else {
    if (in_array('comments', $display) && $entry['comment'] != '') {

      // display comment
      $commentby = user_access('access user profiles') ? l($entry['commentby'], "user/{$entry['commentauthor']}") : $entry['commentby'];
      $output .= '<small>' . t('Comment by') . ' ' . $commentby . "</small><br />";
      $output .= '<em>' . check_plain($entry['comment']) . '</em>';
    }
  }
  return '<div class="guestbook-comment content">' . $output . '</div>';
}