function bb_attachments_post_footer($text) { if (!is_bb_feed()) { global $bb_post, $bb_attachments; $text .= "<div class='bb_attachments'>" . bb_attachments_post_attachments($bb_post->post_id) . "</div>"; } return $text; }
/* note: because of lack of foresight in the bbPress output functions you have to edit the topic.php template to change post colors change: <?php foreach ($posts as $bb_post) : $del_class = post_del_class(); ?> to: <?php foreach ($posts as $bb_post) : $del_class = apply_filters('best_answer_class',post_del_class()); ?> */ /* stop editing here */ if (!empty($best_answer['forums']) && !is_array($best_answer['forums'])) { (array) ($best_answer['forums'] = explode(',', $best_answer['forums'])); $best_answer['forums'] = array_flip($best_answer['forums']); } if ($best_answer['display_first']) { add_filter('get_post_link', 'best_answer_post_link', 255, 2); } if (is_topic()) { add_action('bb_topic.php', 'best_answer_init'); } elseif (!is_bb_feed()) { add_filter('topic_title', 'best_answer_title', 255); } add_action('bb_head', 'best_answer_head'); add_action('topicmeta', 'best_answer_meta'); if ($best_answer['add_views']) { // doing it this way hides them from the default view list $query = array('started' => '>0', 'append_meta' => false, 'sticky' => false, 'topic_status' => 'all', 'order_by' => 1, 'per_page' => 1); bb_register_view("best-answer", "Questions with a best answer", $query); bb_register_view("no-best-answer", "Questions without a best answer", $query); add_action('bb_custom_view', 'best_answer_views'); } function best_answer_init() { global $best_answer, $topic, $bb_current_user, $posts, $page; if (!empty($best_answer['forums']) && !isset($best_answer['forums'][$topic->forum_id])) {