Joseph L. LeBlanc
homeportfoliojoomlabiocontactblog
articles
guides
tutorials
all
forum
Subscribe in NewsGator Online

Learning Joomla! for the first time? Buy the Joomla! 1.5 Essential training CD-ROM or watch it on Lynda.com.

 

Welcome to Joseph LeBlanc's Joomla resources. First time visitors will find the Daily Message Component Tutorial to be helpful. (Daily Message for Joomla 1.0 is also available, as well as many other tutorials based around it). In addition to the tutorials, there are articles covering conceptual topics, such as the oft-asked question "What is the difference between a component and a module?" To receive alerts for new tutorials and articles, choose a newsfeed at the right appropriate for your newsreader.

PDF Print E-mail

 

toolbar.dailymessage.html.php

 

This file defined the class menuDailyMessage which has three functions for the three different menu arrangements used. These are laid out through the mosMenuBar class functions which handle standard toolbars for the administrator interface.

 

<?php

defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );

 

Of course, the code should only be executed from Joomla.

 

class menuDailyMessage{

function DEFAULT_MENU() {

mosMenuBar::startTable();

mosMenuBar::publish('publish');

mosMenuBar::unpublish('unpublish');

mosMenuBar::divider();

mosMenuBar::addNew('new');

mosMenuBar::editList('edit', 'Edit');

mosMenuBar::deleteList( ' ', 'delete', 'Remove' );

mosMenuBar::endTable();

}

 

For most of these functions, the first parameter is the 'task' variable to be submitted. For the deleteList() function, the first variable is an optional alternative message for the "are you sure you want to delete this" alert. The second variable is the 'task', and the final variable provides the image 'alt' property to display. This function is available for the other buttons as well. The startTable() and endTable() functions output the appropriate beginning and end of table code, as well as some Javascript to handle the buttons. The divider() function displays a vertical bar that visually separates the icons.

 

function EDIT_MENU() {

mosMenuBar::startTable();

mosMenuBar::back();

mosMenuBar::spacer();

mosMenuBar::save('save');

mosMenuBar::endTable();

 

The function back() simply displays the 'cancel' icon with the text 'back.' When clicked, it returns to the previous page. The spacer() functions provides some extra blank space between icons.

 

}

function CONFIGURE_MENU() {

mosMenuBar::startTable();

mosMenuBar::save('save');

mosMenuBar::endTable();

}

}

 

?>