public function Initialize() { parent::Initialize(); $this->AddCssFile('garden.css'); if ($this->Menu) { $this->Menu->HighlightRoute('/garden/settings'); } }
public function Initialize() { parent::Initialize(); $this->ShowOptions = TRUE; $this->Menu->HighlightRoute('/discussions'); $this->AddCssFile('vanilla.css'); $this->AddJsFile('/js/library/jquery.gardenmorepager.js'); }
public function initialize() { parent::initialize(); /** * The default Cache-Control header does not include no-store, which can cause issues with outdated category * information (e.g. counts). The same check is performed here as in Gdn_Controller before the Cache-Control * header is added, but this value includes the no-store specifier. */ if (Gdn::session()->isValid()) { $this->setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate'); } }
public function Initialize() { parent::Initialize(); $this->ShowOptions = TRUE; $this->Menu->HighlightRoute('/discussions'); $this->AddCssFile('vanilla.css'); $this->AddJsFile('bookmark.js'); $this->AddJsFile('discussions.js'); $this->AddJsFile('jquery.menu.js'); $this->AddJsFile('options.js'); $this->AddJsFile('jquery.gardenmorepager.js'); $this->FireEvent('AfterInitialize'); }
/** * Include CSS for all methods. * * Always called by dispatcher before controller's requested method. * * @since 2.0.0 * @access public */ public function Initialize() { parent::Initialize(); $this->AddCssFile('vanilla.css'); $this->AddModule('NewDiscussionModule'); }
public function __construct() { parent::__construct(); $this->CategoryModel = new CategoryModel(); }
public function Initialize() { parent::Initialize(); $this->Menu->HighlightRoute('/discussions'); }
public function Initialize() { parent::Initialize(); $this->AddCssFile('vanilla.css'); }
/** * Highlight route & add common JS definitions. * * Always called by dispatcher before controller's requested method. * * @since 2.0.0 * @access public */ public function initialize() { parent::initialize(); $this->addDefinition('ConfirmDeleteCommentHeading', t('ConfirmDeleteCommentHeading', 'Delete Comment')); $this->addDefinition('ConfirmDeleteCommentText', t('ConfirmDeleteCommentText', 'Are you sure you want to delete this comment?')); $this->Menu->highlightRoute('/discussions'); }
/** * Highlight route and include JS, CSS, and modules used by all methods. * * Always called by dispatcher before controller's requested method. * * @since 2.0.0 * @access public */ public function initialize() { parent::initialize(); $this->ShowOptions = true; $this->Menu->highlightRoute('/discussions'); $this->addJsFile('discussions.js'); // Inform moderator of checked comments in this discussion $CheckedDiscussions = Gdn::session()->getAttribute('CheckedDiscussions', array()); if (count($CheckedDiscussions) > 0) { ModerationController::InformCheckedDiscussions($this); } $this->CountCommentsPerPage = c('Vanilla.Comments.PerPage', 30); $this->fireEvent('AfterInitialize'); }
/** * Highlight route. * * Always called by dispatcher before controller's requested method. * * @since 2.0.0 * @access public */ public function Initialize() { parent::Initialize(); if ($this->Menu) { $this->Menu->HighlightRoute('/categories'); } }
/** * Include CSS for all methods. * * Always called by dispatcher before controller's requested method. * * @since 2.0.0 * @access public */ public function initialize() { parent::initialize(); $this->addModule('NewDiscussionModule'); $this->CssClass = 'NoPanel'; }
/** * {@inheritdoc} */ public function data($Path, $Default = '') { if (isset($this->Data[$Path])) { return $this->Data[$Path]; } switch ($Path) { case 'Categories': if ($this->categoriesCompatibilityCallback instanceof \Closure) { deprecated('Categories', 'CategoryTree'); $this->Data['Categories'] = $categories = call_user_func($this->categoriesCompatibilityCallback); return $categories; } return $Default; default: return parent::data($Path, $Default); } }
/** * Highlight route & add common JS definitions. * * Always called by dispatcher before controller's requested method. * * @since 2.0.0 * @access public */ public function Initialize() { parent::Initialize(); $this->AddDefinition('ImageResized', T('This image has been resized to fit in the page. Click to enlarge.')); $this->AddDefinition('ConfirmDeleteCommentHeading', T('ConfirmDeleteCommentHeading', 'Delete Comment')); $this->AddDefinition('ConfirmDeleteCommentText', T('ConfirmDeleteCommentText', 'Are you sure you want to delete this comment?')); $this->Menu->HighlightRoute('/discussions'); }
/** * Highlight route. * * Always called by dispatcher before controller's requested method. * * @since 2.0.0 * @access public */ public function Initialize() { parent::Initialize(); if ($this->Menu) { $this->Menu->HighlightRoute('/categories'); } $this->CountCommentsPerPage = C('Vanilla.Comments.PerPage', 30); }
public function Initialize() { parent::Initialize(); $this->AddModule('SignedInModule'); $this->Menu->HighlightRoute('/discussions'); }
/** * Highlight route. * * Always called by dispatcher before controller's requested method. * * @since 2.0.0 * @access public */ public function Initialize() { parent::Initialize(); $this->AddDefinition('ImageResized', T('This image has been resized to fit in the page. Click to enlarge.')); $this->Menu->HighlightRoute('/discussions'); }
/** * Highlight route. * * Always called by dispatcher before controller's requested method. * * @since 2.0.0 * @access public */ public function initialize() { parent::initialize(); if (!c('Vanilla.Categories.Use')) { redirect('/discussions'); } if ($this->Menu) { $this->Menu->highlightRoute('/categories'); } $this->CountCommentsPerPage = c('Vanilla.Comments.PerPage', 30); /** * The default Cache-Control header does not include no-store, which can cause issues with outdated category * information (e.g. counts). The same check is performed here as in Gdn_Controller before the Cache-Control * header is added, but this value includes the no-store specifier. */ if (Gdn::session()->isValid()) { $this->setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate'); } }
/** * Include CSS for all methods. * * Always called by dispatcher before controller's requested method. * * @since 2.0.0 * @access public */ public function initialize() { parent::initialize(); $this->CssClass = 'NoPanel'; }
/** * Highlight route. * * Always called by dispatcher before controller's requested method. * * @since 2.0.0 * @access public */ public function initialize() { parent::initialize(); if (!c('Vanilla.Categories.Use')) { redirect('/discussions'); } if ($this->Menu) { $this->Menu->highlightRoute('/categories'); } $this->CountCommentsPerPage = c('Vanilla.Comments.PerPage', 30); }
/** * Highlight route and include JS, CSS, and modules used by all methods. * * Always called by dispatcher before controller's requested method. * * @since 2.0.0 * @access public */ public function Initialize() { parent::Initialize(); $this->ShowOptions = TRUE; $this->Menu->HighlightRoute('/discussions'); $this->AddCssFile('vanilla.css'); $this->AddJsFile('discussions.js'); // Inform moderator of checked comments in this discussion $CheckedDiscussions = Gdn::Session()->GetAttribute('CheckedDiscussions', array()); if (count($CheckedDiscussions) > 0) { ModerationController::InformCheckedDiscussions($this); } $this->CountCommentsPerPage = C('Vanilla.Comments.PerPage', 30); $this->FireEvent('AfterInitialize'); }
/** * Include CSS for all methods. * * Always called by dispatcher before controller's requested method. * * @since 2.0.0 * @access public */ public function initialize() { parent::initialize(); $this->addModule('NewDiscussionModule'); }
public function Initialize() { parent::Initialize(); if ($this->Menu) { $this->Menu->HighlightRoute('/dashboard/settings'); } }
/** * Highlight route and include JS, CSS, and modules used by all methods. * * Always called by dispatcher before controller's requested method. * * @since 2.0.0 * @access public */ public function initialize() { parent::initialize(); $this->ShowOptions = true; $this->Menu->highlightRoute('/discussions'); $this->addJsFile('discussions.js'); // Inform moderator of checked comments in this discussion $CheckedDiscussions = Gdn::session()->getAttribute('CheckedDiscussions', array()); if (count($CheckedDiscussions) > 0) { ModerationController::InformCheckedDiscussions($this); } $this->CountCommentsPerPage = c('Vanilla.Comments.PerPage', 30); /** * The default Cache-Control header does not include no-store, which can cause issues (e.g. inaccurate unread * status or new comment counts) when users visit the discussion list via the browser's back button. The same * check is performed here as in Gdn_Controller before the Cache-Control header is added, but this value * includes the no-store specifier. */ if (Gdn::session()->isValid()) { $this->setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate'); } $this->fireEvent('AfterInitialize'); }
/** * Renders a voting form for a poll object * @param VanillaController $Sender controller object * @param stdClass $Poll poll object * @param boolean $Echo echo or return result string * @return mixed Will return string if $Echo is false, will return true otherwise */ protected function _RenderVotingForm($Sender, $Poll, $PartialAnswers, $Echo = TRUE) { $Sender->PollForm = new Gdn_Form(); $Sender->PollForm->AddHidden('DiscussionID', $Poll->DiscussionID); $Sender->PollForm->AddHidden('PollID', $Poll->PollID); if ($Sender->Data('DiscussionPollsMessage')) { $Sender->PollForm->AddError($Sender->Data('DiscussionPollsMessage')); } include_once $this->ThemeView('voting'); if ($Echo) { DiscussionPollAnswerForm($Sender->PollForm, $Poll, $PartialAnswers); return TRUE; } else { ob_start(); DiscussionPollAnswerForm($Sender->PollForm, $Poll, $PartialAnswers); $Result = ob_get_contents(); ob_end_clean(); return $Result; } }
/** * Highlight route and include JS, CSS, and modules used by all methods. * * Always called by dispatcher before controller's requested method. * * @since 2.0.0 * @access public */ public function Initialize() { parent::Initialize(); $this->ShowOptions = TRUE; $this->Menu->HighlightRoute('/discussions'); $this->AddCssFile('vanilla.css'); $this->AddJsFile('bookmark.js'); $this->AddJsFile('discussions.js'); $this->AddJsFile('options.js'); $this->AddJsFile('jquery.gardenmorepager.js'); // Inform moderator of checked comments in this discussion $CheckedDiscussions = Gdn::Session()->GetAttribute('CheckedDiscussions', array()); if (count($CheckedDiscussions) > 0) ModerationController::InformCheckedDiscussions($this); $this->FireEvent('AfterInitialize'); }