id) {
$highlight_class = 'highlight-post';
}
// Special CSS-class for online users.
$user_online_class = ($this->online->is_user_online($post->author_id)) ? 'user-online' : '';
$user_data = get_userdata($post->author_id);
echo '
';
echo '
';
// Show avatar if activated.
if ($this->options['enable_avatars']) {
$avatar_size = apply_filters('asgarosforum_filter_avatar_size', 120);
echo get_avatar($post->author_id, $avatar_size, '', '', array('force_display' => true));
}
echo '
';
// Show username.
$username = apply_filters('asgarosforum_filter_post_username', $this->getUsername($post->author_id), $post->author_id);
echo ''.$username.'';
// Mentioning name.
if ($user_data != false) {
$this->mentioning->render_nice_name($post->author_id);
}
echo '
';
if ($user_data != false) {
echo '
';
// Show author posts counter if activated.
if ($this->options['show_author_posts_counter']) {
$author_posts_i18n = number_format_i18n($post->author_posts);
echo ''.sprintf(_n('%s Post', '%s Posts', $post->author_posts, 'asgaros-forum'), $author_posts_i18n).'';
}
// Show marker for topic-author.
if ($this->current_view != 'post' && $this->options['highlight_authors'] && ($counter > 1 || $this->current_page > 0) && $topicStarter != 0 && $topicStarter == $post->author_id) {
echo ''.__('Topic Author', 'asgaros-forum').'';
}
// Show marker for banned user.
if ($this->permissions->isBanned($post->author_id)) {
echo ''.__('Banned', 'asgaros-forum').'';
}
echo '
';
// Show groups of user.
$usergroups = AsgarosForumUserGroups::getUserGroupsOfUser($post->author_id, 'all', true);
if (!empty($usergroups)) {
echo '
';
foreach ($usergroups as $usergroup) {
echo AsgarosForumUserGroups::render_usergroup_tag($usergroup);
}
echo '
';
}
}
do_action('asgarosforum_after_post_author', $post->author_id, $post->author_posts);
echo '
';
echo '
';
// Post header.
echo '';
// Post message.
echo '
';
// Initial escaping.
$allowed_html = wp_kses_allowed_html('post');
$allowed_html['iframe'] = array('width' => array(), 'height' => array(), 'src' => array(), 'frameborder' => array(), 'allowfullscreen' => array());
$post_content = wp_kses($post->text, $allowed_html);
$post_content = stripslashes($post_content);
echo '
'.__('Quote from', 'asgaros-forum').' '.$this->getUsername($post->author_id).' '.sprintf(__('on %s', 'asgaros-forum'), $this->format_date($post->date)).'
'.wpautop($post_content).'
';
// Automatically embed contents if enabled.
if ($this->options['embed_content']) {
global $wp_embed;
$post_content = $wp_embed->autoembed($post_content);
}
// Wrap paragraphs.
$post_content = wpautop($post_content);
// Render shortcodes.
$post_content = $this->shortcode->render_post_shortcodes($post_content);
// Create nicename-links.
$post_content = $this->mentioning->nice_name_to_link($post_content);
// This function has to be called at last to ensure that we dont break links to mentioned users.
$post_content = make_clickable($post_content);
// Apply custom filters.
$post_content = apply_filters('asgarosforum_filter_post_content', $post_content, $post->id);
echo $post_content;
echo $this->uploads->show_uploaded_files($post->id, $post->uploads);
do_action('asgarosforum_after_post_message', $post->author_id, $post->id);
echo '
';
// Show post footer when the topic is approved.
if ($this->approval->is_topic_approved($this->current_topic)) {
echo '';
}
// Show signature.
if ($this->current_view != 'post') {
$signature = $this->get_signature($post->author_id);
if ($signature !== false) {
echo '
'.$signature.'
';
}
}
?>