Advertisement
Free Mambo Templates - Free Joomla Templates
Joomla Hut HomeContact UsJoomla LinksMambo Forum - Joomla ForumJoomla Downloads
Home
News
Articles
Gallery
Downloads
Tutorials
Site Reviews
Flash Tutorials
Templates Demo
Joomla Links
FAQ
Advertise Here
Search
Advertisement
Seek Your Host
New York Web Design
Joomla Templates
Login Form





Lost Password?
No account yet? Register
Joomla Extensions
Joomla Templates
TemplatePlazza
 
Joomla Website

Creating a quick and easy Mambo component Print E-mail
Written by Doyle Lewis   
Thursday, 15 April 2004

toolbar.hello_world.php - Sets up the toolbar.

<?php
//hello_world Component//
/**
* Content code
* @package hello_world
* @Copyright (C) 2004 Doyle Lewis
* @ All rights reserved
* @ hello_world is Free Software
* @ Released under GNU/GPL License : http://www.gnu.org/copyleft/gpl.html
* @version 1.0
**/


defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
require_once( $mainframe->getPath( 'toolbar_html' ) );


if($task) {

  switch($task) {
    case 'new':  
    case 'edit':
 
      $act = "edit";
      break;

  }
}

if ($act) {

  switch ( $act ) {

    case 'edit':
      menuHello_world::EDIT_MENU();
      break;
   
    case 'text':
      menuHello_world::TEXT_MENU();
      break;

  }
}   

?>

Now let's look at how the file works:

require_once( $mainframe->getPath( 'toolbar_html' ) );
Works the same as requiring the admin.hello_world.html.php file in admin.hello_world.php

if($task) {

  switch($task) {
    case 'new':  
    case 'edit': 
      $act = "edit";
      break;

  }
}

"new" and "edit" will use the same toolbar.

    case 'edit':
      menuHello_world::EDIT_MENU();
      break;
This tells toolbar.hello_world.html.php which function to use.

 


 
< Prev   Next >
 
 
Joomla Jobs
 
 
Joomla Flash Tutorials
   
     
Home   |   Contact   |   Links   |   Forum   |   Downloads  |  Media Kit
 

© Copyright 2003 - 2006 by BUYHTTP, LLC. All rights reserved.
None of the text or images in this public website may be copied without the expressed written consent of the authors.
Powered By Joomla!

Joomla Top Sites - Your Primary Source of Joomla Traffic