function advanced_forum_preprocess_advanced_forum_topic_header in Advanced Forum 5
Same name and namespace in other branches
- 6.2 includes/theme.inc \advanced_forum_preprocess_advanced_forum_topic_header()
- 6 advanced_forum.module \advanced_forum_preprocess_advanced_forum_topic_header()
- 7.2 includes/theme.inc \advanced_forum_preprocess_advanced_forum_topic_header()
Preprocesses template variables for the topic header template.
File
- ./
advanced_forum.module, line 441 - Enables the look and feel of other popular forum software.
Code
function advanced_forum_preprocess_advanced_forum_topic_header(&$variables) {
// Build the reply link / button
$variables['reply_link'] = theme('advanced_forum_reply_link', $variables['node'], $variables['comment_count']);
// Total & new replies
if (!empty($variables['comment_count'])) {
$variables['total_posts'] = format_plural($variables['comment_count'], '1 reply', '@count replies');
$variables['last_post'] = advanced_forum_last_post_link($variables['node']);
}
else {
$variables['total_posts'] = t('No replies');
}
$variables['new_posts'] = advanced_forum_first_new_post_link($variables['node'], $variables['comment_count']);
}