function __construct()
 {
     $this->view = $this->getName();
     $this->layout = $this->getLayout();
     $this->link = 'index.php?option=com_fileuploadform&view=' . $this->view . ($this->layout != 'default' ? '&layout=' . $this->layout : '');
     parent::__construct();
 }
Example #2
0
 public function __construct($config = array())
 {
     $name = isset($config['name']) ? $config['name'] : $this->getName();
     $this->document = JFactory::getDocument();
     $this->document->setBase('');
     $this->profiler = KunenaProfiler::instance('Kunena');
     $this->app = JFactory::getApplication();
     $this->me = KunenaUserHelper::getMyself();
     $this->config = KunenaFactory::getConfig();
     $this->ktemplate = KunenaFactory::getTemplate();
     // Set the default template search path
     if ($this->app->isSite() && !isset($config['template_path'])) {
         $config['template_path'] = $this->ktemplate->getTemplatePaths("html/{$name}", true);
     }
     if ($this->app->isAdmin()) {
         $templateAdmin = KunenaFactory::getAdminTemplate();
         $templateAdmin->initialize();
         $config['template_path'] = $templateAdmin->getTemplatePaths($name);
     }
     parent::__construct($config);
     if ($this->app->isSite()) {
         // Add another template file lookup path specific to the current template
         $fallback = JPATH_THEMES . "/{$this->app->getTemplate()}/html/com_kunena/{$this->ktemplate->name}/{$this->getName()}";
         $this->addTemplatePath($fallback);
     }
     // Use our own browser side cache settings.
     JResponse::allowCache(false);
     JResponse::setHeader('Expires', 'Mon, 1 Jan 2001 00:00:00 GMT', true);
     JResponse::setHeader('Last-Modified', gmdate("D, d M Y H:i:s") . ' GMT', true);
     JResponse::setHeader('Cache-Control', 'no-store, must-revalidate, post-check=0, pre-check=0', true);
 }
 function __construct()
 {
     JViewLegacy::__construct();
     $this->smarty=new BidsSmarty();
     JHtml::_('behavior.mootools');
     JHTML::script(JUri::root().'components/'.APP_EXTENSION.'/js/auctions.js');
 }
Example #4
0
 function __construct($config = null)
 {
     parent::__construct($config);
     jimport('joomla.filesystem.file');
     if (JevJoomlaVersion::isCompatible("3.0")) {
         JEVHelper::stylesheet('eventsadmin.css', 'components/' . JEV_COM_COMPONENT . '/assets/css/');
     } else {
         JEVHelper::stylesheet('eventsadminjq.css', 'components/' . JEV_COM_COMPONENT . '/assets/css/');
     }
     $this->_addPath('template', $this->_basePath . '/' . 'views' . '/' . 'abstract' . '/' . 'tmpl');
     // note that the name config variable is ignored in the parent construct!
     if (JevJoomlaVersion::isCompatible("2.5")) {
         // Ok getTemplate doesn't seem to get the active menu item's template, so lets do it ourselves if it exists
         $app = JFactory::getApplication();
         // Get current template style ID
         $page_template_id = $app->isAdmin() ? "0" : @$app->getMenu()->getActive()->template_style_id;
         // Check it's a valid style with simple check
         if (!($page_template_id == "" || $page_template_id == "0")) {
             // Load the valid style:
             $db = JFactory::getDbo();
             $query = $db->getQuery(true)->select('template')->from('#__template_styles')->where('id =' . $db->quote($page_template_id) . '');
             $db->setQuery($query);
             $template = $db->loadResult();
         } else {
             $template = JFactory::getApplication()->getTemplate();
         }
         $theme = JEV_CommonFunctions::getJEventsViewName();
         $name = $this->getName();
         $name = str_replace($theme . "/", "", $name);
         $this->addTemplatePath(JPATH_BASE . '/' . 'templates' . '/' . $template . '/' . 'html' . '/' . JEV_COM_COMPONENT . '/' . $theme . '/' . $name);
         // or could have used
         //$this->addTemplatePath( JPATH_BASE.'/'.'templates'.'/'.JFactory::getApplication()->getTemplate().'/'.'html'.'/'.JEV_COM_COMPONENT.'/'.$config['name'] );
     }
 }
