Extension:Uniwiki Toolbar
Uniwiki Toolbar Release status: experimental |
||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Implementation | Skin | |||||||||||||||||||||||||||||||
Description | Uses a better toolbar, using Tango icons with optional internationalizable text describing the icons | |||||||||||||||||||||||||||||||
Author(s) | Merrick Schaefer, Mark Johnston, Evan Wheeler, Adam Mckaig (Uniwikitalk) |
|||||||||||||||||||||||||||||||
Last version | 0.1 (2008-08-25) | |||||||||||||||||||||||||||||||
MediaWiki | 1.12.0 | |||||||||||||||||||||||||||||||
License | GPLv3 | |||||||||||||||||||||||||||||||
Download | From Subversion | |||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
Check usage (experimental) |
Contents |
[edit] What can this extension do?
This extension is primarily focused on increasing the usability of MediaWiki's user interface. It replaces the default toolbar with one that uses the widely used icon set Tango, limits the options to those most used, and adds internationalizable text next to each icon improving peoples understanding of the icons. Although the extension is very much a work in progress, the changes have been refined by feedback from iterative usability testing, and significantly improve the editing process - especially in conjunction with the other Uniwiki extensions.
[edit] Installation
Create a subdirectory in your extensions directory:
(we do this to make it easy to distribute all Uniwiki extensions as a bundle)
cd /your/wiki/extensions mkdir uniwiki
Download the extension and its dependencies using subversion:
cd /your/wiki/extensions/uniwiki svn checkout http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/uniwiki/Javascript svn checkout http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/uniwiki/MooTools12core svn checkout http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/uniwiki/CustomToolbar
Add the following to LocalSettings.php:
require_once("$IP/extensions/uniwiki/Javascript/Javascript.php"); require_once("$IP/extensions/uniwiki/MooTools12core/MooTools12core.php"); require_once("$IP/extensions/uniwiki/CustomToolbar/CustomToolbar.php");
[edit] Configuration
This extension is highly configurable, allowing for icons to be changed, buttons added or removed, text turned on or off, and the text to be translated for localization.
[edit] Adding a new button
To add a new button, you need to edit the CustomToolbar.js file and add a new array to the Buttons array:
'mybutton': { 'key': "m", 'open': "*", 'close': "*", 'sample': wfMsg('ct_your_sample_msg'), 'tip': [wfMsg('ct_your_tip'), wfMsg('ct_your_tip_wrap')], 'caption': wfMsg('ct_your_caption') 'function': }
and then adding the following line to style.css:
.editor-wrap .toolbar .but-mybutton { background-image: url("images/16/mybutton.png"); }
This will make new button that will wrap text in * characters. The sample is the text that would be placed inside the *s, the tip is the tooltip that displays on mouse hover for what will happen when you press the button, and the caption is the message that is displayed alongside the picture in the actual button. The button image just needs to be placed in the corresponding directory (in this case with the other 16x16px images). Alternatively, buttons can call a custom function to perform whatever task you would like. In this case you would add something like this:
'myfunction': { 'key': "f", 'tip': wfMsg('ct_your_tip'), 'caption': wfMsg('ct_your_caption') 'function': function() { /* add your code here to do what you will... */ } }
As you can see, the tip can be either one message, or an array of two messages. The first message is what will be displayed on mouse hovering over the button, the second is the same, but will display when there is selected text. For example it will display, say, "insert starred text" with nothing selected and "make this text starred" if there was text selected. Also, you will notice that these messages are internationalized, so you will have to enter them into the CustomToolbar.i18n.php file first.
[edit] Hiding button text/images
You can customize the look of the toolbar further by editing the style.css file to your liking.
[edit] Installing the entire Uniwiki bundle
Download all of the Uniwiki extensions using Subversion:
cd /your/wiki/extensions svn checkout http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/uniwiki uniwiki
Add the following to LocalSettings.php:
# uniwiki # ======= $uw = "$IP/extensions/uniwiki"; require_once("$uw/CssHooks/CssHooks.php"); require_once("$uw/Javascript/Javascript.php"); require_once("$uw/MooTools12core/MooTools12core.php"); require_once("$uw/AutoCreateCategoryPages/AutoCreateCategoryPages.php"); require_once("$uw/GenericEditPage/GenericEditPage.php"); require_once("$uw/CatBoxAtTop/CatBoxAtTop.php"); require_once("$uw/CustomToolbar/CustomToolbar.php"); require_once("$uw/Layouts/Layouts.php"); require_once("$uw/Authors/Authors.php"); require_once("$uw/CreatePage/CreatePage.php");
[edit] Internationalizing Uniwiki extensions
The Uniwiki extensions are available in several languages already, and it is very easy to add a new language. Each extension that has interface text includes a .i18n file with the internationalized system messages. Follow the instructions here to add the new language to the file.
[edit] See also
- Sites using uniwiki extensions
- Wikimini - Encyclopedia written by children
- Appropedia
- iAIDS wiki
- Metia
- WikiMama - Photo- and Video- driven Wiki Recipes
- Other extensions from the Uniwiki bundle