|
Page 5 of 8
toolbar.dailymessage.php
For all
components, Joomla loads toolbar code for the administrator interface. The
creation of this code is fairly straightforward as the functionality is very
well defined. The code in this file is essentially one switch statement that
loads the appropriate toolbar based on the 'task' and 'act' variables.
<?
defined(
'_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
require_once(
$mainframe->getPath( 'toolbar_html' ) );
First, make sure
the code is running within mambo and load up the toolbar.dailymessage.html.php
file, which will handle the HTML output for the menu.
switch (
$task ) {
case
'edit':
menuDailyMessage::EDIT_MENU();
break;
case
'new':
menuDailyMessage::EDIT_MENU();
break;
default:
switch($act)
{
case
"configure":
menuDailyMessage::CONFIGURE_MENU();
break;
default:
menuDailyMessage::DEFAULT_MENU();
break;
}
break;
}
Notice that both
the 'new' and 'edit' tasks share the same menu. This does not cause a conflict,
because the menu merely launches tasks and is not functionally dependent on the
current task. The current task and 'act' merely determine which options will be
displayed. All of the menus are called through functions in the menuDailyMessage
class contained in toolbar.dailymessage.html.php file.
?>
|