コード例 #1
0
ファイル: _ckhikashopcategory.php プロジェクト: esorone/efcpw
 protected function getOptions()
 {
     // if the component is not installed
     if (!JFolder::exists(JPATH_ROOT . '/administrator/components/com_hikashop') or !JFile::exists(JPATH_ROOT . '/modules/mod_slideshowck/helper_hikashop.php')) {
         // add the root item
         $option = new stdClass();
         $option->text = JText::_('MOD_SLIDESHOWCKHIKASHOP_HIKASHOP_NOTFOUND');
         $option->value = '0';
         $options[] = $option;
         // Merge any additional options in the XML definition.
         $options = array_merge(parent::getOptions(), $options);
         return $options;
     }
     // get the categories form the helper
     $params = new JRegistry();
     require_once JPATH_ROOT . '/modules/mod_maximenuck/helper_hikashop.php';
     $cats = modMaximenuckhikashopHelper::getItems($params);
     // add the root item
     $option = new stdClass();
     $option->text = JText::_('MOD_SLIDESHOWCKHIKASHOP_HIKASHOP_ROOTNODE');
     $option->value = '0';
     $options[] = $option;
     foreach ($cats as $cat) {
         $option = new stdClass();
         $option->text = str_repeat(" - ", $cat->level - 1) . $cat->name;
         $option->value = $cat->id;
         $options[] = $option;
     }
     // Merge any additional options in the XML definition.
     $options = array_merge(parent::getOptions(), $options);
     return $options;
 }
コード例 #2
0
	break;
	case 'virtuemart':
		// Include the syndicate functions only once
		if (JFile::exists(dirname(__FILE__).'/helper_virtuemart.php')) {
			require_once dirname(__FILE__).'/helper_virtuemart.php';
			$items	= modMaximenuckvirtuemartHelper::getItems($params);
		} else {
			echo '<p style="color:red;font-weight:bold;">File helper_virtuemart.php not found ! Please download the patch for Maximenu - Virtuemart on <a href="http://www.joomlack.fr">http://www.joomlack.fr</a></p>';
			return false;
		}
	break;
        case 'hikashop':
		// Include the syndicate functions only once
		if (JFile::exists(dirname(__FILE__).'/helper_hikashop.php')) {
			require_once dirname(__FILE__).'/helper_hikashop.php';
			$items	= modMaximenuckhikashopHelper::getItems($params);
		} else {
			echo '<p style="color:red;font-weight:bold;">File helper_hikashop.php not found ! Please download the patch for Maximenu - Hikashop on <a href="http://www.joomlack.fr">http://www.joomlack.fr</a></p>';
			return false;
		}
	break;
endswitch;

// if no item in the menu then exit
if (!count($items) OR !$items) return false;

		
$document = JFactory::getDocument();
$app	= JFactory::getApplication();
$menu	= $app->getMenu();
$active	= $menu->getActive();