function template_preprocess_forum_submitted

Same name in other branches
  1. 9 core/modules/forum/forum.module \template_preprocess_forum_submitted()
  2. 8.9.x core/modules/forum/forum.module \template_preprocess_forum_submitted()
  3. 10 core/modules/forum/forum.module \template_preprocess_forum_submitted()
  4. 11.x 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

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.