/** * Add 'Unanswered' option to discussion filters. */ public function Base_AfterDiscussionFilters_Handler($Sender, $Args) { if (Gdn::Session()->CheckPermission('Garden.Moderation.Manage')) { $DiscussionModel = new DiscussionModel(); $Active = $Controller->RequestMethod == 'unanswered' ? ' Active' : ''; $Unanswered = Sprite('SpUnansweredQuestionsSpUnansweredQuestions') . ' ' . T('Unanswered') . FilterCountString($DiscussionModel->UnansweredCount()); echo '<li class="Unanswered ' . $Active . '">' . Anchor($Unanswered, 'discussions/unanswered') . '</li>'; } }