You are here

function theme_advanced_forum_post_edited in Advanced Forum 6.2

Theme function to show who last edited a post.

2 theme calls to theme_advanced_forum_post_edited()
advanced_forum_views_post_render in ./advanced_forum.module
Post render a view and replace any advanced forum tokens.
_advanced_forum_preprocess_node in includes/advanced_forum_preprocess_node.inc
@file Holds the contents of a preprocess function moved into its own file to ease memory requirements and having too much code in one file.

File

includes/theme.inc, line 56
Holds theme functions and template preprocesses. Other style related functions are in style.inc

Code

function theme_advanced_forum_post_edited($who, $when, $why) {
  $editor = user_load($who);
  $editor_name = theme('username', $editor);
  $datetime = format_date($when, 'custom', variable_get('date_format_short', 'm/d/Y - H:i'));
  $edited_by = t('<span class="post-edit-label">Edited by</span> !editor', array(
    '!editor' => $editor_name,
  ));
  $edited_on = t('<span class="post-edit-label">on</span> !datetime', array(
    '!datetime' => $datetime,
  ));
  $edit_reason = empty($why) ? "" : t('<span class="post-edit-label">Reason:</span> !reason', array(
    '!reason' => $why,
  ));
  return $edited_by . ' ' . $edited_on . '<br />' . $edit_reason;
}