function display($tpl = null) { require_once JPATH_COMPONENT . '/helpers/jcomments.php'; $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $this->liveSmiliesPath = str_replace('\\', '/', JCommentsHelper::getSmiliesPath()); $filter_state = $this->state->get('filter.state'); // Filter by published state $filter_state_options = array(); $filter_state_options[] = JHTML::_('select.option', '1', JText::_('A_FILTER_STATE_PUBLISHED')); $filter_state_options[] = JHTML::_('select.option', '0', JText::_('A_FILTER_STATE_UNPUBLISHED')); JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html'); JHtml::_('jcomments.stylesheet'); if (version_compare(JVERSION, '3.0', 'ge')) { JHtml::_('bootstrap.tooltip'); JHtml::_('formbehavior.chosen', 'select'); JCommentsHelper::addSubmenu('smilies'); JHtmlSidebar::setAction('index.php?option=com_jcomments&view=smilies'); JHtmlSidebar::addFilter(JText::_('A_FILTER_STATE'), 'filter_state', JHtml::_('select.options', $filter_state_options, 'value', 'text', $filter_state, true)); $this->bootstrap = true; $this->sidebar = JHtmlSidebar::render(); } else { JCommentsHelper::addSubmenu('smilies'); array_unshift($filter_state_options, JHTML::_('select.option', '', JText::_('A_FILTER_STATE'))); $filter = JHTML::_('select.genericlist', $filter_state_options, 'filter_state', 'onchange="Joomla.submitform();"', 'value', 'text', $filter_state); $this->assignRef('filter', $filter); } $this->addToolbar(); // Include the component HTML helpers. JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html'); parent::display($tpl); }
function display($tpl = null) { require_once JPATH_COMPONENT . '/helpers/jcomments.php'; $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $filter_object_group = $this->state->get('filter.object_group'); $filter_language = $this->state->get('filter.language'); $filter_state = $this->state->get('filter.state'); // Filter by published state $filter_state_options = array(); $filter_state_options[] = JHTML::_('select.option', '1', JText::_('A_FILTER_STATE_PUBLISHED')); $filter_state_options[] = JHTML::_('select.option', '0', JText::_('A_FILTER_STATE_UNPUBLISHED')); $filter_state_options[] = JHTML::_('select.option', '2', JText::_('A_FILTER_STATE_REPORTED')); // Filter by component (object_group) $filter_object_group_options = array(); $object_groups = $this->get('FilterObjectGroups'); foreach ($object_groups as $object_group) { $filter_object_group_options[] = JHTML::_('select.option', $object_group->name, $object_group->name); } // Filter by language $filter_language_options = array(); $languages = $this->get('FilterLanguages'); foreach ($languages as $language) { $filter_language_options[] = JHTML::_('select.option', $language->name, $language->name); } JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html'); JHtml::_('jcomments.stylesheet'); if (version_compare(JVERSION, '3.0', 'ge')) { JHtml::_('bootstrap.tooltip'); JHtml::_('formbehavior.chosen', 'select'); JCommentsHelper::addSubmenu('comments'); JHtmlSidebar::setAction('index.php?option=com_jcomments&view=comments'); JHtmlSidebar::addFilter(JText::_('A_FILTER_STATE'), 'filter_state', JHtml::_('select.options', $filter_state_options, 'value', 'text', $filter_state, true)); if (count($filter_object_group_options)) { JHtmlSidebar::addFilter(JText::_('A_FILTER_COMPONENT'), 'filter_object_group', JHtml::_('select.options', $filter_object_group_options, 'value', 'text', $filter_object_group, true)); } if (count($filter_language_options)) { JHtmlSidebar::addFilter(JText::_('A_FILTER_LANGUAGE'), 'filter_language', JHtml::_('select.options', $filter_language_options, 'value', 'text', $filter_language, true)); } $this->bootstrap = true; $this->sidebar = JHtmlSidebar::render(); } else { JCommentsHelper::addSubmenu('comments'); $filter = ''; array_unshift($filter_state_options, JHTML::_('select.option', '', JText::_('A_FILTER_STATE'))); $filter .= JHTML::_('select.genericlist', $filter_state_options, 'filter_state', 'onchange="Joomla.submitform();"', 'value', 'text', $filter_state); if (count($filter_object_group_options)) { array_unshift($filter_object_group_options, JHTML::_('select.option', '', JText::_('A_FILTER_COMPONENT'))); $filter .= ' ' . JHTML::_('select.genericlist', $filter_object_group_options, 'filter_object_group', 'onchange="Joomla.submitform();"', 'value', 'text', $filter_object_group); } if (count($filter_language_options)) { array_unshift($filter_language_options, JHTML::_('select.option', '', JText::_('A_FILTER_LANGUAGE'))); $filter .= ' ' . JHTML::_('select.genericlist', $filter_language_options, 'filter_language', 'onchange="Joomla.submitform();"', 'value', 'text', $filter_language); } $this->assignRef('filter', $filter); } $this->addToolbar(); parent::display($tpl); }
function display($tpl = null) { require_once JPATH_COMPONENT . '/helpers/jcomments.php'; $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $filter_state = $this->state->get('filter.state'); // Filter by published state $filter_state_options = array(); $filter_state_options[] = JHTML::_('select.option', '1', JText::_('A_FILTER_STATE_PUBLISHED')); $filter_state_options[] = JHTML::_('select.option', '0', JText::_('A_FILTER_STATE_UNPUBLISHED')); JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html'); JHtml::_('jcomments.stylesheet'); // Use frontend template's stylesheet for icons $document = JFactory::getDocument(); $document->addStylesheet(JURI::root(true) . '/components/com_jcomments/tpl/default/style.css?v=3002', 'text/css', null); if (version_compare(JVERSION, '3.0', 'ge')) { JHtml::_('bootstrap.tooltip'); JHtml::_('formbehavior.chosen', 'select'); JCommentsHelper::addSubmenu('custombbcodes'); JHtmlSidebar::setAction('index.php?option=com_jcomments&view=custombbcodes'); JHtmlSidebar::addFilter(JText::_('A_FILTER_STATE'), 'filter_state', JHtml::_('select.options', $filter_state_options, 'value', 'text', $filter_state, true)); $this->bootstrap = true; $this->sidebar = JHtmlSidebar::render(); } else { JCommentsHelper::addSubmenu('custombbcodes'); array_unshift($filter_state_options, JHTML::_('select.option', '', JText::_('A_FILTER_STATE'))); $filter = JHTML::_('select.genericlist', $filter_state_options, 'filter_state', 'onchange="Joomla.submitform();"', 'value', 'text', $filter_state); $this->assignRef('filter', $filter); } $this->addToolbar(); // Include the component HTML helpers. JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html'); parent::display($tpl); }
public function modal($tpl = null) { $this->state = $this->get('State'); $this->importUrl = 'index.php?option=com_jcomments&task=import.ajax&tmpl=component'; $this->objectsUrl = str_replace('/administrator', '', JRoute::_('index.php?option=com_jcomments&task=refreshObjectsAjax&tmpl=component')); $this->hash = md5(JFactory::getApplication('administrator')->getCfg('secret')); JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html'); JHtml::_('jcomments.stylesheet'); JHtml::_('jcomments.jquery'); $document = JFactory::getDocument(); $document->addScript(JURI::root(true) . '/administrator/components/com_jcomments/assets/js/jcomments.progressbar.js'); $document->addScript(JURI::root(true) . '/administrator/components/com_jcomments/assets/js/jcomments.import.js'); $document->addScript(JURI::root(true) . '/administrator/components/com_jcomments/assets/js/jcomments.objects.js'); parent::display($tpl); }
function display($tpl = null) { if ($this->getLayout() == 'modal') { $this->url = str_replace('/administrator', '', JRoute::_('index.php?option=com_jcomments&task=refreshObjectsAjax&tmpl=component')); $this->hash = md5(JFactory::getApplication('administrator')->getCfg('secret')); JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html'); JHtml::_('jcomments.stylesheet'); JHtml::_('jcomments.jquery'); $document = JFactory::getDocument(); $document->addScript(JURI::root(true) . '/administrator/components/com_jcomments/assets/js/jcomments.progressbar.js'); $document->addScript(JURI::root(true) . '/administrator/components/com_jcomments/assets/js/jcomments.objects.js?v=5'); parent::display($tpl); return; } parent::display($tpl); }
function display($tpl = null) { require_once JPATH_COMPONENT . '/helpers/jcomments.php'; $this->item = $this->get('Item'); $this->form = $this->get('Form'); $this->groups = $this->get('UserGroups'); $this->permissionForms = $this->get('PermissionForms'); $this->state = $this->get('State'); $languages = $this->get('Languages'); $language_options = array(); if (count($languages)) { // $language_options[] = JHTML::_('select.option', '', JText::_('JALL_LANGUAGE')); foreach ($languages as $language) { $language_options[] = JHTML::_('select.option', $language->lang_code, $language->title); } } $language = $this->state->get('settings.language'); JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html'); JHtml::_('behavior.tooltip'); JHtml::_('behavior.formvalidation'); if (version_compare(JVERSION, '3.0', 'ge')) { JHtml::_('formbehavior.chosen', 'select:not(.jcommentscategories)'); JHtml::_('jcomments.stylesheet'); JCommentsHelper::addSubmenu('settings'); JHtmlSidebar::setAction('index.php?option=com_jcomments&view=settings'); if (count($languages)) { JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_LANGUAGE'), 'language', JHtml::_('select.options', $language_options, 'value', 'text', $language, true)); } $this->bootstrap = true; $this->sidebar = JHtmlSidebar::render(); } else { JHtml::_('jcomments.bootstrap'); JHtml::_('jcomments.stylesheet'); JCommentsHelper::addSubmenu('settings'); $filter = ''; if (count($languages)) { if (count($language_options)) { array_unshift($language_options, JHTML::_('select.option', '', JText::_('JOPTION_SELECT_LANGUAGE'))); $filter = JHTML::_('select.genericlist', $language_options, 'language', 'onchange="Joomla.submitform(\'settings-form\');"', 'value', 'text', $language); } } $this->assignRef('filter', $filter); } $this->addToolbar(); parent::display($tpl); }
function display($tpl = null) { $this->item = $this->get('Item'); $this->form = $this->get('Form'); $this->state = $this->get('State'); JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html'); JHtml::_('behavior.tooltip'); JHtml::_('behavior.formvalidation'); if (version_compare(JVERSION, '3.0', 'ge')) { JHtml::_('formbehavior.chosen', 'select'); $this->bootstrap = true; } else { JHtml::_('jcomments.bootstrap'); } JHtml::_('jcomments.stylesheet'); $this->addToolbar(); parent::display($tpl); }
function display($tpl = null) { require_once JPATH_COMPONENT . '/helpers/jcomments.php'; require_once JPATH_COMPONENT . '/version.php'; $this->version = new JCommentsVersion(); JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html'); JHtml::_('jcomments.stylesheet'); JHtml::_('behavior.framework'); if (version_compare(JVERSION, '3.0', 'ge')) { JCommentsHelper::addSubmenu('about'); $this->bootstrap = true; $this->sidebar = JHtmlSidebar::render(); } else { JCommentsHelper::addSubmenu('about'); } $this->addToolbar(); parent::display($tpl); }
function display($tpl = null) { require_once JPATH_COMPONENT . '/helpers/jcomments.php'; $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html'); JHtml::_('jcomments.stylesheet'); if (version_compare(JVERSION, '3.0', 'ge')) { JHtml::_('bootstrap.tooltip'); JHtml::_('formbehavior.chosen', 'select'); JCommentsHelper::addSubmenu('mailq'); $this->bootstrap = true; $this->sidebar = JHtmlSidebar::render(); } else { JCommentsHelper::addSubmenu('mailq'); } $this->addToolbar(); parent::display($tpl); }