Esempio n. 1
0
 * @see joomla.google.php
 * @package Joomap
 */
// load Joomap language file
$LangPath = $GLOBALS['mosConfig_absolute_path'] . '/administrator/components/com_joomap/language/';
if (file_exists($LangPath . $GLOBALS['mosConfig_lang'] . '.php')) {
    require_once $LangPath . $GLOBALS['mosConfig_lang'] . '.php';
} else {
    require_once $LangPath . 'english.php';
}
require_once $GLOBALS['mosConfig_absolute_path'] . '/administrator/components/com_joomap/classes/JoomapConfig.php';
$config = new JoomapConfig();
$config->load();
require_once $GLOBALS['mosConfig_absolute_path'] . '/administrator/components/com_joomap/classes/JoomapPlugins.php';
JoomapPlugins::loadPlugins();
$joomap = new Joomap($config);
$tree = $joomap->generateTree();
//$joomap->printDebugTree( $tree );		// DEBUG output
$view = mosGetParam($_REQUEST, 'view', 'html');
switch ($view) {
    case 'google':
        // Google Sitemaps output
        require_once $GLOBALS['mosConfig_absolute_path'] . '/components/com_joomap/joomap.google.php';
        JoomapGoogle::printTree($joomap, $tree);
        break;
    default:
        // Html output
        global $mainframe;
        require_once $mainframe->getPath('front_html');
        $mainframe->addCustomHeadTag('<link rel="stylesheet" type="text/css" media="all" href="' . $GLOBALS['mosConfig_live_site'] . '/components/com_joomap/css/joomap.css" />');
        JoomapHtml::printTree($joomap, $tree);
Esempio n. 2
0
 * This is the Joomap component frontend entry-point.
 */
// load Joomap language file
$langPath = JPATH_COMPONENT_ADMINISTRATOR . DS . 'language' . DS;
$lang =& JFactory::getLanguage();
if (file_exists($langPath . $lang->getBackwardLang() . '.php')) {
    include_once $langPath . $lang->getBackwardLang() . '.php';
} else {
    include_once $langPath . 'english.php';
}
require_once JPATH_COMPONENT_ADMINISTRATOR . DS . 'classes' . DS . 'JoomapConfig.php';
$config = new JoomapConfig();
$config->load();
require_once JPATH_COMPONENT_ADMINISTRATOR . DS . 'classes' . DS . 'JoomapPlugins.php';
JoomapPlugins::loadPlugins();
$joomap = new Joomap($config);
$tree = $joomap->generateTree();
//$joomap->printDebugTree( $tree );		// DEBUG output
$view = JRequest::getVar('view', 'html', '', 'string');
switch ($view) {
    case 'google':
        // Google Sitemaps output
        require_once JPATH_COMPONENT_SITE . DS . 'joomap.google.php';
        $view = new JoomapGoogle();
        $view->printTree($joomap, $tree);
        break;
    default:
        // Html output
        global $mainframe;
        require_once $mainframe->getPath('front_html');
        $view = new JoomapHtml();