_forum_format

Versions
4.6 – 5
_forum_format($topic)

Formats a topic for display

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

▾ 2 functions call _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.

Code

modules/forum/forum.module, line 677

<?php
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');
  }
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.