the only difference in my themes is this:
old (manually added elements):
Text Formatted Code
<td width='100%' height='20' valign="top" align="center">
{allowed_menu_elements}{plg_menu_elements}<a href="http://MYIP/gallery">gallery</a> | <a href='http://MYIP/kplaylist/'>mp3's</a>
</td>
new (using build in menu element stuff):
Text Formatted Code
<td width='100%' height='20' valign="top" align="center">
{menu_elements}{plg_menu_elements}
</td>
Then in the config.php make sure the custom is uncoimmented:
Text Formatted Code
$_CONF['menu_elements'] = array
(
// 'home', // link to homepage
'contribute', // contribute / "submit a story" link
'links', // link to the links section (aka web resources)
'polls', // link to past polls
'calendar', // link to the site calendar
'search', // link to advanced search
'stats', // link to site stats
// 'prefs', // link to user's preferences
'plugins', // links added by plugins, like {plg_menu_elements}
'custom' // for custom links (see lib-custom.php)
);
and in lib-custom.php add the new entries:
Text Formatted Code
/**
* This is an example of a function that returns menu entries to be used for
* the 'custom' entry in $_CONF['menu_elements'] (see config.php).
*
*/
function CUSTOM_menuEntries ()
{
global $_CONF, $_USER;
$myentries = array ();
// link #1: Link to Gallery
$myentries[] = array ('url' => $_CONF['site_url/..'] . '/gallery/',
'label' => 'Gallery');
// link #2: Link to mp3's // logged-in users only
if (!empty ($_USER['uid']) && ($_USER['uid'] > 1)) {
$myentries[] = array ('url' => $_CONF['site_url/..'] . '/kplaylist/',
'label' => 'mp3\'s');
}
return $myentries;
}