function template_preprocess_forum_submitted

template_preprocess_forum_submitted(&$variables)

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 1273
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) : '';
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!forum!forum.module/function/template_preprocess_forum_submitted/7.x