function template_preprocess_forum_submitted in Drupal 7
Same name and namespace in other branches
- 8 core/modules/forum/forum.module \template_preprocess_forum_submitted()
- 6 modules/forum/forum.module \template_preprocess_forum_submitted()
- 9 core/modules/forum/forum.module \template_preprocess_forum_submitted()
- 10 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
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) : '';
}