public function display() { $portal = $this->getModel()->getItem(); header('X-Portal-ID: ' . $portal->id); $doc =& JFactory::getDocument(); if ($portal->title) { $doc->setTitle($portal->title); } if ($portal->meta_keywords) { $doc->setMetaData('Keywords', $portal->meta_keywords); } if ($portal->meta_description) { $doc->setMetaData('Description', $portal->meta_description); } //TODO: Check if itemId $pathway = JFactory::getApplication()->getPathway(); if (!JApplication::getInstance('site')->getMenu()->getItems('link', 'index.php?option=com_portals&view=portal&id=' . $portal->id, true)) { $category = $this->getService('com://site/portals.model.categories')->id($portal->portals_category_id)->getItem(); if ($category->id) { $item = JApplication::getInstance('site')->getMenu()->getItems('link', 'index.php?option=com_portals&view=category&id=' . $category->id, true); if ($item) { $i = 0; foreach (explode('/', $item->route) as $part) { $pathway->addItem(ucfirst($part), 'index.php?Itemid=' . $item->tree[$i]); $i++; } } $pathway->addItem($portal->title); } } return parent::display(); }
public function display() { $user = JFactory::getUser(); $this->assign('user', $user); $this->assign('agent', $user->gid > 18); return parent::display(); }
public function display() { $this->parameters = $this->getParameters(); KFactory::get('joomla:document')->setTitle($this->parameters->get('page_title')); return parent::display(); }
public function display() { $this->assign('sitebase', trim(JURI::root(), '/')); $this->assign('token', JUtility::getToken()); $this->assign('container', $this->getModel()->getState()->container); return parent::display(); }
public function display() { $user = JFactory::getUser(); $businesses = $this->getService('com://admin/businesses.model.businesses')->created_by($user->id)->getList(); $this->assign('businesses', $businesses); return parent::display(); }
/** * Return the views output * * This function will auto assign the model data to the view if the auto_assign * property is set to TRUE. * * @return string The output of the view */ public function display() { $params = KFactory::get('joomla:application')->getParams(); $this->assign('params', $params); return parent::display(); }
public function display() { $profiler = KFactory::get('com://admin/debug.profiler.events'); $database = KFactory::get('com://admin/debug.profiler.queries'); $language = KFactory::get('joomla:language'); //Remove the template includes $includes = get_included_files(); foreach($includes as $key => $value) { if($value == 'tmpl://koowa.template.stack') { unset($includes[$key]); } } $this->assign('memory' , $profiler->getMemory()) ->assign('events' , $profiler->getEvents()) ->assign('queries' , $database->getQueries()) ->assign('languages', $language->getPaths()) ->assign('includes' , $includes) ->assign('strings' , $language->getOrphans()); return parent::display(); }
public function display() { $targets = KFactory::tmp('site::com.stream.model.targets')->getList()->getData(); $thing = reset($targets); $string = substr($thing['title'], 3); $option = strtolower(substr($string, 0, stripos($string, 'controller'))); $view = strtolower(substr($string, stripos($string, 'controller') + 10)); $model = KInflector::pluralize($view); $list = KFactory::tmp('site::com.' . $option . '.model.' . $model)->getList()->getData(); $array = array(); foreach ($list as $item) { $array[] = $item['id']; } //Get the list of posts $activities = KFactory::get($this->getModel())->set('parent_target_id', KRequest::get('get.parent_target_id', 'int'))->getList(); $myactivities = array(); foreach (@$activities as $activity) { if (!in_array($activity->parent_target_id, $array)) { continue; } else { $myactivities[] = $activity; } } $this->assign('myactivities', $myactivities); $this->assign('pagination', KFactory::get($this->getModel())->getState()->pagination); return parent::display(); }
/** * @return mixed */ public function display() { $menu = JFactory::getApplication()->getMenu(); $lang = JFactory::getLanguage(); $category = $this->getModel()->getItem(); $category->layout = end(explode(':', $category->layout)); $this->setLayout($category->layout ? $category->layout : 'default'); header('X-Category-ID: ' . $category->id); $doc =& JFactory::getDocument(); if ($category->title) { $doc->setTitle($category->title); } if ($category->meta_keywords) { $doc->setMetaData('Keywords', $category->meta_keywords); } if ($category->meta_description) { $doc->setMetaData('Description', $category->meta_description); } if ($menu->getActive() == $menu->getDefault($lang->getTag()) || !$menu->getActive()) { $pathway = JFactory::getApplication()->getPathway(); if (!JApplication::getInstance('site')->getMenu()->getItems('link', 'index.php?option=com_makundi&view=category&id=' . $category->id, true)) { foreach ($category->getAncestors(array('level' => 1)) as $ancestor) { $item = JApplication::getInstance('site')->getMenu()->getItems('link', 'index.php?option=com_makundi&view=category&id=' . $ancestor->id, true); if ($item) { $i = 0; foreach (explode('/', $item->route) as $part) { $pathway->addItem(ucfirst($part), 'index.php?Itemid=' . $item->tree[$i]); $i++; } } else { if (!JSite::getMenu()->getActive()->id) { $pathway->addItem($ancestor->title, JRoute::_('index.php?option=com_makundi&view=category&parent_slug_path=' . $ancestor->parent_slug_path . '&slug=' . $ancestor->slug)); } } } $pathway->addItem($category->title); } } $descendants = array(); $descendants[] = $category->id; $config = new KConfig(); if ($params = $menu->getActive()->params) { $config->append($params->toArray()); } if ($config->show_subcategories) { $descendants = array_merge($descendants, $category->getDescendants(array('level' => 1))->getColumn('id')); } $config->append(array('show_description' => 1, 'show_articles' => 1)); // TODO: Set the limit default limit inside $category so we can make this more flexable. $limit = $this->getModel()->getState()->limit; if (!$limit) { $this->getModel()->getState()->limit = $config->limit; } else { $this->getModel()->getState()->limit = 4; } $this->assign('params', $config); $this->assign('parent', $this->getModel()->getItem()->getParent()); $this->assign('descendants', $descendants); return parent::display(); }
public function display() { $state = $this->getModel()->getState(); $folders = KFactory::get('com://admin/files.controller.folder') ->container($state->container) ->tree(true) ->browse(); $this->assign('folders', $folders); $config = KFactory::get('com://admin/files.model.configs')->getItem(); // prepare an extensions array for fancyupload $extensions = $config->upload_extensions; $this->assign('allowed_extensions', $extensions); $this->assign('maxsize' , $config->upload_maxsize); $this->assign('path' , $state->container->relative_path); $this->assign('sitebase' , ltrim(JURI::root(true), '/')); $this->assign('token' , JUtility::getToken()); $this->assign('session' , JFactory::getSession()); if (!$this->editor) { $this->assign('editor', ''); } return parent::display(); }
public function display() { $modules = KFactory::get('com://admin/extensions.model.modules')->position('cpanel')->application('administrator')->enabled(1)->getList(); $this->assign('modules', $modules); return parent::display(); }
public function display() { if ($this->getLayout() == 'default') { $model = $this->getService($this->getModel()->getIdentifier()); $this->assign('packages', $model->distinct(true)->column('package')->getList()); } return parent::display(); }
public function display() { $group = $this->getModel()->getState()->group; $this->groups = $this->getService('com://admin/cache.model.groups')->getList(); $this->size = !empty($group) ? $this->groups->find($group)->size : $this->groups->size; $this->count = !empty($group) ? $this->groups->find($group)->count : $this->groups->count; return parent::display(); }
public function display() { $category = $this->getModel()->getItem(); $portals = $this->getService('com://site/portals.model.portals')->portals_category_id($category->id)->getList(); $this->assign('category', $category); $this->assign('portals', $portals); return parent::display(); }
public function display() { $state = KFactory::get($this->getModel())->getState(); $this->assign('target_type', $state->target_type); $this->assign('target_id', $state->target_id); $this->assign('return', $state->return); echo parent::display(); }
public function display() { $app = JFactory::getApplication(); $params = $app->getParams(); $this->assign('params', $params); $this->assign('title', $params->get('page_title') ? $params->get('page_title') : JFactory::getDocument()->getTitle()); return parent::display(); }
public function display() { $title = JText::_('Login'); JFactory::getApplication()->getPathway()->addItem($title); JFactory::getDocument()->setTitle($title); $this->parameters = $this->getParameters(); return parent::display(); }
public function display() { $plugin = $this->getModel()->getItem(); //If both the folder and element is specified, we may load the language file if (isset($plugin->type, $plugin->name)) { JFactory::getLanguage()->load('plg_' . $plugin->type . '_' . $plugin->name, JPATH_ADMINISTRATOR); } return parent::display(); }
public function display() { $name = $this->getName(); //Append enable and disbale button for all the list views if ($name != 'dashboard' && KInflector::isPlural($name) && KRequest::type() != 'AJAX') { KFactory::get('admin::com.error.toolbar.' . $name)->append('divider')->append('enable')->append('disable'); } return parent::display(); }
public function display() { $this->assign('sitebase', trim(JURI::root(), '/')); $this->assign('token', JUtility::getToken()); if (!$this->editor) { $this->assign('editor', ''); } return parent::display(); }
public function display() { $module = $this->getModel()->getItem(); if ($module->application == 'site') { JFactory::getLanguage()->load($module->type, JPATH_SITE); } else { JFactory::getLanguage()->load($module->type); } return parent::display(); }
public function display() { $settings = $this->getModel()->getList(); foreach ($settings as $setting) { if ($setting->getType() == 'component' && $setting->getPath()) { JFactory::getLanguage()->load('com_' . $setting->getName(), JPATH_ADMINISTRATOR); } } return parent::display(); }
public function display() { $state = KFactory::get($this->getModel())->getState(); $this->assign('target_type', $state->target_type); $this->assign('target_id', $state->target_id); $this->assign('return', $state->return); if (!KFactory::get('lib.joomla.user')->guest) { echo parent::display(); } }
public function display() { $state = $this->getModel()->getState(); $menu = JFactory::getApplication()->getMenu()->getActive(); $params = $this->getService('com://site/fileman.parameter.default', array('params' => $menu->params)); if ($params->limit != -1) { $state->limit = (int) $params->limit; } $state->sort = $params->sort; $state->direction = $params->direction; $state_data = $state->getData(); $state_data['container'] = 'fileman-files'; $state_data['folder'] = isset($state_data['folder']) ? rawurldecode($state_data['folder']) : ''; if ($this->getLayout() === 'gallery') { $state_data['types'] = array('image'); } $copy = $state_data; $copy['name'] = $state_data['folder']; unset($copy['folder']); $folder = $this->getService('com://admin/files.controller.folder', array('request' => array('folder' => $state->folder, 'name' => $state->name)))->read(); $folders = array(); if ($params->show_folders) { $folders = $this->getService('com://admin/files.controller.folder', array('request' => $state_data))->browse(); } $state_data['thumbnails'] = !!$params->show_thumbnails; $file_controller = $this->getService('com://admin/files.controller.file', array('request' => $state_data)); $files = $file_controller->browse(); $total = $file_controller->getModel()->getTotal(); foreach ($folders as $f) { if ($params->humanize_filenames) { $f->display_name = ucfirst(preg_replace('#[-_\\s\\.]+#i', ' ', $f->name)); } else { $f->display_name = $f->name; } } foreach ($files as $f) { if ($params->humanize_filenames) { $f->display_name = ucfirst(preg_replace('#[-_\\s\\.]+#i', ' ', $f->filename)); } else { $f->display_name = $f->name; } } $parent = null; if ($menu->query['folder'] !== $folder->path) { $path = explode('/', $folder->path); $parent = count($path) > 1 ? implode('/', array_slice($path, 0, count($path) - 1)) : ''; } $params->page_title = $params->page_title ? $params->page_title : (isset($menu->name) ? $menu->name : $menu->title); if (JFactory::getUser()->guest) { $params->allow_uploads = false; } $this->assign('folder', $folder)->assign('files', $files)->assign('total', $total)->assign('folders', $folders)->assign('parent', $parent)->assign('params', $params)->assign('menu', $menu)->assign('thumbnail_size', array('x' => 200, 'y' => 150)); $this->setPathway(); return parent::display(); }
public function display() { // Fetch the items only when layout is default if ($this->getLayout() == 'default') { // Get through getService so we're getting a new instance of the model. $model = $this->getService($this->getModel()->getIdentifier()); $this->assign('packages', $model->distinct(true)->column('package')->getList()); $this->assign('actions', $model->distinct(true)->column('action')->getList()); } return parent::display(); }
public function display() { $app = JFactory::getApplication(); $menu = $app->getMenu(); $depends_on = implode(' ', $this->getModel()->getList()->getColumn('id')); header('X-Article-IDs: ' . $depends_on); if ($menu->getDefault() != $menu->getActive()) { $this->assign('menu', $menu->getActive()); } return parent::display(); }
public function display() { $title = JText::_('Login'); KFactory::get('joomla:application')->getPathway()->addItem($title); KFactory::get('joomla:document')->setTitle($title); $this->parameters = $this->getParameters(); return parent::display(); }
public function display() { $controller = $this->getService('com://admin/files.controller.file'); $view = $controller->getView(); $view->setLayout('com://admin/fileman.view.files.tmpl.app.default'); $view->getTemplate()->addFilter('com://admin/fileman.template.filter.overrider'); $state = $this->getModel()->getState(); $html = $controller->limit($state->limit)->offset($state->offset)->container('fileman-files')->config(array('router' => array('defaults' => (object) array('option' => 'com_fileman', 'routed' => '1'))))->display(); $this->assign('app', $html); return parent::display(); }
public function display() { $state = $this->getModel()->getState(); if (empty($state->limit)) { $state->limit = JFactory::getApplication()->getCfg('list_limit'); } $this->assign('sitebase', trim(JURI::root(), '/')); $this->assign('token', version_compare(JVERSION, '3.0', 'ge') ? JSession::getFormToken() : JUtility::getToken()); $this->assign('container', $this->getModel()->getState()->container); return parent::display(); }
public function display() { $name = $this->getName(); $toolbar = KFactory::get($this->getToolbar()); $toolbar->setTitle('Jedi: ' . KInflector::humanize($this->getName())); //Apend enable and disbale button for all the list views if (KInflector::isPlural($name)) { $toolbar->append('divider')->append('enable')->append('disable'); } return parent::display(); }