Replaces the default edit-toolbar icons, and adds a few additional icons.
- Download (ZIP or TAR). There are two folders in the zip file:
- cookbook: unzip the folder
edittoolbar/, and the file in the folder, into your cookbook directory (usually
- pub: Unzip the folder
edittoolbar/, and the files in the folder, into your pub directory (usually
- cookbook: unzip the folder
- Add the following to your local configuration file, usually
$EnableGUIButtons = 1; include_once("$FarmD/cookbook/edittoolbar/edittoolbar.php");
- Comment out
config.phpif they were enabled
- Edit the edittoolbar.php file, removing the number 25 from around center and right. (Instead of reading
'%25right%25'they should read
So, after installing you should have a folder named
edittoolbar, with a newly edited
edittoolbar.php, in your
cookbook directory, and a folder named
edittoolbar/, with a bunch of image files, in your
The H1 header is reserved by convention for the page title, so it is excluded from the toolbar by default. If you want to include the H1 element on the toolbar, then add this to
$et_Include_H1 = true;
How do I remove icons that I don't want displayed?
Each icon is identified by a name, listed below. Simply add an 'unset' statement in
config.php for each icon you want to remove. Make sure you place the unset statements after the includes in
$EnableGUIButtons = 1; include_once("$FarmD/cookbook/edittoolbar/edittoolbar.php"); # These lines remove the icons for author's, including the separator. unset($GUIButtons['separator5']); unset($GUIButtons['author']); unset($GUIButtons['authordate']);
Refer to the icon list for a list of icon names.
Rather than change the
edittoolbar.php file, add the statements to your
Each icon is assigned to a number, which determines the icons position in the toolbar. EditToolbar uses from 0 through 290 in jumps of 10, so your numbering should start at 300 and above to position icons at the end of the toolbar, or use numbers not divisible by 10 (155, 157, etc) to position icons between the existing icons. Refer to the icon list for a list of icon names and array position numbers.
$GUIButtons['new_button'] = array(300, 'PRE-TEXT', 'POST-TEXT', '$[LABEL]','$GUIButtonDirUrlFmt/ICON"$[BALOON TEXT]"');
Each button is specified by an array of five values:
- the position of the button relative to others (a number)
- PRE-TEXT: the opening markup sequence
- POST-TEXT: the closing markup sequence
- LABEL: the default text if none was highlighted
- the text of the button, either (a) HTML markup or (b) the url of a gif/jpg/png image to be used for the button (along with optional "title" text in quotes).
- 2010-09-22: When including Creole before EditToolbar some of the
$GUIButtonsentries are not correctly initialised by EditToolbar, apparently because they were already initialised in creole.php. The problem can be fixed by adding "unset(
$GUIButtons);" directly after including creole.php in config.php (or maybe including edittoolbar.php before creole.php). (Marco Lehnort)
- 2010-01-04: When I use the unset option (e.g. unset(
$GUIButtons['big']); ), then the button is removed in firefox. However, in InternetExplorer 7.0 the Buttons are replaced by an icon indicating missing image (red 'X'). Those icons still work as the original buttons so this issue is not only (but also) about aesthetics. (Sven H.)
Contributors: DaveG, IDB
- bug: Error in version identifier.
- new: Removed H1 icon by default -- H1 is really reserved for the page title. If you want the H1 element back refer to
- Initial release.
See discussion at EditToolbar-Talk