/** * Setup the Toolbar. */ protected function _setToolbar() { $state = $this->get('State'); $canDo = CommentsHelper::getActions($state->get('filter.category_id')); JToolBarHelper::title(JText::_('Comments_Manager_Threads'), 'plugin'); JToolBarHelper::deleteList('', 'threads.delete'); if ($canDo->get('core.admin')) { JToolBarHelper::preferences('com_comments'); } JToolBarHelper::help('screen.comments'); }
/** * Setup the Toolbar. */ protected function _setToolbar() { $state = $this->get('State'); $canDo = CommentsHelper::getActions($state->get('filter.category_id')); JToolBarHelper::title('Comments: ' . JText::_('COMMENTS_MODERATE_COMMENTS_TITLE'), 'logo'); $toolbar = JToolBar::getInstance('toolbar'); $toolbar->appendButton('Standard', 'save', 'COMMENTS_MODERATE', 'comment.moderate', false, false); if ($canDo->get('core.admin')) { JToolBarHelper::preferences('com_comments'); } JToolBarHelper::help('screen.comments'); }
/** * Method to display a view. */ public function display() { require_once JPATH_COMPONENT . '/helpers/comments.php'; // Get the document object. $document = JFactory::getDocument(); // Set the default view name and format from the Request. $vName = JRequest::getWord('view', 'comments'); $vFormat = $document->getType(); $lName = JRequest::getWord('layout', 'default'); // Get and render the view. if ($view =& $this->getView($vName, $vFormat)) { // Get the model for the view. $model =& $this->getModel($vName); // Push the model into the view (as default). $view->setModel($model, true); $view->setLayout($lName); // Push document object into the view. $view->assignRef('document', $document); $view->display(); // Load the submenu. CommentsHelper::addSubmenu($vName); } }
/** * Просмотр поста с комментариями * * @access protected * @return void */ protected function view() { parent::view(); if ($this->getData()->isEmpty()) { throw new SystemException('ERR_404', SystemException::ERR_404); } //показываем комментарии if ($comments = CommentsHelper::createInsatceFor($this->getTableName(), true)) { $comments->createAndAddField($this->getDataDescription(), $this->getData(), $this->getData()->getFieldByName('post_id')->getData()); } }
?> </button> <button onclick="document.getElementById('search').value='';document.getElementById('published').value='0';this.form.submit();"><?php echo JText::_('COMMENTS_SEARCH_RESET'); ?> </button> </div> <div class="form-filter" style="float: right;"> <select name="filter_context" id="filter_context" class="inputbox" onchange="this.form.submit()"> <option value=""><?php echo JText::_('Comments_All_Contexts'); ?> </option> <?php echo JHtml::_('select.options', CommentsHelper::getContextOptions(), 'value', 'text', $this->state->get('filter.context')); ?> </select> </div> <table class="adminlist" style="clear: both;"> <thead> <tr> <th width="20"> <input type="checkbox" name="toggle" value="" onclick="checkAll(this,'cid')" /> </th> <th> <?php echo JHTML::_('grid.sort', 'Comments_Url_Heading', 'a.name', $lDirection, $lOrdering); ?> </th>
public function downvoteActionUrl($options = array()) { return CommentsHelper::downvoteAction($this, $options); }