$app = JFactory::getApplication(); if ($app->isSite()) { // get all published single category menu links $db->setQuery("SELECT id, link from #__menu WHERE link LIKE 'index.php?option=com_jdownloads&view=category%' AND published = 1"); $cat_link_itemidsPlg = $db->loadAssocList(); if ($cat_link_itemidsPlg) { for ($i = 0; $i < count($cat_link_itemidsPlg); $i++) { $cat_link_itemidsPlg[$i]['catid'] = substr(strrchr($cat_link_itemidsPlg[$i]['link'], '='), 1); } } // get current category menu ID when exist and all needed menu IDs for the header links global $menuItemids; $menuItemids = JDHelper::getMenuItemids(); // get all other menu category IDs so we can use it when we needs it global $cat_link_itemids; $cat_link_itemids = JDHelper::getAllJDCategoryMenuIDs(); // "Home" menu link itemid global $root_itemid; $root_itemid = $menuItemids['root']; global $date_format; $date_format = JDHelper::getDateFormat(); //Globals definition $GLOBALS['jDFPitemid'] = jd_CalcItemid(); $GLOBALS['jDFPOnlineLayout'] = ''; $GLOBALS['jlistConfigM'] = buildjlistConfigM(); $GLOBALS['jDownloadsMessage'] = 0; $GLOBALS['jDownloadsTested'] = 0; $GLOBALS['jDownloadsInstalled'] = 0; $GLOBALS['jDownloadsVersion'] = 0; $GLOBALS['jDFPconsiderrights'] = 1; $GLOBALS['jDFPv14'] = 0;