You are here

function _forum_format in Drupal 5

Same name and namespace in other branches
  1. 4 modules/forum.module \_forum_format()

Formats a topic for display

@TODO Give a better description. Not sure where this function is used yet.

2 calls to _forum_format()
theme_forum_list in modules/forum/forum.module
Format the forum listing.
theme_forum_topic_list in modules/forum/forum.module
Format the topic listing.

File

modules/forum/forum.module, line 677
Enable threaded discussions about general topics.

Code

function _forum_format($topic) {
  if ($topic && $topic->timestamp) {
    return t('@time ago<br />by !author', array(
      '@time' => format_interval(time() - $topic->timestamp),
      '!author' => theme('username', $topic),
    ));
  }
  else {
    return t('n/a');
  }
}