This is modified joomap plugin to work in Joomla 1.5 with legacy mode disabled. Just save it as \administrator\components\com_joomap\plugins\joomap.plugin.php
Code:
<?php defined('_JEXEC') or die('Direct Access to this location is not allowed.');
// timeframe is (int)0 to 9999, years of threads to show.
// 0=show no threads. Max. 2 recommended.
define("timeFrame", 2);
$tmp = new Joomap_kunena;
JoomapPlugins::addPlugin($tmp);
class Joomap_kunena{
function isOfType( &$joomla, &$parent ){
if( (strpos($parent->link, 'option=com_kunena')) && !(strpos($parent->link, 'func=showcat'))) return true;
return false;
}
function &getTree( &$joomap, &$parent ) {
$database =& JFactory::getDBO();
$list = array();
$query = "SELECT id as cat_id, name as cat_title, ordering
FROM #__fb_categories WHERE parent>0 AND published!=0
AND parent IN (SELECT id FROM #__fb_categories
WHERE published!=0) ORDER BY name";
$database->setQuery($query);
$cats = $database->loadObjectList();
foreach($cats as $cat) {
$node = new stdclass;
$node->id = $parent->id;
$node->name = $cat->cat_title;
$node->link = $parent->link.'&func=showcat&catid='.$cat->cat_id;
$node->tree = array();
$list[$cat->cat_id] = $node;
}
$t=(int)constant("timeFrame");
$querymsg = "SELECT id as forum_id, catid as cat_id, subject as forum_name,
`time` as modified FROM #__fb_messages
WHERE parent=0 AND moved=0 AND hold=0
AND DATEDIFF( CURDATE( ), FROM_UNIXTIME(`time`)) <=(365*'{$t}')
ORDER BY subject";
$database->setQuery($querymsg);
$forums = $database->loadObjectList();
foreach($forums as $forum){
if( !isset($list[$forum->cat_id]) ) continue;
$node = new stdclass;
$node->id = $parent->id;
$node->name = $forum->forum_name;
$node->modified = intval($forum->modified);
$node->link = $parent->link.'&func=view&id='
.$forum->forum_id.'&catid='.$forum->cat_id;
$list[$forum->cat_id]->tree[] = $node;
}
return $list;
}
}
?>