Example #5
0
 function __construct($config = array())
 {
     $this->item = new stdClass();
     $this->media = JModelLegacy::getInstance('Media', 'TZ_PortfolioModel');
     $this->extraFields = JModelLegacy::getInstance('ExtraFields', 'TZ_PortfolioModel', array('ignore_request' => true));
     parent::__construct($config);
 }
Example #6
0
 /**
  * Constructor
  *
  * @param   array  $config  Configuration array
  *
  * @since   1.5
  */
 public function __construct($config = null)
 {
     $app = JFactory::getApplication();
     parent::__construct($config);
     $this->_addPath('template', $this->_basePath . '/views/default/tmpl');
     $this->_addPath('template', JPATH_THEMES . '/' . $app->getTemplate() . '/html/com_installer/default');
 }
Example #7
0
 public function __construct($config)
 {
     parent::__construct($config);
     $this->app = JFactory::getApplication();
     $this->option = $this->app->input->get("option");
     $this->layoutsBasePath = JPath::clean(JPATH_COMPONENT_ADMINISTRATOR . DIRECTORY_SEPARATOR . "layouts");
 }
Example #8
0
 /**
  * Constructor
  *
  * @access  protected
  * @return  void
  * @since   1.5.5
  */
 function __construct($config = array())
 {
     parent::__construct($config);
     $this->_ambit = JoomAmbit::getInstance();
     $this->_config = JoomConfig::getInstance();
     $this->_mainframe = JFactory::getApplication('administrator');
     $this->_user = JFactory::getUser();
     $this->_doc = JFactory::getDocument();
     $this->_doc->addStyleSheet($this->_ambit->getStyleSheet('admin.joomgallery.css'));
     JHtmlBehavior::framework();
     $this->_doc->addScript($this->_ambit->getScript('admin.js'));
     JoomHelper::addSubmenu();
     JHTML::addIncludePath(JPATH_COMPONENT . '/helpers/html');
     // Check for available updates
     if (!($checked = $this->_mainframe->getUserState('joom.update.checked'))) {
         $controller = JRequest::getCmd('controller');
         if ($this->_config->get('jg_checkupdate') && $controller && $controller != 'control') {
             $dated_extensions = JoomExtensions::checkUpdate();
             if (count($dated_extensions)) {
                 $this->_mainframe->enqueueMessage(JText::_('COM_JOOMGALLERY_ADMENU_SYSTEM_NOT_UPTODATE'), 'warning');
                 $this->_mainframe->setUserState('joom.update.checked', -1);
             } else {
                 $this->_mainframe->setUserState('joom.update.checked', 1);
             }
         }
     } else {
         if ($checked == -1) {
             $controller = JRequest::getCmd('controller');
             if ($controller && $controller != 'control') {
                 $this->_mainframe->enqueueMessage(JText::_('COM_JOOMGALLERY_ADMENU_SYSTEM_NOT_UPTODATE'), 'warning');
             }
         }
     }
 }
	public function __construct() {
		if(!php_Boot::$skip_constructor) {
		$config = null;
		$config = Array("[\"name\":\"Joomlahaxe\"]");
		parent::__construct($config);
		defined('_JEXEC') or die("no joomla here");
	}}
