Wiki: Adding Extensions to MediaWiki
Since I often use Flash to illustrate topics and create animations, and may use it for maps, I wanted to have the capability to use flash in my new wiki. (see previous post). Alas, by default, my installation of mediaWiki doesn't seem to include this capability.
However, using just a bit of php, one can write an extension to mediaWiki that allows for custom tags that can do just about anything, so, with some programming, I've added this capability. Now, if you include
<gflash>480 340 http://www.somewhere.com/someflash.swf</gflash>
in your wiki markup, it should embed the flash at the url inline, 480 wide by 340 tall, in your wiki page. Here's a working example on the GlennGameWiki. For people that want the code of the extension, I'm including it as a comment, below.
Update: Since being indexed by Google, this post appears to have become something of a resource for people looking into how to do this. For instance, a large business linked to this article from the main page of their internal wiki for a while. Since my business Clotho Advanced Media, Inc. does internet development work of this sort, I'd certainly invite anyone who is having trouble with this, or needs custom php extensions to mediawiki, to contact my office (608-294-7900, ask for Glenn) or email me. I might be able to help you out, and Clotho can always stand to develop new business-to-business relationships.
Update 2: (5/26/05). My wiki server isn't up to much bandwidth, so I don't allow the uploading of images. Perforce, this means that the flash content referred to by my extension is hosted elsewhere. However, if you're interested in making an extension to allow the inclusion of uploaded content (such as swfs), I refer you to this page. The extension there also has a more sophisticated parameter passing methodology, which may be of interest as well.