I got an answer on the #geeklog by tokyoahead. I added this code to CUSTOM_menuEntries in lib-custom.php:
Text Formatted Code
$sql = "SELECT * FROM ".$_TABLES['topics'].COM_getPermSQL(); # get all allowed topics
if ($_CONF['sortmethod']=='alpha') { # sort topics according to config.php setting
$sql.=' ORDER BY topic ASC;';
} else {
$sql.=' ORDER BY sortnum;';
}
$result = DB_query($sql);
for($i=0; $i<DB_numRows($result); $i++) # start looping through topics
{
$B = DB_fetchArray($result, true); # get contents of Topic
$myentries[] = array ('url' => $_CONF['site_url'].'/?topic='.$B[0], # link
'label' => $B[1]);
}
and don't forget to add $_TABLES to the global section. I based to solution on the code on http://tokyoahead.com of the "Topic Overview & Menu Static page"-plugin.