Example #10
0
 function __construct()
 {
     parent::__construct();
     // Load the database and execute our sql file
     $this->db = JFactory::getDBO();
     // Get information of our plugin so we can pass it on to MDS Collivery for Logs
     $sel_query = "SELECT * FROM `#__extensions` where type = 'plugin' and element = 'mds_shipping' and folder = 'vmshipment';";
     $this->db->setQuery($sel_query);
     $this->db->query();
     $this->extension_id = $this->db->loadObjectList()[0]->extension_id;
     $this->app_name = $this->db->loadObjectList()[0]->extension_id;
     $this->app_info = json_decode($this->db->loadObjectList()[0]->manifest_cache);
     // Get our login information
     $config_query = "SELECT * FROM `#__mds_collivery_config` where id = 1;";
     $this->db->setQuery($config_query);
     $this->db->query();
     $this->password = $this->db->loadObjectList()[0]->password;
     $this->username = $this->db->loadObjectList()[0]->username;
     $this->risk_cover = $this->db->loadObjectList()[0]->risk_cover;
     $version = new JVersion();
     require_once preg_replace('|com_installer|i', "", JPATH_COMPONENT_ADMINISTRATOR) . '/helpers/config.php';
     $config = array('app_name' => $this->app_info->name, 'app_version' => $this->app_info->version, 'app_host' => "Joomla: " . $version->getShortVersion() . ' - Virtuemart: ' . VmConfig::getInstalledVersion(), 'app_url' => JURI::base(), 'user_email' => $this->username, 'user_password' => $this->password);
     // Use the MDS API Files
     require_once JPATH_PLUGINS . '/vmshipment/mds_shipping/Mds/Cache.php';
     require_once JPATH_PLUGINS . '/vmshipment/mds_shipping/Mds/Collivery.php';
     $this->collivery = new Mds\Collivery($config);
     // Get some information from the API
     $this->towns = $this->collivery->getTowns();
     $this->services = $this->collivery->getServices();
     $this->location_types = $this->collivery->getLocationTypes();
     $this->suburbs = $this->collivery->getSuburbs(null);
 }
Example #11
0
 /**
  * Constructor
  *
  * @param   array  $config  @see JViewLegacy
  *
  */
 public function __construct($config = array())
 {
     // Parent constructor
     parent::__construct($config);
     // Load the helpers
     require_once JPATH_ADMINISTRATOR . '/components/com_k2/helpers/html.php';
 }
Example #12
0
 function __construct()
 {
     //vishal - for j3.2 changes
     $app = JFactory::getApplication();
     $option = $app->input->get('option', '', 'STRING');
     $this->set('option', $option);
     parent::__construct();
 }
Example #13
0
 public function __construct($config = array())
 {
     $mainframe = JFactory::getApplication();
     $jinput = $mainframe->input;
     $this->my = CFactory::getUser();
     parent::__construct($config);
     $view = $jinput->request->get('view', '');
     $this->set('assets', CAssets::getInstance());
 }
Example #14
0
 public function __construct($config = array())
 {
     // Load the AddEvent-form in JForm for the template to use
     $this->form =& JForm::getInstance('addEventForm', JPATH_COMPONENT . DIRECTORY_SEPARATOR . 'models' . DIRECTORY_SEPARATOR . 'addeventform.xml');
     $jinput = JFactory::getApplication()->input;
     $this->form->setFieldAttribute('category', 'parentid', $jinput->get('category', 0, 'INT'), 'addEventFields');
     $this->form->setFieldAttribute('category', 'categorydepth', $jinput->get('categorydepth', 2, 'INT'), 'addEventFields');
     parent::__construct($config);
 }
Example #15
0
 public function __construct($config = array())
 {
     parent::__construct($config);
     $this->_addPath('template', JPATH_COMPONENT . '/themes/default/views/query');
     $theme = DJCatalog2ThemeHelper::getThemeName();
     if ($theme && $theme != 'default') {
         $this->_addPath('template', JPATH_COMPONENT . '/themes/' . $theme . '/views/query');
     }
 }
Example #16
0
 public function __construct($config = array())
 {
     global $ext_name_com, $ext_name, $ext_prefix;
     $this->ext_name_com = $ext_name_com;
     $this->ext_prefix = $ext_prefix;
     $this->ext_name = $ext_name;
     $config['base_path'] = JPATH_ROOT . DS . 'components' . DS . $this->ext_name_com;
     parent::__construct($config);
     JDispatcher::getInstance()->trigger('onBeforeView' . strtoupper($this->ext_prefix) . $this->getName(), array(&$this));
 }
Example #17
0
 public function __construct($options = null)
 {
     $v = JRequest::getWord('variant', 'list');
     if (in_array($v, self::$variants_ok)) {
         $this->variant = $v;
     }
     $this->merge = JRequest::getBool('prevent_duplicate_titles', true);
     parent::__construct($options);
     $this->params = JFactory::getApplication()->getParams();
 }
