Same name and namespace in other branches
  1. 10 core/modules/forum/forum.module \template_preprocess_forum_submitted()
  2. 6.x modules/forum/forum.module \template_preprocess_forum_submitted()
  3. 8.9.x core/modules/forum/forum.module \template_preprocess_forum_submitted()
  4. 9 core/modules/forum/forum.module \template_preprocess_forum_submitted()

Preprocesses variables for forum-submitted.tpl.php.

The submission information will be displayed in the forum list and topic list.

Parameters

$variables: An array containing the following elements:

  • topic: The topic object.

See also

forum-submitted.tpl.php

theme_forum_submitted()

File

modules/forum/forum.module, line 1274
Provides discussion forums.

Code

function template_preprocess_forum_submitted(&$variables) {
  $variables['author'] = isset($variables['topic']->uid) ? theme('username', array(
    'account' => $variables['topic'],
  )) : '';
  $variables['time'] = isset($variables['topic']->created) ? format_interval(REQUEST_TIME - $variables['topic']->created) : '';
}