function display($tpl = null) { $document = JFactory::getDocument(); $user = JFactory::getUser(); $mainframe = JFactory::getApplication(); if (Komento::joomlaVersion() >= '1.6') { if (!$user->authorise('komento.manage.pendings', 'com_komento')) { $mainframe->redirect('index.php', JText::_('JERROR_ALERTNOAUTHOR'), 'error'); $mainframe->close(); } } $filter_component = $mainframe->getUserStateFromRequest('com_komento.pending.filter_component', 'filter_component', '*', 'string'); $search = $mainframe->getUserStateFromRequest('com_komento.pending.search', 'search', '', 'string'); $search = trim(JString::strtolower($search)); $order = $mainframe->getUserStateFromRequest('com_komento.pending.filter_order', 'filter_order', 'created', 'cmd'); $orderDirection = $mainframe->getUserStateFromRequest('com_komento.pending.filter_order_Dir', 'filter_order_Dir', 'DESC', 'word'); // Set Options $options['published'] = 2; $options['no_tree'] = 1; $options['no_child'] = 1; // Get data from the model $commentsModel = Komento::getModel('comments'); $comments = $commentsModel->getData($options); $pagination = $commentsModel->getPagination(); $this->assignRef('comments', $comments); $this->assignRef('pagination', $pagination); $this->assign('search', $search); $this->assign('order', $order); $this->assign('orderDirection', $orderDirection); $this->assign('component', $this->getComponentState($filter_component)); $this->assign('columns', Komento::getConfig('com_komento_pending_columns', false)); $this->assign('columnCount', 2); parent::display($tpl); }
function display($tpl = null) { $document = JFactory::getDocument(); $user = JFactory::getUser(); $mainframe = JFactory::getApplication(); $user = JFactory::getUser(); $mainframe = JFactory::getApplication(); if (Komento::joomlaVersion() >= '1.6') { if (!$user->authorise('komento.manage.subscribers', 'com_komento')) { $mainframe->redirect('index.php', JText::_('JERROR_ALERTNOAUTHOR'), 'error'); $mainframe->close(); } } $filter_component = $mainframe->getUserStateFromRequest('com_komento.subscribers.filter_component', 'filter_component', '*', 'string'); $order = $mainframe->getUserStateFromRequest('com_komento.subscribers.filter_order', 'filter_order', 'created', 'cmd'); $orderDirection = $mainframe->getUserStateFromRequest('com_komento.subscribers.filter_order_Dir', 'filter_order_Dir', 'DESC', 'word'); // Get data from the model $subscriptionModel = Komento::getModel('subscription'); $subscribers = $subscriptionModel->getData(); $pagination = $subscriptionModel->getPagination(); foreach ($subscribers as $subscriber) { $subscriber = self::process($subscriber); } $this->assignRef('subscribers', $subscribers); $this->assignRef('pagination', $pagination); $this->assign('order', $order); $this->assign('orderDirection', $orderDirection); $this->assign('component', $this->getComponentState($filter_component)); parent::display($tpl); }
public function form($tpl = null) { $user = JFactory::getUser(); $mainframe = JFactory::getApplication(); if (Komento::joomlaVersion() >= '1.6') { if (!$user->authorise('komento.manage.acl', 'com_komento')) { $mainframe->redirect('index.php', JText::_('JERROR_ALERTNOAUTHOR'), 'error'); $mainframe->close(); } } $component = JRequest::getString('component', ''); if ($component == '') { $mainframe->redirect('index.php?option=com_komento&view=acl'); } $components = $this->getComponentState($component); $id = $mainframe->getUserStateFromRequest('com_komento.acl.id', 'id', '0'); $type = JRequest::getCmd('type', 'usergroup'); $usergroups = ''; if ($type == 'usergroup') { $usergroups = $this->getUsergroupState($id); } $type = JRequest::getCmd('type'); $id = JRequest::getInt('id'); $model = Komento::getModel('acl', true); $model->updateUserGroups($component); $rulesets = $model->getData($component, $type, $id); $this->assignRef('rulesets', $rulesets); $this->assignRef('component', $component); $this->assignRef('components', $components); $this->assignRef('type', $type); $this->assignRef('id', $id); $this->assignRef('usergroups', $usergroups); parent::display($tpl); }
public function display($tpl = null) { // //Load pane behavior // jimport('joomla.html.pane'); // $slider = JPane::getInstance( 'sliders' ); //initialise variables $model = Komento::getModel('comments'); $comments = ''; $options = array('threaded' => 0, 'sort' => 'latest', 'limit' => 10); $comments = $model->getComments('all', 'all', $options); // Set Options $optionsPending['published'] = 2; $optionsPending['no_tree'] = 1; $optionsPending['no_child'] = 1; $pendings = $model->getData($optionsPending); foreach ($pendings as $pending) { $pending = Komento::getHelper('comment')->process($pending, 1); } foreach ($comments as $comment) { $comment = Komento::getHelper('comment')->process($comment, 1); } $document = JFactory::getDocument(); $user = JFactory::getUser(); $this->assignRef('slider', $slider); $this->assignRef('user', $user); $this->assignRef('document', $document); $this->assignRef('comments', $comments); $this->assignRef('pendings', $pendings); parent::display($tpl); }
function display($tpl = null) { $user = JFactory::getUser(); $mainframe = JFactory::getApplication(); if (Komento::joomlaVersion() >= '1.6') { if (!$user->authorise('komento.manage.migrators', 'com_komento')) { $mainframe->redirect('index.php', JText::_('JERROR_ALERTNOAUTHOR'), 'error'); $mainframe->close(); } } parent::display($tpl); }
public function display($tpl = null) { // //Load pane behavior // jimport('joomla.html.pane'); // $slider = JPane::getInstance( 'sliders' ); //initialise variables $document = JFactory::getDocument(); $user = JFactory::getUser(); $this->assignRef('slider', $slider); $this->assignRef('user', $user); $this->assignRef('document', $document); parent::display($tpl); }
function display($tpl = null) { $document = JFactory::getDocument(); $user = JFactory::getUser(); $mainframe = JFactory::getApplication(); if (Komento::joomlaVersion() >= '1.6') { if (!$user->authorise('komento.manage.comments', 'com_komento')) { $mainframe->redirect('index.php', JText::_('JERROR_ALERTNOAUTHOR'), 'error'); $mainframe->close(); } } $filter_publish = $mainframe->getUserStateFromRequest('com_komento.comments.filter_publish', 'filter_publish', '*', 'string'); $filter_component = $mainframe->getUserStateFromRequest('com_komento.comments.filter_component', 'filter_component', '*', 'string'); $search = $mainframe->getUserStateFromRequest('com_komento.comments.search', 'search', '', 'string'); $search = trim(JString::strtolower($search)); $order = $mainframe->getUserStateFromRequest('com_komento.comments.filter_order', 'filter_order', 'created', 'string'); $orderDirection = $mainframe->getUserStateFromRequest('com_komento.comments.filter_order_Dir', 'filter_order_Dir', 'DESC', 'word'); $nosearch = JRequest::getInt('nosearch', 0); $parentId = JRequest::getVar('parentid', 0); // Construct options $options['no_tree'] = 0; $options['no_search'] = $nosearch; $options['parent_id'] = $parentId; // Get data from the model $commentsModel = Komento::getModel('comments'); $comments = $commentsModel->getData($options); $pagination = $commentsModel->getPagination(); if ($search) { $parentId = 0; } $parent = ''; if ($parentId) { $parent = Komento::getTable('comments'); $parent->load($parentId); $parent = Komento::getHelper('comment')->process($parent, 1); } $this->assignRef('comments', $comments); $this->assignRef('pagination', $pagination); $this->assign('parent', $parent); $this->assign('parentid', $parentId); $this->assign('state', $this->getPublishState($filter_publish)); $this->assign('search', $search); $this->assign('order', $order); $this->assign('orderDirection', $orderDirection); $this->assign('component', $this->getComponentState($filter_component)); $this->assign('columns', Komento::getConfig('com_komento_comments_columns', false)); $this->assign('columnCount', 2); parent::display($tpl); }
public function display($tpl = null) { // This is necessary for tabbing. jimport('joomla.html.pane'); $user = JFactory::getUser(); $mainframe = JFactory::getApplication(); if (Komento::joomlaVersion() >= '1.6') { if (!$user->authorise('komento.manage.system', 'com_komento')) { $mainframe->redirect('index.php', JText::_('JERROR_ALERTNOAUTHOR'), 'error'); $mainframe->close(); } } $konfig = Komento::getKonfig(); $version = Komento::joomlaVersion(); $this->assignRef('konfig', $konfig); $this->assignRef('joomlaVersion', $version); parent::display($tpl); }
function display($tpl = null) { $document = JFactory::getDocument(); $user = JFactory::getUser(); $mainframe = JFactory::getApplication(); if (Komento::joomlaVersion() >= '1.6') { if (!$user->authorise('komento.manage.mailq', 'com_komento')) { $mainframe->redirect('index.php', JText::_('JERROR_ALERTNOAUTHOR'), 'error'); $mainframe->close(); } } // Get data from the model $model = Komento::getModel('Mailq', true); $pagination = $model->getPagination(); $items = $model->getItems(); $this->assignRef('items', $items); $this->assignRef('pagination', $pagination); parent::display($tpl); }
function display($tpl = null) { //initialise variables $document = JFactory::getDocument(); $user = JFactory::getUser(); $mainframe = JFactory::getApplication(); $components = array(); $result = Komento::getHelper('components')->getAvailableComponents(); if (Komento::joomlaVersion() >= '1.6') { if (!$user->authorise('komento.manage.comments', 'com_komento')) { $mainframe->redirect('index.php', JText::_('JERROR_ALERTNOAUTHOR'), 'error'); $mainframe->close(); } } //Load pane behavior jimport('joomla.html.pane'); $commentId = JRequest::getVar('commentid', ''); $comment = Komento::getTable('Comments'); $comment->load($commentId); $this->comment = $comment; // Set default values for new entries. if (empty($comment->created)) { Komento::import('helper', 'date'); $date = KomentoDateHelper::getDate(); $now = KomentoDateHelper::toFormat($date); $comment->created = $now; $comment->published = true; } // Set all non published comments to unpublished if ($comment->published != 1) { $comment->published = 0; } // @task: Translate each component with human readable name. foreach ($result as $item) { $components[] = JHTML::_('select.option', $item, Komento::loadApplication($item)->getComponentName()); } $this->assignRef('comment', $comment); $this->assignRef('components', $components); parent::display($tpl); }
public function display($tpl = null) { $user = JFactory::getUser(); $mainframe = JFactory::getApplication(); if (Komento::joomlaVersion() >= '1.6') { if (!$user->authorise('komento.manage.integrations', 'com_komento')) { $mainframe->redirect('index.php', JText::_('JERROR_ALERTNOAUTHOR'), 'error'); $mainframe->close(); } } // This is necessary for tabbing. jimport('joomla.html.pane'); $app = JFactory::getApplication(); // $component = $app->getUserStateFromRequest( 'com_komento.integrations.component' , 'component' , 'com_content' ); $component = JRequest::getString('component', ''); if ($component == '') { $components = Komento::getHelper('components')->getAvailableComponents(); $this->assignRef('components', $components); parent::display('component'); } else { self::$extension = $component; $config = Komento::getConfig($component); $componentObj = Komento::loadApplication($component); $version = Komento::joomlaVersion(); // Get a list of components $components = array(); $result = Komento::getHelper('components')->getAvailableComponents(); // @task: Translate each component with human readable name. foreach ($result as $item) { $components[$item] = Komento::loadApplication($item)->getComponentName(); } $this->assignRef('config', $config); $this->assignRef('joomlaVersion', $version); $this->assignRef('component', $component); $this->assignRef('components', $components); $this->assignRef('componentObj', $componentObj); parent::display($tpl); } }