J1.5:How to create a custom button
From Joomla! Documentation
(Difference between revisions)
(→Upload Button) |
(Tidied up a bit. This page is useful but needs to be completed.) |
||
| Line 1: | Line 1: | ||
| − | The | + | {{cookiejar}} |
| + | {{incomplete}} | ||
| + | The code below is used for adding buttons to the back-end toolbar when developing components and modules. | ||
| − | + | ==Apply button== | |
| + | <source lang="php"> | ||
| + | JToolBarHelper::apply(); | ||
| + | </source> | ||
| − | + | ==Back button== | |
| − | + | <source lang="php"> | |
| − | + | JToolBarHelper::back(); | |
| − | + | </source> | |
| − | + | ||
| − | + | ||
| − | + | ==Cancel button== | |
| + | <source lang="php"> | ||
| + | JToolBarHelper::cancel(); | ||
| + | </source> | ||
| − | + | ==Custom button== | |
| + | <source lang="php"> | ||
| + | JToolBarHelper::custom( 'task', 'icon', 'icon over', 'alt', boolean, boolean ); | ||
| + | </source> | ||
| − | + | ==Upload button== | |
| − | + | * Method 1: | |
| − | + | <source lang="php"> | |
| − | + | // Add an upload button and view a popup screen width 550 and height 400 | |
| − | + | $alt = "Upload"; | |
| − | + | $bar=& JToolBar::getInstance( 'toolbar' ); | |
| − | + | $bar->appendButton( 'Popup', 'upload', $alt, 'index.php', 550, 400 ); | |
| − | + | </source> | |
| − | + | * Method 2: | |
| − | == Upload | + | <source lang="php"> |
| − | + | // You view button for popup media manager tools | |
| − | + | JToolBarHelper::media_manager( '/' ); | |
| − | + | </source> | |
| − | * | + | |
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | * | + | |
| − | + | ||
| − | + | ||
| − | + | ||
Revision as of 13:05, 18 June 2008
This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.
| This article is a small, well-defined item that could be completed by someone with a reasonable knowledge of the subject matter and a modest time commitment. If you would like to try writing this article you're welcome to do so.
The subject may be self-evident, but if not then further details should be available on the discussion page. Please add {{inuse}} at the top of this page while editing. For other small, well-defined tasks, please look in the Cookie jar. ---Thank you. This article was last edited by Chris Davenport (talk| contribs) 4 years ago. (Purge) |
Note
Please note that the content on this page is currently incomplete. Please treat it as a work in progress.
- This article was last edited by Chris Davenport (talk| contribs) 4 years ago. (Purge)
The code below is used for adding buttons to the back-end toolbar when developing components and modules.
Contents |
Apply button
JToolBarHelper::apply();
Back button
JToolBarHelper::back();
Cancel button
JToolBarHelper::cancel();
Custom button
JToolBarHelper::custom( 'task', 'icon', 'icon over', 'alt', boolean, boolean );
Upload button
- Method 1:
// Add an upload button and view a popup screen width 550 and height 400 $alt = "Upload"; $bar=& JToolBar::getInstance( 'toolbar' ); $bar->appendButton( 'Popup', 'upload', $alt, 'index.php', 550, 400 );
- Method 2:
// You view button for popup media manager tools JToolBarHelper::media_manager( '/' );