Example #18
0
 public function __construct($config = array())
 {
     parent::__construct($config);
     $this->app = JFactory::getApplication();
     $document = JFactory::getDocument();
     $document->addScript('components/com_jotcache/assets/jotcache.js?ver=5.2.1');
     $document->addStyleSheet('components/com_jotcache/assets/jotcache.css?ver=5.2.1');
     $user = JFactory::getUser();
     $this->canManage = $user->authorise('core.manage', 'com_jotcache') && $user->authorise('jotcache.manage', 'com_jotcache');
 }
Example #19
0
 public function __construct($config = array())
 {
     parent::__construct($config);
     $this->_addPath('template', JPATH_COMPONENT . '/themes/default/views/points');
     $par = JComponentHelper::getParams('com_djclassifieds');
     $theme = $par->get('theme', 'default');
     if ($theme && $theme != 'default') {
         $this->_addPath('template', JPATH_COMPONENT . '/themes/' . $theme . '/views/points');
     }
 }
Example #20
0
 public function __construct($config = array())
 {
     // Parent constructor
     parent::__construct($config);
     // Get application
     $application = JFactory::getApplication();
     // Set print variable
     $this->print = $application->input->getBool('print');
     // Load helpers
     $this->loadHelper('utilities');
     // Set the params
     $this->params = $application->getParams('com_k2');
     // Set the user
     $this->user = JFactory::getUser();
     // Get document
     $document = JFactory::getDocument();
     // Set view type
     $this->type = $document->getType();
     // Add template paths
     $template = $application->getTemplate();
     $this->addTemplatePath(JPATH_SITE . '/components/com_k2/templates/default');
     $this->addTemplatePath(JPATH_SITE . '/templates/' . $template . '/html/com_k2/templates/default');
     $this->addTemplatePath(JPATH_SITE . '/templates/' . $template . '/html/com_k2/default');
     if ($theme = $this->params->get('theme')) {
         $this->addTemplatePath(JPATH_SITE . '/components/com_k2/templates/' . $theme);
         $this->addTemplatePath(JPATH_SITE . '/templates/' . $template . '/html/com_k2/templates/' . $theme);
         $this->addTemplatePath(JPATH_SITE . '/templates/' . $template . '/html/com_k2/' . $theme);
     }
     // Set active (determine if the current menu Itemid is the same of the current view)
     $this->setActive();
     // Set page metadata and options correctly since Joomla! does not take care of it
     if ($this->isActive && $this->type == 'html') {
         // Get menu
         $menu = $application->getMenu();
         // Get active
         $active = $menu->getActive();
         // Set page heading
         $this->params->def('page_heading', $this->params->get('page_title', $active->title));
         // Set browser title
         $this->setTitle($this->params->get('page_title'));
         // Set meta description
         if ($this->params->get('menu-meta_description')) {
             $document->setDescription($this->params->get('menu-meta_description'));
         }
         // Set meta keywords
         if ($this->params->get('menu-meta_keywords')) {
             $document->setMetadata('keywords', $this->params->get('menu-meta_keywords'));
         }
         // Set robots
         if ($this->params->get('robots')) {
             $document->setMetadata('robots', $this->params->get('robots'));
         }
     }
 }
Example #21
0
 public function __construct($config = array())
 {
     $app = JFactory::getApplication();
     if (isset($config['reviews_variables'])) {
         $this->_view_variables = $config['reviews_variables'];
         foreach ($this->_view_variables as $key => $var) {
             $app->input->set('djreviews_' . $key, $var);
         }
     }
     return parent::__construct($config);
 }
Example #22
0
 /**
  * Constructor
  *
  * @param   array $config A named configuration array for object construction.
  *
  */
 public function __construct($config = array())
 {
     $this->app = JArrayHelper::getValue($config, 'app', JFactory::getApplication());
     $this->user = JArrayHelper::getValue($config, 'user', JFactory::getUser());
     $this->package = $this->app->getUserState('com_fabrik.package', 'fabrik');
     $this->session = JArrayHelper::getValue($config, 'session', JFactory::getSession());
     $this->doc = JArrayHelper::getValue($config, 'doc', JFactory::getDocument());
     $this->db = JArrayHelper::getValue($config, 'db', JFactory::getDbo());
     $this->config = JArrayHelper::getValue($config, 'config', JFactory::getConfig());
     parent::__construct($config);
 }
