Example #1
0
        JHTML::_('script', 'components/com_jbusinessdirectory/assets/js/jquery.min.js');
        JHTML::_('script', 'components/com_jbusinessdirectory/assets/js/jquery-noconflict.js');
        define('J_JQUERY_LOADED', 1);
    }
}
JHTML::_('script', 'components/com_jbusinessdirectory/assets/js/jquery.raty.min.js');
JHTML::_('script', 'components/com_jbusinessdirectory/assets/js/jquery.blockUI.js');
JHTML::_('script', 'components/com_jbusinessdirectory/assets/js/common.js');
JHTML::_('script', 'components/com_jbusinessdirectory/assets/js/utils.js');
if (!defined('COMPONENT_IMAGE_PATH')) {
    define("COMPONENT_IMAGE_PATH", JURI::base() . "components/" . JRequest::getVar('option') . "/assets/images/");
}
if (!defined('IMAGE_BASE_PATH')) {
    define('IMAGE_BASE_PATH', JURI::base() . "administrator/components/" . JBusinessUtil::getComponentName());
}
JBusinessUtil::loadClasses();
$document = JFactory::getDocument();
$document->addScriptDeclaration('
		var baseUrl="' . (JURI::base() . 'index.php?option=' . JBusinessUtil::getComponentName()) . '";
		var imageBaseUrl="' . (JURI::root() . PICTURES_PATH) . '";		
		');
$session = JFactory::getSession();
//setting menu item Id
$app = JFactory::getApplication();
$menu = $app->getMenu();
$activeMenu = $app->getMenu()->getActive();
$url = $_SERVER['REQUEST_URI'];
$urlParts = parse_url($url);
if (!empty($activeMenu) && $activeMenu != $menu->getDefault() || $urlParts["path"] == '/' && empty($urlParts["query"])) {
    $menuId = $activeMenu->id;
    $session->set('menuId', $menuId);