public function display($cachable = false, $urlparams = array()) { $model = $this->getModel('item'); $format = JRequest::getWord('format', 'html'); $document = JFactory::getDocument(); $viewType = $document->getType(); $view = $this->getView('itemlist', $viewType); $view->setModel($model); $user = JFactory::getUser(); if ($user->guest) { $cache = true; } else { $cache = false; } if (K2_JVERSION != '15') { $urlparams['limit'] = 'UINT'; $urlparams['limitstart'] = 'UINT'; $urlparams['id'] = 'INT'; $urlparams['tag'] = 'STRING'; $urlparams['searchword'] = 'STRING'; $urlparams['day'] = 'INT'; $urlparams['year'] = 'INT'; $urlparams['month'] = 'INT'; $urlparams['print'] = 'INT'; $urlparams['lang'] = 'CMD'; $urlparams['Itemid'] = 'INT'; } parent::display($cache, $urlparams); }
public function display($cachable = false, $urlparams = array()) { JRequest::setVar('view', 'extrafieldsgroups'); $model = $this->getModel('extraFields'); $view = $this->getView('extrafieldsgroups', 'html'); $view->setModel($model, true); parent::display(); }
public function display($cachable = false, $urlparams = array()) { if (K2_JVERSION != '15') { $mainframe = JFactory::getApplication(); $mainframe->redirect('index.php?option=com_config&view=component&component=com_k2&path=&tmpl=component'); } else { JRequest::setVar('tmpl', 'component'); parent::display(); } }
public function display($cachable = false, $urlparams = array()) { $model = $this->getModel('itemlist'); $document = JFactory::getDocument(); $viewType = $document->getType(); $view = $this->getView('item', $viewType); $view->setModel($model); JRequest::setVar('view', 'item'); $user = JFactory::getUser(); if ($user->guest) { $cache = true; } else { $cache = true; JTable::addIncludePath(JPATH_COMPONENT_ADMINISTRATOR . DS . 'tables'); $row = JTable::getInstance('K2Item', 'Table'); $row->load(JRequest::getInt('id')); if (K2HelperPermissions::canEditItem($row->created_by, $row->catid)) { $cache = false; } $params = K2HelperUtilities::getParams('com_k2'); if ($row->created_by == $user->id && $params->get('inlineCommentsModeration')) { $cache = false; } if ($row->access > 0) { $cache = false; } $category = JTable::getInstance('K2Category', 'Table'); $category->load($row->catid); if ($category->access > 0) { $cache = false; } if ($params->get('comments') && $document->getType() == 'html') { $itemListModel = K2Model::getInstance('Itemlist', 'K2Model'); $profile = $itemListModel->getUserProfile($user->id); $script = "\n\$K2(document).ready(function() {\n\$K2('#userName').val('" . $view->escape($user->name) . "').attr('disabled', 'disabled');\n\$K2('#commentEmail').val('" . $user->email . "').attr('disabled', 'disabled');"; if (is_object($profile) && $profile->url) { $script .= " \$K2('#commentURL').val('" . htmlspecialchars($profile->url, ENT_QUOTES, 'UTF-8') . "').attr('disabled', 'disabled');"; } $script .= " });"; $document->addScriptDeclaration($script); } } if (K2_JVERSION != '15') { $urlparams['id'] = 'INT'; $urlparams['print'] = 'INT'; $urlparams['lang'] = 'CMD'; $urlparams['Itemid'] = 'INT'; } parent::display($cache, $urlparams); }
public function display($cachable = false, $urlparams = array()) { $view = $this->getView('latest', 'html'); $model = $this->getModel('itemlist'); $view->setModel($model); $itemModel = $this->getModel('item'); $view->setModel($itemModel); $user = JFactory::getUser(); if ($user->guest) { $cache = true; } else { $cache = false; } parent::display($cache); }
public function display($cachable = false, $urlparams = array()) { $model = $this->getModel('item'); $format = JRequest::getWord('format', 'html'); $document = JFactory::getDocument(); $viewType = $document->getType(); $view = $this->getView('itemlist', $viewType); $view->setModel($model); $user = JFactory::getUser(); if ($user->guest) { $cache = true; } else { $cache = false; } parent::display($cache); }
public function display($cachable = false, $urlparams = array()) { JRequest::setVar('view', 'usergroups'); parent::display(); }
public function display($cachable = false, $urlparams = array()) { JRequest::setVar('view', 'extrafield'); parent::display(); }
public function display($cachable = false, $urlparams = array()) { require_once JPATH_SITE . DS . 'components' . DS . 'com_k2' . DS . 'helpers' . DS . 'route.php'; JRequest::setVar('view', 'comments'); parent::display(); }
function element() { JRequest::setVar('view', 'users'); JRequest::setVar('layout', 'element'); parent::display(); }