Extension:Tooltip
This extension is currently not actively maintained! Although it may still work, any bug reports or feature requests will more than likely be ignored. If you are interested in taking on the task of developing and maintaining this extension, you can request repository ownership. As a courtesy, you may want to contact the author. You should also remove this template and list yourself as maintaining the extension in the page's {{Extension }} infobox. |
Tooltip 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 | |
Quarterly downloads | 5 (Ranked 135th) |
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
[edit]- Download and move the extracted
Tooltip
folder to yourextensions/
directory.
Developers and code contributors should install the extension from Git instead, using:cd extensions/
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/Tooltip - Add the following code at the bottom of your LocalSettings.php file:
wfLoadExtension( 'Tooltip' );
- 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
[edit]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
[edit]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
[edit]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
[edit]- 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