Extension:Add Button
Add Button Release status: unstable |
|
---|---|
Implementation | Page action |
Description | Adds buttons to the edit toolbar. |
Author(s) | Assela Pathirana (AsselaTalk) |
License | No license specified |
Download | assela.pathirana.net |
Check usage (experimental) |
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.
Contents |
[edit] 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.
[edit] What it does
In addition to the standard Mediawiki editor buttons (Bold, Italic, ...,Sign,Line) this extension adds five additional buttons.
- Terminal Type Text.
- Pre-formatted text.
- Strike-out text.
- HTML comments (hiding text.)
- Linking a keyword to wikipedia. Of course your interwiki table should have an entry called wikipedia: for this to work.
[edit] Please Contribute
If you have any ideas for useful button to be added:
- Create the graphic
- Suggest the line to be added to addButtonsHere.js file.
- 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.
[edit] 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: #0 /var/www/wiki/includes/Parser.php(332): wfRunHooks('ParserBeforeTid...', Array) #1 /var/www/wiki/includes/Article.php(3017): Parser->parse('<div class='noa...', Object(Title), Object(ParserOptions), true, true, 0) #2 /var/www/wiki/includes/Article.php(841): Article->outputWikiText('<div class='noa...', false) #3 /var/www/wiki/includes/Wiki.php(383): Article->view() #4 /var/www/wiki/includes/Wiki.php(48): MediaWiki->performAction(Object(OutputPage), Object(Article), Object(Title), Object(User), Object(WebRequest)) #5 /var/www/wiki/index.php(89): MediaWiki->initialize(Object(Title), Object(OutputPage), Object(User), Object(WebRequest)) #6 {main}
- patch
--- ../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; } ?>
[edit] See also
- Extra edit buttons - the system used by Wikipedia
Language: | English • Français |
---|