Extension:Tooltip
|
Tooltip Release status: beta |
|
|---|---|
| Implementation | Tag |
| Description | Add fancy tooltips to wiki text |
| Author(s) | Paul Grinberg |
| Last version | v0.5.2 (Jan. 14, 2008) |
| License | No license specified |
| Download | Download snapshot Subversion [Help] |
|
Check usage (experimental) |
|
|
This extension provides the ability to add fancy tooltips to wiki text. Unlike other extensions which provide similar functionality (i.e. Extension:Glossary, Extension:LinkedImage, Extension:LinkFloatie, etc), this extension allows for multi-line wiki and/or HTML syntax text for the tooltip. Additionally, the tooltip itself is displayed in a fancy semitransparent window. Unfortunately, this extension does not work in conjunction with Extension:Glossary. |
Contents |
[edit] Installation Instructions
[edit] Step 1
Download the extension code from SVN and place it in the extensions directory.
[edit] Step 2
Add the following text to your LocalSettings.php
require_once( "$IP/extensions/Tooltip/Tooltip.php" );
[edit] Step 3
Save a 16x16 pixel png with some level of alpha channel transparency as ttbg.png in $wgScriptPath/images directory. As an example, here is a blue background image.
[edit] Usage Instructions
There are two methods for using this extension in your wiki articles: via a Parser Function, and via a new Tag. These two methods are mutually exclusive and should NOT be interchanged on a given article in order to guarantee proper output.
[edit] <tooltip> Tag Format
Simply add the following text
<tooltip text="body text" x=xoffset y=yoffset>tooltip text</tooltip>
directly inline with your article, where the x= and y= parameters are optional.
[edit] {{#tooltip:}} Parser Function Format
Create a new Template called {{tooltip}} and add the following content to it
<includeonly>{{#tooltip: {{{1}}}|{{{2}}}}}</includeonly><noinclude>Usage: <nowiki>{{tooltip | base text | tooltip text}}</nowiki> ({{tooltip | base text | tooltip text}})</noinclude>
To use this extension on your wiki article, simply call the template like so
{{tooltip | base text | tooltip text}}
Note: You can also modify the template wih the x= and y= parameters as optional parameters 3 and 4.
[edit] Revisions
- v0.5.2 - January 14, 2008 - Another small bug fix (clean up warning)
- v0.5.1 - December 05, 2007 - Small bug fix (clean up warning)
- v0.5 - December 03, 2007 - Numerous style improvements and cleanup (many thanks to Eclecticdave and Lexw)
- v0.4.1 - November 27, 2007 - Better parser function support.
- v0.4 - November 26, 2007 - Added a parser function in addition to the tag
- v0.3.1 - November 21, 2007 - Better placement of the tooltip (thanks to User:Lexw)
- v0.2 - August 22, 2007 - Better wiki syntax parsing
- v0.1 - August 22, 2007 - Initial Revision
