Extension:Add Button

This extension may not be safe to use. Please see the Talk page. If the extension has been fixed, please remove this notice.

For  alternative methods see:
 * This Wikipedia page with the technique used by wikipedians to configure their buttons manually without changing php files (used by Wikipedia).
 * Wikipedia buttons, a 3 steps "manual" technique developed and used in Pop-Cult Guides to create in your wiki the exact buttons used by Wikipedia. This will require to copy-paste text to a couple of php files.

Note that both will require you to do some extra steps and is not as simple as adding a typical extension but the results are worth it.

Context and Purpose
This page was copied from: http://assela.pathirana.net/Add_Button_Extension

Efficient editing aids can go a long way towards making, expanding, and improving a wiki more easily. There are several html/wiki tags that I use very often on a page. Stopping to add these tags to my text is sometimes distracting. One of the good solutions will be to use an external editor to edit your wikis. For example an advanced editor like vim can be enahanced with all sorts of macros and programs to aid fast editing.

But, another is to add buttons whose task is to add those frequently used commands. This is what Add Button Extension does.

What it does
See Screenshot

In addition to the standard Mediawiki editor buttons (Bold, Italic, ...,Sign,Line) this extension adds five additional buttons.
 * 1) Terminal Type Text.
 * 2) Pre-formatted text.
 * 3) Strike-out text.
 * 4) HTML comments (hiding text.)
 * 5) Linking a keyword to wikipedia. Of course your interwiki table should have an entry called wikipedia: for this to work.

Please Contribute
If you have any ideas for useful button to be added:
 * 1) Create the graphic
 * 2) Suggest the line to be added to addButtonsHere.js file.
 * 3) Send them to me.

I will add suitable ones to the standard package (Of course you will be acknowledged.)

Please use this e-mail address assela-3y773743 AT pathirana.net to contact me, if needed.

Patch for 1.11

 * old version err messenger is

Detected bug in an extension! Hook addbuttonDo failed to return a value; should return true to continue hook processing or false to abort.

Backtrace:


 * 1) 0 /var/www/wiki/includes/Parser.php(332): wfRunHooks('ParserBeforeTid...', Array)
 * 2) 1 /var/www/wiki/includes/Article.php(3017): Parser->parse('outputWikiText('view
 * 5) 4 /var/www/wiki/includes/Wiki.php(48): MediaWiki->performAction(Object(OutputPage), Object(Article), Object(Title), Object(User), Object(WebRequest))
 * 6) 5 /var/www/wiki/index.php(89): MediaWiki->initialize(Object(Title), Object(OutputPage), Object(User), Object(WebRequest))
 * 7) 6 {main}

--- ../AddButtonExtension_bak/AddButtonExtension.php	2008-01-21 13:47:05.000000000 +0800 +++ AddButtonExtension.php	2008-01-21 13:35:42.000000000 +0800 @@ -29,7 +29,7 @@ function addbuttonDo (&$parser, &$text){ static $done=0; if ( $done ) { -   return; +   return true; }  $done=1; global $wgRequest; @@ -74,5 +74,6 @@  "         .$text;	   } +  return true; } ?>
 * patch