Customizing edit toolbar

You can customize the Edit Toolbar quite easily.

Old way - editing php file on server
In the ...wiki/includes/ directory you will find a file called Skin.php. Don't forget to make a copy before changing it, just in case (cp Skin.php SkinOriginal.php).

Note: In Mediawiki 1.5 (and 1.7.1) and later, this can be found in ...wiki/includes/EditPage.php at line 1452 (line 1603 for 1.7.1) (line 1610 for 1.10.1) (line 1649 for 1.11) Alternatively, you can search for function getEditToolbar or $toolarray.

Add the new button code after line 2780, as the example above

array(	'image'=>'button_bold.png', 	'open'	=>	"\'\'\'", 	'close'	=>	"\'\'\'", 	'sample'=>	wfMsg('bold_sample'), 	'tip'	=>	wfMsg('bold_tip'), 	'key'	=>	'B' ),

It is easy to work out from the names of the button image files which array is related to which function and you can delete buttons from the Edit Toolbar by simply removing the appropriate array lines.

You can change the image used by the buttons by changing the button_NNNN.png files - stored in the .../wiki/stylesheet/images/ directory. - This directory appears to not be present in 1.5.3(and 1.7.1) use .../skins/common/images instead.

You can add buttons to the array by simply adding a new array definition - one reason to do this is to help users structure pages by adding a pre-defined set of headers, rules or advice.

Example
For example to add a button that makes the selected text yellow and reduces its size:

array(	'image'=>'button_small_yellow.png', 	'open'	=>	"&lt;font size=\"-1\" color=\"#FFFF00\"&gt;", 	'close'	=>	"&lt;/font&gt;", 	'sample'=>	wfMsg('smallyellow_sample'), 	'tip'	=>	wfMsg('smallyellow_tip'), 	'key'	=>	'R' ),
 * 1) make a button for your edit function (the standard size is 23 x 22 pixels)
 * 2) save it in the .../stylesheet/images file - (I could not find this directory in 1.5.3 - looks like it should be in .../skins/common/images )
 * 3) open ...wiki/includes/
 * 4) Mediawiki 1.4 and older: rename Skin.php to Skin.php~
 * 5) Mediawiki 1.5 and newer: rename EditPage.php to EditPage.php~
 * 6) open it up and add the new button to the array by inserting:
 * 7. Mediawiki 1.4 and older: save as Skin.php
 * 8. Mediawiki 1.5 and newer: save as EditPage.php
 * 9. open a browser and make a new page in your wiki and check that the new button is working.
 * 10. make special pages to define the sample and tooltip text, in the above sample: MediaWiki:smallyellow_sample and MediaWiki:smallyellow_tip

Tips

 * Add your own text inside the array using the Wiki Mark Up: ==Headline1==\\n\\n==Headline2== (\\n is a line break, and \\n\\n adds a blank line)
 * Remember not to use apostrophes
 * Remember to use \" with HTML text requiring a quotation mark.
 * Use  if you don't want text to show up on the final wiki page.
 * You need to add a special page so you can edit the wfMsg text - otherwise the tip text file name appears inside angled brackets when your pointer rolls over the button. Examples: MediaWiki:Nowiki sample and MediaWiki:Nowiki tip
 * You can place the new button anywhere on the edit toolbar -- just insert the  line in between the sections for the buttons where you want to insert your new one.

New way - editing MediaWiki:Monobook.js

 * TODO