public function getTaggedTopics($tag, $from) { $new_topic_ids = array(); $new_replies = array(); $topic = new \CODOF\Forum\Topic($this->db); $topic->ajax = true; $topics = $topic->getTaggedTopics($tag, $from); $tids = array(); foreach ($topics as $one_topic) { $tids[] = $one_topic['topic_id']; } if (\CODOF\User\CurrentUser\CurrentUser::loggedIn()) { $tracker = new \CODOF\Forum\Tracker($this->db); //0.76 = 3 queries $new_topic_ids = $tracker->get_all_new_topic_ids($tids); $new_replies = $tracker->get_new_reply_counts($tids); } //echo json_encode( return array("topics" => $topics, "tags" => $topic->getAllTags($tids), "new_topic_ids" => $new_topic_ids, "find_topics_tagged" => _t("find topics tagged"), "new_replies" => $new_replies, "new" => _t("new"), "new_topic" => _t("new topic"), "new_replies_txt" => _t("new replies"), "RURI" => RURI, "DURI" => DURI, "CAT_IMGS" => CAT_IMGS, "CURR_THEME" => CURR_THEME, "reply_txt" => _t("replies"), "views_txt" => _t("views"), "recent_txt" => _t('recent by'), "num_posts" => \CODOF\Util::get_opt('num_posts_all_topics')); //); }