Same name and namespace in other branches
  1. 4.6.x modules/forum.module \_forum_format()
  2. 5.x modules/forum/forum.module \_forum_format()

Formats a topic for display

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

File

modules/forum.module, line 669
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 message_na();
  }
}