Example #23
0
 public function __construct($config = array())
 {
     parent::__construct($config = array());
     global $ext_name_com, $ext_prefix;
     $this->ext_name_com = $ext_name_com;
     $this->ext_prefix = $ext_prefix;
     $dispatcher = JDispatcher::getInstance();
     $dispatcher->trigger('onBeforeViewAdmin' . strtoupper($this->ext_prefix) . $this->getName(), array(&$this));
     $this->path = KSPath::getInstance();
     $this->params = JComponentHelper::getParams($this->ext_name_com);
     $this->document = JFactory::getDocument();
 }
Example #24
0
 /**
  * Constructor
  */
 public function __construct($config = array())
 {
     // init view
     $this->search = CHClient::getSearch();
     // params
     $this->params = JComponentHelper::getParams('com_chclient');
     $app_params = JFactory::getApplication()->getParams();
     $this->params->merge($app_params);
     // init data
     $this->data = (object) [];
     // parent construct
     parent::__construct($config);
 }
Example #25
0
 /**
  * The constructor of this class
  *
  * @param array $config
  */
 public function __construct($config = array())
 {
     // initialize the cache if this did not happen before
     if (self::$templateCache == null) {
         self::$templateCache = array();
     }
     if (array_key_exists('site_template', $config)) {
         $this->_site_template = $config['site_template'];
     } else {
         $this->_site_template = null;
     }
     parent::__construct($config);
 }
Example #26
0
 public function __construct($config)
 {
     parent::__construct($config);
     // Чтение username из таблицы User
     $user = JFactory::getUser();
     $this->username = $user->get('id');
     $this->user = $user->get('username');
     if ($this->username == null) {
         $this->username = 0;
     }
     ## only for test
     //$this->username = test;
 }
Example #27
0
 /**
  * Constructor
  *
  * @return  void
  * @since   1.5.5
  */
 public function __construct($config = array())
 {
     parent::__construct($config);
     $this->_ambit = JoomAmbit::getInstance();
     $this->_config = JoomConfig::getInstance();
     $this->_mainframe = JFactory::getApplication('site');
     $this->_user = JFactory::getUser();
     $this->_doc = JFactory::getDocument();
     JHtml::addIncludePath(JPATH_COMPONENT_ADMINISTRATOR . '/helpers/html');
     // If we are just displaying an image we don't need anything else
     if (JRequest::getCmd('format') == 'raw' || JRequest::getCmd('format') == 'jpg' || JRequest::getCmd('format') == 'json' || JRequest::getCmd('format') == 'feed') {
         return;
     }
     // Add the CSS file generated from backend settings
     $this->_doc->addStyleSheet($this->_ambit->getStyleSheet($this->_config->getStyleSheetName()));
     // Add the main CSS file
     $this->_doc->addStyleSheet($this->_ambit->getStyleSheet('joomgallery.css'));
     // Add the RTL CSS file if an RTL language is used
     if (JFactory::getLanguage()->isRTL()) {
         $this->_doc->addStyleSheet($this->_ambit->getStyleSheet('joomgallery_rtl.css'));
     }
     // Add individual CSS file if it exists
     if (file_exists(JPATH_ROOT . '/media/joomgallery/css/joom_local.css')) {
         $this->_doc->addStyleSheet($this->_ambit->getStyleSheet('joom_local.css'));
     }
     $pngbehaviour = "  <!-- Do not edit IE conditional style below -->" . "\n" . "  <!--[if lte IE 6]>" . "\n" . "  <style type=\"text/css\">\n" . "    .pngfile {\n" . "      behavior:url('" . JURI::root() . "media/joomgallery/js/pngbehavior.htc') !important;\n" . "    }\n" . "  </style>\n" . "  <![endif]-->" . "\n" . "  <!-- End Conditional Style -->";
     $this->_doc->addCustomTag($pngbehaviour);
     // Set documents meta data taken from menu entry definition
     $params = $this->_mainframe->getParams();
     if ($params->get('menu-meta_description')) {
         $this->_doc->setDescription($params->get('menu-meta_description'));
     }
     if ($params->get('menu-meta_keywords')) {
         $this->_doc->setMetadata('keywords', $params->get('menu-meta_keywords'));
     }
     if ($params->get('robots')) {
         $this->_doc->setMetadata('robots', $params->get('robots'));
     }
     // Page title
     $pagetitle = JoomHelper::addSitenameToPagetitle($this->_doc->getTitle());
     $this->_doc->setTitle($pagetitle);
     // Check for alternative layout only if this is not the active menu item
     $active = $this->_mainframe->getMenu()->getActive();
     if (!$active || strpos($active->link, 'view=' . $this->getName()) === false) {
         // Get the default layout from the configuration
         if ($layout = $this->_config->get('jg_alternative_layout')) {
             $this->setLayout($layout);
         }
     }
 }
