function Joom_ShowCategoryHead() { $database =& JFactory::getDBO(); $user =& JFactory::getUser(); $database->setQuery(" SELECT\n name,\n cid\n FROM\n #__joomgallery_catg\n WHERE\n cid = '{$this->catid}'\n "); $this->catname = $database->loadResult(); //push catname into the ambit $joomambit = Joom_Ambit(); $joomambit->set('cattitle', $this->catname); $database->setQuery(" SELECT\n COUNT(*)\n FROM\n #__joomgallery AS a\n LEFT JOIN\n #__joomgallery_catg AS c ON c.cid=a.catid\n WHERE\n a.published = '1'\n AND a.catid = '{$this->catid}'\n AND a.approved = '1'\n AND c.access <= '" . $user->get('aid') . "'\n "); $this->count = $database->loadResult(); HTML_Joom_Category::Joom_ShowCategoryHead_HTML($this->catname, $config->jg_colnumb, $this->count, $this->catid, $this->order_by, $this->order_dir); }
JPluginHelper::importPlugin('joomgallery'); //add the css file generated from backend settings $document->addStyleSheet(_JOOM_LIVE_SITE . 'components/com_joomgallery/assets/css/joom_settings.css'); //add the main css file $document->addStyleSheet(_JOOM_LIVE_SITE . 'components/com_joomgallery/assets/css/joomgallery.css'); //add invidual css file if exists if (file_exists(JPATH_ROOT . DS . 'components' . DS . 'com_joomgallery' . DS . 'assets' . DS . 'css' . DS . 'joom_local.css')) { $document->addStyleSheet(_JOOM_LIVE_SITE . 'components/com_joomgallery/assets/css/joom_local.css'); } require_once JPATH_COMPONENT_ADMINISTRATOR . DS . 'joomgallery.class.php'; require_once JPATH_COMPONENT_ADMINISTRATOR . DS . 'common.joomgallery.php'; require_once JPATH_COMPONENT . DS . 'joomgallery.html.php'; //Konfiguration $config = Joom_getConfig(); //Ambit $ambit = Joom_Ambit(); //TODO globals global $id, $catid, $func; $func = trim(Joom_mosGetParam('func', '', 'post')); if ($func == '') { $func = trim(Joom_mosGetParam('func', '')); } $ambit->set('func', $func); $id = JRequest::getInt('id', 0); $catid = JRequest::getInt('catid', 0); $orig = JRequest::getInt('orig', 0); $ambit->set('id', $id); $ambit->set('catid', $catid); // Itemid $Itemid = JRequest::getInt('Itemid', ''); if ($Itemid == '') {
/** * At the moment just a wrapper function for JModuleHelper::getModules() * * @param string $pos position name * @return array An array of module objects */ function Joom_GetModules($pos) { $joomambit = Joom_Ambit(); $func = $joomambit->get('func', ''); $position = 'jg_' . $pos; $modules =& JModuleHelper::getModules($position); $views = array('' => 'gal', 'viewcategory' => 'cat', 'detail' => 'dtl', 'special' => 'spc', 'showfavourites' => 'fav', 'userpanel' => 'usp', 'showupload' => 'upl'); if (isset($views[$func])) { $position = $position . '_' . $views[$func]; $ind_mods =& JModuleHelper::getModules($position); $modules = array_merge($modules, $ind_mods); } if ($func != '') { $ind_mods =& JModuleHelper::getModules($position . '_' . $func); $modules = array_merge($modules, $ind_mods); } return $modules; }