![]() Release status: unmaintained |
|
---|---|
![]() |
|
Implementation | Tag |
Description | Add fancy tooltips to wiki text |
Author(s) | Paul Grinberg |
Latest version | v0.7.0 (2021-05-27) |
MediaWiki | >= 1.35.0 |
License | No license specified |
Download | Download extension Git [?]: |
Hooks used
|
|
Quarterly downloads | 17 (Ranked 153rd) |
Translate the Tooltip extension if it is available at translatewiki.net | |
The Tooltip extension provides the ability to add fancy tooltips to wiki text. Unlike other extensions which provide similar functionality, 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.
Installation Instructions
- Download and place the file(s) in a directory called
Tooltip
in yourextensions/
folder. - Add the following code at the bottom of your LocalSettings.php
wfLoadExtension( 'Tooltip' );
file: - 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
Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
Usage
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.
<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.
{{#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.
Revisions
- v0.7.0 - May 27, 2021 - Convert extension to use extension registration system
- v0.6.1 - September 8, 2014 - Migrate i18n to JSON format
- v0.6.0 - January 19, 2012 - Remove use of deprecated LanguageGetMagic hook
- 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