/** * Build HTML for discussions options menu. * * @param $discussion * @return DropdownModule|string * @throws Exception */ function optionsList($discussion) { if (Gdn::session()->isValid() && !empty(Gdn::controller()->ShowOptions)) { include_once Gdn::controller()->fetchViewLocation('helper_functions', 'discussion', 'vanilla'); return getDiscussionOptionsDropdown($discussion); } return ''; }
/** * * * @param $discussion * @throws Exception */ public function sendOptions($discussion) { require_once $this->fetchViewLocation('helper_functions', 'Discussion'); $this->jsonTarget("#Discussion_{$discussion->DiscussionID} .OptionsMenu,.Section-Discussion .Discussion .OptionsMenu", getDiscussionOptionsDropdown($discussion)->toString(), 'ReplaceWith'); }
if (!defined('APPLICATION')) { exit; } $Session = Gdn::session(); if (!function_exists('WriteComment')) { include $this->fetchViewLocation('helper_functions', 'discussion'); } // Wrap the discussion related content in a div. echo '<div class="MessageList Discussion">'; // Write the page title. echo '<!-- Page Title --> <div id="Item_0" class="PageTitle">'; echo '<div class="Options">'; $this->fireEvent('BeforeDiscussionOptions'); WriteBookmarkLink(); echo getDiscussionOptionsDropdown(); WriteAdminCheck(); echo '</div>'; echo '<h1>' . $this->data('Discussion.Name') . '</h1>'; echo "</div>\n\n"; $this->fireEvent('AfterDiscussionTitle'); $this->fireEvent('AfterPageTitle'); // Write the initial discussion. if ($this->data('Page') == 1) { include $this->fetchViewLocation('discussion', 'discussion'); echo '</div>'; // close discussion wrap $this->fireEvent('AfterDiscussion'); } else { echo '</div>'; // close discussion wrap