Monthly ArchiveAugust 2007
development robchurch on 29 Aug 2007
Debugging “JScript”
As anyone who designs or develops web sites or web applications will know, Microsoft Internet Explorer is atrocious, not just in the lack of support for standards, or the more esoteric behaviour it exhibits, but in the lack of decent debugging tools when it goes wrong.
With that in mind, Jonathan Boutelle’s excellent cheat sheet on getting the Microsoft Script Editor (comes free with Microsoft Office XP/2003, so I guess it’s not that free) is well worth a read.
MediaWiki robchurch on 25 Aug 2007
Don’t steal my docs!
I don’t really mind who copies or mirrors our upgrade documentation – it’s great – but it would be nice if people actually remembered to sufficiently attribute the people who write it in the first place.
Extensions &MediaWiki robchurch on 21 Aug 2007
MediaFunctions
I’ve added some basic EXIF metadata extraction support to the MediaFunctions extension, following a thread on wikitech-l, which uses Tim’s excellent work on media handlers, so we can do things like:
{{#mediaexif:File.jpg|Make}}
I’ve also introduced a {{#mediadimensions}} parser function, which fetches the natural “dimensions string” from the file – for images, this returns a width and height, e.g. “800×600″; for audio, a duration, e.g. “1m30s”, etc.
The MediaFunctions extension is in Subversion, but not live on Wikimedia sites at this time.
Extensions &MediaWiki &rants robchurch on 20 Aug 2007
More image fun
Well, these images are getting the better of me, eh? Seems I made an (idiotic, now I look on it) assumption about the “timestamp-like” part of file archive names when I wrote the FileRevertForm and the FileDeleteForm, and thus extracted the wrong timestamp for presentation in the UI. Good job nothing in the backend relied upon this.
In similar news, it seems MediaWiki’s inconsistent image markup tripped me up, too; RandomImage’s “size” parameter was being ignored for goodness knows how long.
Anyway, all fixed now. There’s some talk of parser functions for extracting metadata (EXIF, etc.) from files, which I might poke if Magnus doesn’t implement this as he seems to want to do. I also plan to poke the existing MediaFunctions extension a bit.
Extensions &MediaWiki robchurch on 20 Aug 2007
RandomImage 1.4
Some updates to the RandomImage extension:
- Captions will now be pulled from the image description page, if possible. Text within
<randomimage></randomimage>tags is preferred, if present, otherwise, the first paragraph of the description is used. This idea came from Dave Cook. - The extension can now perform a more complex SELECT to ensure that non-images are excluded from selection.
Update: Dave caught a bug, which I’ve fixed – when a size was specified, the caption wasn’t showing. This is due to the fact that I’m a touch lazy and the extension just generates wiki markup, passing it to the parser to do the actual work. Of course, this results in MediaWiki’s slightly inconsistent sizing/framing behaviour.