m (Usage)
m (WZ)
Line 3: Line 3:
 
'''''wz''''' is a [[MediaWiki]] extension I wrote to enable tooltips (or mouse rollover).
 
'''''wz''''' is a [[MediaWiki]] extension I wrote to enable tooltips (or mouse rollover).
  
I rely for that on the [http://www.walterzorn.de/en/tooltip/tooltip_e.htm best tooltips] available on the web, those of '''[http://www.walterzorn.de Walter Zorn]'''. As of [[13 June|13]], [[June (2011)|June]] [[2011|(2011)]], I implemented only the most primitive features, but stronger support of Walter's wonderful toolkit (such as fading, opacity, timing, positioning, etc.) will be released later.
+
I rely for that on the [http://www.walterzorn.de/en/tooltip/tooltip_e.htm best tooltips] available on the web, those of '''[http://www.walterzorn.de Walter Zorn]'''.
  
 
== Usage ==
 
== Usage ==
Line 38: Line 38:
 
== Installation ==
 
== Installation ==
  
* Download wz.zip and uncompress in ''extension/wz/'' directory.
+
* Download the source tarball and uncompress in ''extension/wz/'' directory.
 
* This includes Walter Zorn's java script files. You need to declare them inside the HTML ''body'' section, typically by adding a line as follows in the php skin declarations (in the skin/ directory):
 
* This includes Walter Zorn's java script files. You need to declare them inside the HTML ''body'' section, typically by adding a line as follows in the php skin declarations (in the skin/ directory):
 
<code lang='php'>
 
<code lang='php'>
Line 47: Line 47:
 
require_once("$IP/extensions/wz/wz.php");
 
require_once("$IP/extensions/wz/wz.php");
 
</pre>
 
</pre>
 
== To do ==
 
 
* Fine tune css to highlights elements that can be tooltipped.
 
* Implement all (or more) options from the original library.
 
* Release publicly.
 
  
 
== Sources ==
 
== Sources ==
  
 
* '''[[Media:Wz.tar.gz‎|v°0.1]]''' &mdash; on [[13 June|13]], [[June (2011)|June]]&nbsp;[[2011|(2011)]], first release.
 
* '''[[Media:Wz.tar.gz‎|v°0.1]]''' &mdash; on [[13 June|13]], [[June (2011)|June]]&nbsp;[[2011|(2011)]], first release.
 +
*
  
 
== See also ==
 
== See also ==

Revision as of 23:35, 1 May 2014

Contents

WZ

wz is a MediaWiki extension I wrote to enable tooltips (or mouse rollover).

I rely for that on the best tooltips available on the web, those of Walter Zorn.

Usage

Use the wz tag with an argument to tip that will be displayed over the encapsulated element:

<wz tip="That's ''that'' simple!">Roll over me!</wz>

Roll over me!

You can defer the tip to a tag using tagtotip instead of tip:

<wz tagtotip="tip">Roll over me!</wz>
<span id="tip">That's ''that'' simple!</span>

Roll over me! That's that simple!

This way you can make very complicated tooltips. In particular, you can wikify them! (including images, etc. For links, you'll need to wait that I implement the sticky option).

You can conveniently "tooltip" all sorts of things, such as images:

<wz tip="That's Walter on a quick 200km trip with his homebuilt
carbon lowracer. This guy is awesome.">[[Image:Kreuzot_ss.jpg‎]]</wz>

Kreuzot ss.jpg

Installation

  • Download the source tarball and uncompress in extension/wz/ directory.
  • This includes Walter Zorn's java script files. You need to declare them inside the HTML body section, typically by adding a line as follows in the php skin declarations (in the skin/ directory):

echo Html::linkedScript( '/extensions/wz/js/wz_tooltip.js' );

  • Add in your LocalSettings.php:
require_once("$IP/extensions/wz/wz.php");

Sources

See also