jimport('joomla.application.component.controller'); $app = JFactory::getApplication(); $task = $app->input->get('task'); $view = $app->input->get('view'); $permission = JUDirectoryHelper::checkGroupPermission($task, $view); if (!$permission) { return JError::raiseError(403, JText::_('JLIB_APPLICATION_ERROR_ACCESS_FORBIDDEN')); } if (!JFactory::getUser()->authorise('core.manage', 'com_judirectory')) { return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR')); } $document = JFactory::getDocument(); $isJoomla3x = JUDirectoryHelper::isJoomla3x(); if ($isJoomla3x) { $document->addStyleSheet(JUri::root(true) . '/administrator/components/com_judirectory/assets/css/styles.css'); } else { $document->addStyleSheet(JUri::root(true) . '/administrator/components/com_judirectory/assets/css/styles.j25.css'); $document->addStyleSheet(JUri::root(true) . '/administrator/components/com_judirectory/assets/css/jicomoon.css'); } JUDirectoryFrontHelper::loadjQuery(); JUDirectoryFrontHelper::loadBootstrap(); $document->addScript(JUri::root() . "components/com_judirectory/assets/js/jquery.dragsort.min.js"); if ($isJoomla3x && $view == 'subscriptions') { $document->addScript(JUri::base() . "components/com_judirectory/models/forms/subscriptions.js"); } if ($isJoomla3x && $view == 'collections') { $document->addScript(JUri::base() . "components/com_judirectory/models/forms/collections.js"); } $controller = JControllerLegacy::getInstance('JUDirectory'); $controller->execute($app->input->get('task')); $controller->redirect();
*/ // No direct access to this file defined('_JEXEC') or die('Restricted access'); require_once "template_helper.php"; $app = JFactory::getApplication(); $document = JFactory::getDocument(); // Name of current template that component using //$this->template // Name of this template $self_template = basename(dirname(__FILE__)); $templateStyle = JUDirectoryFrontHelperTemplate::getCurrentTemplateStyle(); $templateParams = $templateStyle->params; //Load font awesome icon $document->addStyleSheet(JUri::root(true) . '/components/com_judirectory/assets/css/font-awesome.min.css'); JUDirectoryFrontHelper::loadjQuery(); JUDirectoryFrontHelper::loadBootstrap(3, $templateParams->get('load_bootstrap', '2')); $JUDIRTemplateDefaultHelper = new JUDIRTemplateDefaultHelper($self_template); $document->addStyleSheet(JUri::root(true) . "/components/com_judirectory/assets/css/reset.css"); $document->addStyleSheet(JUri::root(true) . "/components/com_judirectory/assets/css/core.css"); $document->addStyleSheet(JUri::root(true) . "/components/com_judirectory/templates/" . $self_template . "/assets/css/common.css"); // JText in core.js JText::script('COM_JUDIRECTORY_ARE_YOU_SURE_YOU_WANT_TO_DELETE_THESE_LISTINGS'); JText::script('COM_JUDIRECTORY_ARE_YOU_SURE_YOU_WANT_TO_PUBLISH_THESE_LISTINGS'); JText::script('COM_JUDIRECTORY_ARE_YOU_SURE_YOU_WANT_TO_UNPUBLISH_THESE_LISTINGS'); $view = $this->getName(); switch ($view) { case 'advsearch': if ($app->input->getInt('advancedsearch', 0) || !is_null($app->input->get('limitstart'))) { // Load primary stylesheet $document->addStyleSheet(JUri::root(true) . "/components/com_judirectory/templates/" . $self_template . "/assets/css/view.listing-list.css"); // Load primary javascript