On 06/11/12 21:16, Benny Lichtner wrote:
I started using the hook in a Firebase extension
(
http://www.mediawiki.org/w/index.php?title=Extension:Firebase)
in order to replace <firebaseraw> tags with responses to HTTP requests
/before most other wiki text is parsed/.
It works great for me because I can insert data into chunks of code like a
google street view widget:
{{#widget:Google Street View
|lat=<firebaseraw
url="http://gamma.firebase.com/SomeAccountName/lat" />
|lng=<firebaseraw
url="http://gamma.firebase.com/SomeAccountName/lon" />
|yaw=370.64659986187695
|pitch=-20
|zoom=0
}}
I'm new to extension writing, though, so maybe there are other, better ways
to accomplish this?
If not, consider this a vote to leave in setFunctionTagHook()!
--Benny
A parser function instead of a tag seems more appropiate. That way it
would be expanded before being passed to #widget.