Example #28
0
 public function __construct()
 {
     $this->config = EB::getConfig();
     $this->jconfig = JFactory::getConfig();
     $this->app = JFactory::getApplication();
     $this->doc = JFactory::getDocument();
     $this->my = JFactory::getUser();
     $this->input = EB::request();
     $this->info = EB::info();
     $this->theme = EB::getTemplate(null, array('view' => $this, 'admin' => true));
     if ($this->doc->getType() == 'ajax') {
         $this->ajax = EB::ajax();
     }
     parent::__construct();
 }
 function __construct($config = null)
 {
     parent::__construct($config);
     jimport('joomla.filesystem.file');
     if (JevJoomlaVersion::isCompatible("3.0")) {
         JEVHelper::stylesheet('eventsadmin.css', 'components/' . JEV_COM_COMPONENT . '/assets/css/');
     } else {
         JEVHelper::stylesheet('eventsadmin16.css', 'components/' . JEV_COM_COMPONENT . '/assets/css/');
     }
     $this->_addPath('template', $this->_basePath . '/' . 'views' . '/' . 'abstract' . '/' . 'tmpl');
     // note that the name config variable is ignored in the parent construct!
     if (JevJoomlaVersion::isCompatible("2.5")) {
         $theme = JEV_CommonFunctions::getJEventsViewName();
         $this->addTemplatePath(JPATH_BASE . '/' . 'templates' . '/' . JFactory::getApplication()->getTemplate() . '/' . 'html' . '/' . JEV_COM_COMPONENT . '/' . $theme . '/' . $this->getName());
         // or could have used
         //$this->addTemplatePath( JPATH_BASE.'/'.'templates'.'/'.JFactory::getApplication()->getTemplate().'/'.'html'.'/'.JEV_COM_COMPONENT.'/'.$config['name'] );
     }
 }
Example #30
0
 public function __construct($config = array())
 {
     parent::__construct($config);
     $app = JFactory::getApplication();
     $theme = DJCatalog2ThemeHelper::getThemeName();
     // Items view fallback
     $this->_addPath('template', JPATH_COMPONENT . '/views/items/tmpl');
     $this->_addPath('template', JPATH_THEMES . '/' . $app->getTemplate() . '/html/com_djcatalog2/items');
     $this->_addPath('template', JPATH_COMPONENT . '/themes/default/views/items');
     if ($theme && $theme != 'default') {
         $this->_addPath('template', JPATH_COMPONENT . '/themes/' . $theme . '/views/items');
     }
     $this->_addPath('template', JPATH_COMPONENT . '/views/archived/tmpl');
     $this->_addPath('template', JPATH_THEMES . '/' . $app->getTemplate() . '/html/com_djcatalog2/archived');
     $this->_addPath('template', JPATH_COMPONENT . '/themes/default/views/archived');
     if ($theme && $theme != 'default') {
         $this->_addPath('template', JPATH_COMPONENT . '/themes/' . $theme . '/views/archived');
     }
 }