I like that the Research Log icon appeared
automatically in the toplinks when I installed that
module. A link to PunBB should act the same way.
Here's the code I put in my xenea/toplinks.html file,
right after the MyGedView icon block:
<?php
if (file_exists("modules/punbb.php")) {
global $PRIV_USER, $PRIV_PUBLIC;
if ($PRIV_USER>=getUserAccessLevel()) {
$menu = array();
$menu["label"] = "Discussion Forums";
$menu["labelpos"] = "down";
$menu["icon"] =
$PGV_IMAGE_DIR."/".$PGV_IMAGES["gedcom"]["large"];
$menu["link"] = "module.php?mod=punbb";
$menu["class"] = "menuitem";
$menu["hoverclass"] = "menuitem_hover";
print "<td valign=\"top\" width=\"10%\">";
print_menu($menu);
print "</td>\n";
}
}
?>
Cheers,
Andy
Logged In: YES
user_id=634811
Just a thought.
We want to be careful about adding module code in the core
code. If someone added a module for PHPBB tomorrow, would we
also add these to the menu? Would there be any way for a
module to "inject" its menu items?
We should probably start thinking about how tightly coupled
we want the core and addin modules.
I'm not saying we shouldn't implement this RFE, but rather
that we have a general idea about the architecture of such
requests.
Logged In: YES
user_id=781380
Maybe modules could have a standard file or function that
included information for a submenu entry. Then the core code
could just display one menu with all the add-ons/modules
automagically listed as submenus.
Just a thought...