Extension talk:Dia

Q:What does this extension do?
Could you please clarify what does this extension do. It sounds very cool (if I understand correctly), but how does it work? I see that it doesn't simply enable upload of dia files (like it is enabled on wiki e.g. for .xcf files), but you didn't specify what else does it do.

You also didn't say (at least not directly) if I need to have Dia installed for it to work. Correct me if I'm wrong, but it looks like it is needed.

You didn't say what shapes does your extension support and so I assume that your extensions is allowing MediWiki to generate thumbnails directly with the specified size by using Dia scripts.

Best regards,

Nux

A:What does this extension do?
Hi, as you have correctly assumed, this extension allows you to upload dia files directly to MediaWiki. The thumbnails are then automatically generated on-the-fly, as they are for e.g. SVG files.

I'm not sure if your question and the latest update of the Extension:Dia page have crossed, because I realized only after I published the page that I had forgotten to tell that you specifically need to allow .dia files to be submitted. I now tell this in the code snippet where the extension is loaded (see the line below that).

In the advanced configuration you can read that this extension needs an external program to provide the conversion. This is currently done by dia. (Is there anything else that can convert .dia files? I don't believe there is.) This, of course, requires Dia to be installed, but I will make this dependency a bit more explicit.

As to answer your last question, since this extension uses Dia to perform the conversion, it also means that it should support any shape that Dia itself does, meaning, if someone uploads a .dia file that uses an extra plugin or extra shapes, then you will need to install these on the server as well.

Hoping to have answered all your questions, Marcel

How can I display a dia file? (Sintaxis)

Compressed format not working
The extension works fine with MW 1.12 and the documentation is clear enough for patching file (thx for this :). However, I did notice an unexpected problem : the extension doesn't handle .dia file which are compressed. It only process .dia files that are not internally compressed.

It is not a big problem to solve when you understand what is happening, but it could be useful to mention it in the documentation. Also, if there is a way to upload compressed dia files, that could be useful as well ;) LT-P 10:59, 20 May 2008 (UTC)


 * How did you solve the problem? Of course, you can simply unpack it when it is uploaded, but then you do expect that it is always compressed. Did you find a really elegant solution that handles all cases?
 * --Olenz 14:55, 3 July 2008 (UTC)

"Cannot allocate memory"
This sounds like a nice extension. Unfortunately, I can't get it to run.

After removing the above problems (MIME types, compressed files, ...), I can now upload diagrams. Unfortunately, when the diagram is about to be rendered, I get the following message in the place where the diagram should be:

Error creating thumbnail: dia: error while loading shared libraries: libXrender.so.1: failed to map segment from shared object: Cannot allocate memory

As of July 3rd 2008, see here.

I've already tried to increase the available memory size for PHP, but to no avail.

Any hints?

--Olenz 14:43, 3 July 2008 (UTC)