Exemple #1
0
    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);
        break;
}
/**
 * Generates a node-tree of all the Menus in Joomla!
 * This is the main class of the Joomap component.
 * @author Daniel Grothe
 * @access public
 */
Exemple #2
0
 /** Print a Google Sitemaps representation of tree */
 function printTree(&$joomap, &$root)
 {
     header('Content-type: text/xml;');
     echo '<?xml version="1.0" encoding="UTF-8"?>' . "\n";
     echo '<urlset xmlns="http://www.google.com/schemas/sitemap/0.84">' . "\n";
     $tmp = array();
     foreach ($root as $menu) {
         // concatenate all menu-trees
         foreach ($menu->tree as $node) {
             $tmp[] = $node;
         }
     }
     echo JoomapGoogle::getList($tmp);
     echo "</urlset>\n";
     die;
 }
Exemple #3
0
    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();
        $view->printTree($joomap, $tree);
        break;
}
/**
 * Generates a node-tree of all the Menus in Joomla!
 * This is the main class of the Joomap component.
 * @author Daniel Grothe
 * @access public