User:MaxEnt/Bloop

Purpose
To employ balloon tags within a template. See Extension:Balloons.

Status
This was my first attempt at extension development. Version 0.1 is rather crude.

As a learning exercise, this template demonstrates that it is relatively easy to wrap a tag extension with a parser extension if one requires the use of a tag extension within templates.

Apparently it is possible to add complexity to a tag extension to the same purpose, but my feeble efforts in this direction did not succeed. The documentation here could use some work.

Advantages of parser wrapper
Bonus for wrapping a parser around Balloons is separation of effort and the option to provide an alternate syntax, less verbose.

For the wiki I maintain at work, I can't go around asking inexperienced editors to author the following syntax in order for wiki markup to work as expected: Hello! I am also a balloon tooltip

Nor was it previously possible to hide this mess within a template.

Last, but not least, by rewriting bloop parser syntax into balloon tag syntax, I remain blissfully ignorant of the balloon popup JavaScript, where all the hard work is done. Nice.

Name
I considered naming this Balloon_tooltip_parser which would be fine for embedding inside templates, but I might also use this in article space in my own wiki, so I decided on something short and evocative of my shallow foundation.

Not using load
In particular, it should be using the Load method instead, which preserves more wiki markup. I need to dust off my PHP to create an incrementing id counter, so I left that for another day. It's also possible that MediaWiki has a way to embed a token or some magic syntax which will function for this purpose.

Only two parameters
Only the basic balloon functions are wrapped, not yet having taken the time to figure out a good mapping for the feature set as a whole.

Source
Pretty simple, in'it?

Reference

 * CSS2 counters
 * - Automatic numbering in CSS 2.1 is controlled with two properties, 'counter-increment' and 'counter-reset'.