Manual:Custom edit buttons

Since there is no effective extension to add the wikipedia edit toolbar extra buttons, this is the only way to create them in a particular wiki.

Here is how your edit page will look like after the changes.

This stuff was found out by me, The Pop-Cult Architect.

Step one: save the images
Go to wikipedia, choose an editable article, click the edit tab, right click the extra edit button(s) you want, save the image to the skins/common/images directory of the wiki in your server. Don't forget to save them as .png, that means, don't change its format.

Step two: modify EditPage.php
In the directory of your wiki, go to the subdirectory /includes/ and open in Kwrite (or whatever works) the EditPage.php file.

array( 'image' => 'button_small.png',                                'id'    => 'mw-editbutton-small',                                'open'  => ' ',                                'close' => ' ',                                'sample'=> wfMsg('small_sample'),                                'tip'   => wfMsg('small_tip'),                                'key'   => 'L'                        ), array( 'image' => 'button_upper_letter.png',                                'id'    => 'mw-editbutton-upper_letter',                                'open'  => ' ',                                'close' => ' ',                                'sample'=> wfMsg('upper_sample'),                                'tip'   => wfMsg('upper_tip'),                                'key'   => 'L'                        ), array( 'image' => 'button_lower_letter.png',                                'id'    => 'mw-editbutton-lower_letter',                                'open'  => ' ',                                'close' => ' ',                                'sample'=> wfMsg('lower_sample'),                                'tip'   => wfMsg('lower_tip'),                                'key'   => 'L'                        ), array( 'image' => 'button_strike.png',                                'id'    => 'mw-editbutton-strike',                                'open'  => ' ',                                'close' => ' ',                                'sample'=> wfMsg('strike_sample'),                                'tip'   => wfMsg('strike_tip'),                                'key'   => 'L'                        ), array( 'image' => 'button_enter.png',                                'id'    => 'mw-editbutton-enter',                                'open'  => ' ',                                'close' => ,                                'sample'=> ,                                'tip'   => wfMsg('enter_tip'),                                'key'   => 'L'                        ), array( 'image' => 'button_hide_comment.png',                                'id'    => 'mw-editbutton-hide_comment',                                'open'  => '',                                'sample'=> wfMsg('hide_sample'),                                'tip'   => wfMsg('hide_tip'),                                'key'   => 'L'                        ), array( 'image' => 'button_reflink.png',                                'id'    => 'mw-editbutton-reflink',                                'open'  => ' ',                                'sample'=> wfMsg('reflink_sample'),                                'tip'   => wfMsg('reflink_tip'),                                'key'   => 'L'                        ), array( 'image' => 'button_redirect.png',                                'id'    => 'mw-editbutton-redirect',                                'open'  => '#REDIRECT ',                                'close' => '',                                'sample'=> wfMsg('red_sample'),                                'tip'   => wfMsg('red_tip'),                                'key'   => 'L'                        ), array( 'image' => 'button_blockquote.png',                                'id'    => 'mw-editbutton-blockquote',                                'open'  => ' ',                                'close' => ' ',                                'sample'=> wfMsg('blockquote_sample'),                                'tip'   => wfMsg('blockquote_tip'),                                'key'   => 'L'                        ), array( 'image' => 'button_gallery.png',                                'id'    => 'mw-editbutton-gallery',                                'open'  => '\n\n',                                'sample'=> wfMsg('gallery_sample'),                                'tip'   => wfMsg('gallery_tip'),                                'key'   => 'L'                        ), array( 'image' => 'button_insert_table.png',                                'id'    => 'mw-editbutton-insert_table',                                'open'  => '\n{| class=\"wikitable\"\n|-\n',                                'close' => '\n|}\n',                                'sample'=> wfMsg('table_sample'),                                'tip'   => wfMsg('table_tip'),                                'key'   => 'L'                        ) );		$toolbar = " \n";
 * 1) Find the area $toolarray = array( thru $toolbar = " \n";
 * 2) These are the new buttons, paste the ones you want:
 * Note:It is very important that the file names and extensions in the image fields are the same as the ones you copied to your /common/images/ directory, be careful with capitals and all.

Step three: modify MessagesEn.php
In the directory of your wiki, go to the subdirectory /languages/messages/ and open in Kwrite (or whatever works) the MessagesEn.php file (or whatever MessagesXx.php, according to your wiki's language. En is for English).


 * In the # Edit page toolbar "section", paste the following:

'red_tip'        => 'Redirect', 'strike_tip'     => 'Strike-through text', 'enter_tip'      => 'Insert a line break', 'upper_tip'      => 'Superscript text', 'lower_tip'      => 'Subscript text', 'small_tip'      => 'Small text', 'hide_tip'       => 'Insert hidden comment', 'gallery_tip'    => 'Insert a picture gallery', 'blockquote_tip' => 'Insert block of quoted text', 'table_tip'      => 'Insert a table', 'reflink_tip'    => 'Insert a footnote reference', 'red_sample'     => 'Redirect', 'strike_sample'  => 'Strike-through text', 'upper_sample'   => 'Superscript text', 'lower_sample'   => 'Subscript text', 'small_sample'   => 'Small text', 'hide_sample'    => 'Hidden text', 'gallery_sample' => 'Example', 'blockquote_sample'=> 'Quoted paragraph', 'table_sample'   => '! header 1 ! header 2 ! header 3 'reflink_sample' => 'Insert footnote text here',
 * row 1, cell 1
 * row 1, cell 2
 * row 1, cell 3
 * row 2, cell 1
 * row 2, cell 2
 * row 2, cell 3',
 * row 2, cell 2
 * row 2, cell 3',

Go further
Here are some examples of buttons I created myself following the same logic.

Go to my incredibly cool site, Pop-Cult Guides, (check it out, look around, edit or create some article, maybe open an account) choose any article, click the edit tab, right click the extra edit button(s) you want (in this case pre or template), save the image to the skins/common/images directory of the wiki in your server. Again, don't forget to save them as .png, that means, don't change its format.


 * Paste this in the /includes/EditPage.phpfile (please be careful, put it somewhere between other buttons, before the last making sure you don't break any button syntax).

array(	'image'	=> 'button_pre.png',				'id'	=> 'mw-editbutton-pre',				'open'	=> '\n \n',				'close'	=> '\n\n',				'sample'=> wfMsg('pre_sample'),				'tip'	=> wfMsg('pre_tip'),				'key'	=> 'L'			), array(	'image'	=> 'button_temp.png',				'id'	=> 'mw-editbutton-template',				'open'	=> '',				'sample'=> wfMsg('temp_sample'),				'tip'	=> wfMsg('temp_tip'),				'key'	=> 'L'			),
 * Right there, replace the * with the letter e, so that you have the command "  " (this weird step is because I cant write " " here, in this page, without breaking the "show sintax in the article" command).

'pre_sample'     => 'Code text syntax', 'temp_sample'    => 'Template', 'pre_tip'        => 'Present code text syntax', 'temp_tip'       => 'Insert Template',
 * In /languages/messages/MessagesEn.php the # Edit page toolbar'' "section", paste the following:

So, there: your wiki is already superior to Wikipedia... at least in buttons haha :P