User talk:Malvineous

Hi, was wondering if you could help me with an extension I'm working on (as your Extension:FlvHandler seems to be the only extension I've seen using ImageBeforeProduceHTML hooks successfully, and that's where I have a problem). I'm trying to make the wiki display XCF images as multipage-documents. Now, my webserver is already configured such that requesting /images/f/f5/imagename.xcf/layername.png will pull a layer out of an XCF file; I've written an ImageBeforeProduceHTML function which generates javascript to request all the layers and display them as a stack. But I can't figure out how to force this to be called ... including an just gives me a text link to File:filename.xcf, and my hook function isn't called.

Do I need to implement the ImageHandler too? I can't seem to find any comprehensible documentation on that class, so any help would be much appreciated. -- 81.151.233.20 17:25, 23 May 2011 (UTC)


 * Hmm, it has been a while since I looked at this. I think ImageBeforeProduceHTML is only called before an tag is generated - so if you get a (red) text link to File::filename.xcf there would be no tag, and hence no call to ImageBeforeProduceHTML.  I would guess that yes, you do need to implement an ImageHandler.  This might not be such a bad thing, as it would mean you can then use .xcf files in other places (e.g. image galleries) if you make your ImageHandler generate a thumbnail.  Or you could take the easy way out and make the ImageHandler generate a blank image so that ImageBeforeProduceHTML will be called, but the .xcf file will just appear as a blank image if it's used somewhere else (e.g. actually visiting the uploaded file's preview page.) -- Malvineous 22:36, 23 May 2011 (UTC)