Extension talk:AnyWikiDraw

I really like this very much and I would appreciate to use it. I know it is experimental, but please add a description, what still is to do until it is working.

Actually it would be nice to know about still missing functionality before installing, like the not working save-function of drawings: anything goes, but drawings are not saved and don't show up after finishing and they don't show up when trying to edit them again

Or I'm doing some mistakes? Perhaps a controlling function in the end may help, testing if saving is done properly?


 * Hi. I have added a "To Do" section to the page.
 * Apart from the known refresh problems, the save function is working. Did you enable uploading of image files to your wiki? If you are not able to upload a SVG, PNG or JPG file using the upload page of the wiki, then the drawing applet can't do it either.
 * There is a controlling function in the applet. But it might not be checking for all possible error cases. Can you please check, if PHP prints an error message on the error log of the web-server?
 * --Rawcoder 12:29, 3 August 2007 (UTC)

I get a Parse error: syntax error, unexpected T_OBJECT_OPERATOR in .../extensions/AnyWikiDraw/AnyWikiDraw.php on line 105 What version of PHP is required?


 * I have implemented this extension with PHP 5.0 in mind. I am using it currently with PHP 5.0.4.
 * --Rawcoder 13:08, 6 September 2007 (UTC)

AnyWikiDraw Can't Find Files
I've set up AnyWikiDraw 0.1 as an extension to MediaWiki 1.9.1. It works fine creating and in saving the file created. However, when trying to reedit an existing file, it gives this message:


 * Couldn't load the drawing: http://www.proper-wiki-name.org/wiki/index.php?title=Special:AnyWikiDraw?Image:Test02.svg.

When the images is actually found here:


 * http://www.proper-wiki-name.org/wiki/images/1/1f/Test02.svg

In other words, the extension seems to work fine to create and save (one time) a new drawing, but not to edit an existing drawing.

Any ideas on how to fix this?

--C4duser 15:36, 11 September 2007 (UTC)


 * Looks like AnyWikiDraw can't handle article paths in the style of {$wgScript}?title=$1.
 * With the current version of AnyWikiDraw, you need to run MediaWiki with article paths in the style of {$wgScript}/$1.
 * I am going to take a look at this problem for the next version of AnyWikiDraw. But I can't tell you right now, when the next version will be released.
 * --Rawcoder 06:08, 13 September 2007 (UTC)

I hacked away at the AnyWikiDraw code and got the code to generate a full URL for the image. Yet for some reason the JVM still fails. The URL now looks something like this: http://cicswiki.org/cicswiki1/index.php?title=Special:AnyWikiDraw?image=/cicswiki1/images/e/ea/Test.gif Is this supposed to work? In other words - if the image variable refers to a real file - is AnyWikiDraw supposed to be able to edit the file?
 * --cbooysen 208.62.154.74 19:47, 12 October 2007 (UTC)


 * The question mark may only occur once in the URL. If you change your code to insert an ampersand "&" before the word "image" it might work - at least the editor should show up with this file - saving the edited image is another story and thus might still break.
 * Also note, that AnyWikiDraw does not support the GIF format, you need to use JPG, PNG or SVG.
 * http://cicswiki.org/cicswiki1/index.php?title=Special:AnyWikiDraw&image=/cicswiki1/images/e/ea/Test.png
 * --Rawcoder 05:57, 17 October 2007 (UTC)

AnyWikiDraw working (fairly well) on MW 1.9.1
I've managed to get AnyWikiDraw to work fairly well on MediaWiki 1.9.1 and it really is a tremendous extension &mdash; IMHO much better than any of the other programs for making diagrams and drawings on MediaWiki.

The problems I've found are as follows:


 * Something in AnyWikiDraw is causing this message to appear on the background to the Special:Allmessages page: "Warning: call_user_func_array [function.call-user-func-array]: First argument is expected to be a valid callback, 'AnyWikiDraw::loadMessages' was given in /home/ .. (my path) .. /wiki/includes/Hooks.php on line 114". Doesn't seem to be a big deal because I've got this page tucked away were the public rarely sees it.
 * SVG works fine. Can edit, save, and reedit. However, thumbnails don't show up on "recent uploads" page. Instead there is the message "Error creating thumbnails".
 * PNG, jpg can produce diagrams, but can't be re-edited.

The SVG drawings are compact and of good quality, better than PNG or jpg, anyway.

--C4duser 03:24, 6 May 2008 (UTC)


 * Hi C4duser. I am glad you like AnyWikiDraw so far. :)
 * I am very interested to get a look at the code changes you made for MediaWiki 1.9.1. I am looking forward to make AnyWikiDraw work with versions higher than 1.7 of MediaWiki. My intention was to go directly from 1.7 to 1.12. But if you have it working with 1.9.1, I don't mind at all. ;)
 * The warning on call_user_func_array is probably caused by API differences betwen MediaWiki 1.7.x and 1.9.x. There might be some rewriting needed to accomodate for this.
 * For creating the thumbnails, I had copied and pasted lots of code from MediaWiki 1.7.x into the AnyWikiDraw plugin. Maybe we need to copy and paste the same code sections again from MediaWiki 1.9.x. This needs careful checking though.
 * How exactly does the re-editing of PNG and JPG images fail? AnyWikiDraw doesn't store vector data in a PNG or JPG file (for example, like Adobe Fireworks does in a PNG file). This is why, after reopening a PNG or JPG file, everything which has been drawn so far, becomes part of the background image. So, on re-edit, it is only possible to draw over the background image.
 * --Rawcoder 15:49, 13 May 2008 (UTC)