changeset 5232:ca71ebe6af6d

anywikidraw: Version 0.14 added
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Fri, 30 Oct 2009 21:03:37 +0100
parents a94fb46ff128
children ce4b90e6f512
files MoinMoin/web/static/htdocs/applets/anywikidraw/lib/AnyWikiDrawForMoinMoin.jar contrib/AnyWikiDraw/anywikidraw/anywikidraw-0.14-for-twiki-4.1.zip contrib/AnyWikiDraw/anywikidraw/anywikidraw-0.14-for-twiki-4.3.zip contrib/AnyWikiDraw/anywikidraw/mediawiki 1.12 to 1.15/extensions/AnyWikiDraw/AnyWikiDraw.body.php contrib/AnyWikiDraw/anywikidraw/mediawiki 1.12 to 1.15/extensions/AnyWikiDraw/AnyWikiDraw.i18n.php contrib/AnyWikiDraw/anywikidraw/mediawiki 1.12 to 1.15/extensions/AnyWikiDraw/AnyWikiDraw.php contrib/AnyWikiDraw/anywikidraw/mediawiki 1.12 to 1.15/extensions/AnyWikiDraw/AnyWikiDrawForMediaWiki.jar contrib/AnyWikiDraw/anywikidraw/mediawiki 1.12 to 1.15/extensions/AnyWikiDraw/AnyWikiDrawForMediaWiki.jar.pack.gz contrib/AnyWikiDraw/anywikidraw/mediawiki 1.7 to 1.10/extensions/AnyWikiDraw/AnyWikiDraw.i18n.php contrib/AnyWikiDraw/anywikidraw/mediawiki 1.7 to 1.10/extensions/AnyWikiDraw/AnyWikiDraw.php contrib/AnyWikiDraw/anywikidraw/mediawiki 1.7 to 1.10/extensions/AnyWikiDraw/AnyWikiDrawForMediaWiki.jar contrib/AnyWikiDraw/anywikidraw/mediawiki 1.7 to 1.10/extensions/AnyWikiDraw/AnyWikiDrawForMediaWiki.jar.pack.gz contrib/AnyWikiDraw/anywikidraw/mediawiki 1.7 to 1.10/extensions/AnyWikiDraw/AnyWikiDraw_body.php contrib/AnyWikiDraw/anywikidraw/moinmoin/AnyWikiDrawForMoinMoin.jar contrib/AnyWikiDraw/anywikidraw/moinmoin/AnyWikiDrawForMoinMoin.jar.pack.gz contrib/AnyWikiDraw/anywikidraw/pmwiki/cookbook/AnyWikiDraw/AnyWikiDraw.php contrib/AnyWikiDraw/anywikidraw/pmwiki/cookbook/AnyWikiDraw/AnyWikiDrawForPmWiki.jar contrib/AnyWikiDraw/anywikidraw/pmwiki/cookbook/AnyWikiDraw/AnyWikiDrawForPmWiki.jar.pack.gz contrib/AnyWikiDraw/anywikidraw/pmwiki/cookbook/AnyWikiDraw/Splash.gif contrib/AnyWikiDraw/anywikidraw/pmwiki/cookbook/AnyWikiDraw/draw/PmWikiDraw.jar contrib/AnyWikiDraw/anywikidraw/pmwiki/cookbook/AnyWikiDraw/draw/edit.gif contrib/AnyWikiDraw/anywikidraw/pmwiki/cookbook/AnyWikiDraw/draw/images/images contrib/AnyWikiDraw/anywikidraw/pmwiki/cookbook/AnyWikiDraw/draw/images/rain.gif contrib/AnyWikiDraw/anywikidraw/pmwiki/cookbook/AnyWikiDraw/draw/images/samples/Backgrounds/backgrnd.gif contrib/AnyWikiDraw/anywikidraw/pmwiki/cookbook/AnyWikiDraw/draw/images/samples/Backgrounds/bg1.gif contrib/AnyWikiDraw/anywikidraw/pmwiki/cookbook/AnyWikiDraw/draw/images/samples/Backgrounds/rain.gif contrib/AnyWikiDraw/anywikidraw/pmwiki/cookbook/AnyWikiDraw/draw/images/samples/Java_Related/DUKE.gif contrib/AnyWikiDraw/anywikidraw/pmwiki/cookbook/AnyWikiDraw/draw/images/samples/Java_Related/Juggler0.gif contrib/AnyWikiDraw/anywikidraw/pmwiki/cookbook/AnyWikiDraw/draw/images/samples/Java_Related/beans.gif contrib/AnyWikiDraw/anywikidraw/pmwiki/cookbook/AnyWikiDraw/draw/images/samples/Java_Related/javacentral.gif contrib/AnyWikiDraw/anywikidraw/pmwiki/cookbook/AnyWikiDraw/draw/images/samples/Java_Related/joe.surf.yellow.small.gif contrib/AnyWikiDraw/anywikidraw/pmwiki/cookbook/AnyWikiDraw/draw/news.gif contrib/AnyWikiDraw/anywikidraw/pmwiki/cookbook/AnyWikiDraw/draw/symbols/flags.jar contrib/AnyWikiDraw/anywikidraw/pmwiki/cookbook/AnyWikiDraw/draw/symbols/sample.jar contrib/AnyWikiDraw/anywikidraw/pmwiki/cookbook/AnyWikiDraw/draw/symbols/symbols contrib/AnyWikiDraw/anywikidraw/pmwiki/cookbook/AnyWikiDraw/edit.gif contrib/AnyWikiDraw/demo/anywikidraw_for_twiki_demo.html contrib/AnyWikiDraw/demo/data/lion.svg contrib/AnyWikiDraw/demo/lib/Splash.gif contrib/AnyWikiDraw/guide/contents/changes.html contrib/AnyWikiDraw/guide/contents/copyright.html contrib/AnyWikiDraw/guide/contents/license.html contrib/AnyWikiDraw/guide/contents/mediawiki.html contrib/AnyWikiDraw/guide/contents/moinmoin.html contrib/AnyWikiDraw/guide/contents/pmwiki.html contrib/AnyWikiDraw/guide/contents/readme.html contrib/AnyWikiDraw/guide/contents/style.css contrib/AnyWikiDraw/guide/contents/twiki.html contrib/AnyWikiDraw/guide/index.html contrib/AnyWikiDraw/guide/nav.html contrib/AnyWikiDraw/src.tar.bz
diffstat 51 files changed, 2963 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
Binary file MoinMoin/web/static/htdocs/applets/anywikidraw/lib/AnyWikiDrawForMoinMoin.jar has changed
Binary file contrib/AnyWikiDraw/anywikidraw/anywikidraw-0.14-for-twiki-4.1.zip has changed
Binary file contrib/AnyWikiDraw/anywikidraw/anywikidraw-0.14-for-twiki-4.3.zip has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/AnyWikiDraw/anywikidraw/mediawiki 1.12 to 1.15/extensions/AnyWikiDraw/AnyWikiDraw.body.php	Fri Oct 30 21:03:37 2009 +0100
@@ -0,0 +1,288 @@
+<?php
+/*
+ * @(#)AnyWikiDraw_body.php  
+ *
+ * Copyright (c) 2007-2009 by the original authors of AnyWikiDraw
+ * and all its contributors.
+ * All rights reserved.
+ *
+ * The copyright of this software is owned by the authors and  
+ * contributors of the AnyWikiDraw project ("the copyright holders").
+ * You may not use, copy or modify this software, except in  
+ * accordance with the license agreement you entered into with  
+ * the copyright holders. For details see accompanying license terms. 
+ */
+
+/**
+ * --------
+ * WARNING: This is an extension for MediaWiki 1.12 through 1.15 only.
+ * Do not use it with other versions of MediaWiki without extensive testing!
+ * --------
+ *
+ * This file contains the AnyWikiDraw special page.
+ *
+ * The special page displays a description of AnyWikiDraw, and it is
+ * used by the applet to download and upload an image to the Wiki.
+ *
+ * @author Werner Randelshofer
+ * @version $Id: AnyWikiDraw.body.php 131 2009-07-08 20:24:04Z rawcoder $
+ */
+
+class AnyWikiDraw extends SpecialPage {
+	/**#@+
+	 * @access private
+	 */
+	var $mUploadDescription, $mLicense, $mUploadOldVersion;
+	var $mUploadCopyStatus, $mUploadSource, $mWatchthis;
+	
+	static $version = "0.13";
+	
+	function AnyWikiDraw() {
+		SpecialPage::SpecialPage("AnyWikiDraw");
+		wfLoadExtensionMessages('AnyWikiDraw');
+
+		$this->mUploadDescription = '';
+		$this->mLicense = '';
+		$this->mUploadCopyStatus = '';
+		$this->mUploadSource = '';
+		$this->mWatchthis = false;
+	}
+	
+	function execute( $par ) {
+		global $wgRequest, $wgOut;
+		
+		if ($wgRequest->wasPosted()) {
+			$this->processUpload();
+			
+		} else if (strlen($wgRequest->getVal("image","")) > 0) {
+			$this->processDownload();
+		} else {
+			$this->setHeaders();
+		
+			# Get request data from, e.g.
+			# $param = $wgRequest->getText('param');
+			$hasErrors = false;
+				
+            # Check uploading enabled
+            global $wgEnableUploads, $wgSitename;
+        	if( !$wgEnableUploads ) {
+				$hasErrors = true;
+    			$wgOut->addWikiText(
+        			wfMsg('anywikidraw_upload_disabled', $wgSitename)
+                );
+            } 
+
+            # Check cookies available to Java
+            global $wgCookieHttpOnly;
+        	if( $wgCookieHttpOnly ) {
+				$hasErrors = true;
+	   			$wgOut->addWikiText(
+        			wfMsg('anywikidraw_cookie_http_only', $wgSitename)
+                );
+            } 
+
+
+            # Check file extensions enabled
+            global $wgFileExtensions;
+            $requiredExtensions = array("svg",/*"svgz",*/"png","jpg");
+            $missingExtensions = array();
+            foreach ($requiredExtensions as $ext) {
+                if (! in_array($ext, $wgFileExtensions)) {
+                    $missingExtensions[] = $ext;
+                }
+            }
+            if (count($missingExtensions) == 1) {
+				$hasErrors = true;
+    			$wgOut->addWikiText(
+        			wfMsg('anywikidraw_extension_disabled', $wgSitename, ".".implode(", .", $missingExtensions) )
+                );
+            } else if (count($missingExtensions) > 1) {
+				$hasErrors = true;
+    			$wgOut->addWikiText(
+        			wfMsg('anywikidraw_extensions_disabled', $wgSitename, ".".implode(", .", $missingExtensions) )
+                );
+            }
+		
+			# Show information about AnyWikiDraw
+			if (! $hasErrors) {
+    	        global $wgAnyWikiDrawVersion;
+				$wgOut->addWikiText(
+					wfMsg('anywikidraw_about', AnyWikiDraw::$version)
+				);
+			}
+			// Output
+			// $wgOut->addHTML( $output );
+		}
+	}
+	
+	function processUpload() {
+		global $wgRequest, $wgOut;
+		
+		// Fill in the form data as needed by the upload form
+		$wgRequest->data['wpDestFile'] = $wgRequest->data['DrawingName'];
+		$wgRequest->data['wpIgnoreWarning'] = '1';
+		$wgRequest->data['wpDestFileWarningAck'] ='1';
+		$wgRequest->data['wpUploadDescription'] = $wgRequest->data['UploadSummary'];
+		$wgRequest->data['wpUploadFile'] = $wgRequest->data['DrawingData'];
+		$_FILES['wpUploadFile'] = $_FILES['DrawingData'];
+		$wgRequest->data['action'] = $wgRequest->data['Action'];
+
+		// Upload the drawing		
+		$form = new UploadForm($wgRequest);
+		$details = null;
+		$outcome = $form->internalProcessUpload($details);
+		
+
+		$drawingTempFile = $wgRequest->getFileTempName('DrawingData');
+		$renderedTempFile = $wgRequest->getFileTempName('RenderedImageData');
+		$imageMapTempFile =  $wgRequest->getFileTempName('ImageMapData');
+	
+		// If we were successful so far, look whether a rendered image of the
+		// drawing has been uploaded as well.
+		if ($outcome == UploadForm::SUCCESS && $renderedTempFile != null) {
+		
+			$img = $form->mLocalFile; 
+			$thumbDir = $img->getThumbPath();
+			$params = array( 'width' => $img->getWidth() );
+			$thumbName = $img->thumbName($params);
+			
+			if ($thumbName) {
+				// Look at the contents of the file; if we can recognize the
+				// type but it's corrupt or data of the wrong type, we should
+				// probably not accept it.
+				$veri = $form->verify( $renderedTempFile, 'png' );
+				if ($veri) {
+					// Provide an opportunity for extensions to add further checks
+					$error = '';
+					if( !wfRunHooks( 'UploadVerification',
+						array( $thumbName, $renderedTempFile, &$error ) ) ) {
+						
+						$veri = false;
+					}
+				}
+				
+				
+				if ($veri) {
+					if (!file_exists($thumbDir)) {
+						$thumbDirExists = wfMkdirParents($thumbDir);
+					} else {
+                        $thumbDirExists = true;
+                    }
+                    if ($thumbDirExists) {
+                        move_uploaded_file($renderedTempFile, $thumbDir.'/'.$thumbName);
+                    }
+				}
+			}				
+		}
+		
+		// Get rid of uploaded files
+		if (file_exists($drawingTempFile)) { unlink($drawingTempFile); }
+		if (file_exists($renderedTempFile)) { unlink($renderedTempFile); }
+		if (file_exists($imageMapTempFile)) { unlink($imageMapTempFile); }
+				
+	
+		// Return outcome along with an appropriate error message to the client	
+		switch ($outcome) {
+			case  UploadForm::SUCCESS :
+				header('HTTP/1.0 200 OK');
+				echo('<html><body>Success.</body></html>');
+				break;
+				
+			case  UploadForm::BEFORE_PROCESSING :
+				header('HTTP/1.0 500 Internal Server Error');
+				echo('<html><body>Hook UploadForm:BeforeProcessing broke processing the file.</body></html>');
+				break;
+				
+			case  UploadForm::LARGE_FILE_SERVER :
+				header('HTTP/1.0 500 Internal Server Error');
+				echo('<html><body>'.wfMsgHtml( 'largefileserver' ).'</body></html>');
+				break;
+				
+			case  UploadForm::EMPTY_FILE :
+				header('HTTP/1.0 400 Bad Request');
+				echo('<html><body>'.wfMsgHtml( 'emptyfile' ).'</body></html>');
+				break;
+				
+			case  UploadForm::MIN_LENGTH_PARTNAME :
+				header('HTTP/1.0 400 Bad Request');
+				echo('<html><body>'.wfMsgHtml( 'minlength1' ).'</body></html>');
+				break;
+				
+			case  UploadForm::ILLEGAL_FILENAME :
+				header('HTTP/1.0 400 Bad Request');
+				echo('<html><body>'.wfMsgHtml( 'illegalfilename', htmlspecialchars($wgRequest->data('DrawingName'))).'</body></html>');
+				break;
+				
+			case  UploadForm::PROTECTED_PAGE :
+				header('HTTP/1.0 403 Forbidden');
+				echo('<html><body>');
+				echo('<p>You are not allowed to change this drawing:</p>');
+				$this->echoDetails($details['permissionserrors']);
+				echo('</body></html>');
+				break;
+				
+			case  UploadForm::OVERWRITE_EXISTING_FILE :
+				header('HTTP/1.0 403 Forbidden');
+				echo('<html><body>You may not overwrite the existing drawing.</body></html>');
+				break;
+				
+			case  UploadForm::FILETYPE_MISSING :
+				header('HTTP/1.0 400 Bad Request');
+				echo('<html><body>The type of the uploaded file is not explicitly allowed.</body></html>');
+				break;
+				
+			case  UploadForm::FILETYPE_BADTYPE :
+				header('HTTP/1.0 400 Bad Request');
+				echo('<html><body>The type of the uploaded file is explicitly disallowed.</body></html>');
+				break;
+				
+			case  UploadForm::VERIFICATION_ERROR :
+				header('HTTP/1.0 400 Bad Request');
+				echo('<html><body>');
+				echo('<p>The uploaded file did not pass server verification.</p>');
+				echo('</body></html>');
+				break;
+				
+			case  UploadForm::UPLOAD_VERIFICATION_ERROR :
+				header('HTTP/1.0 403 Bad Request');
+				echo('<html><body>');
+				echo('<p>The uploaded file did not pass server verification:</p>');
+				$this->echoDetails($details['error']);
+				echo('</body></html>');
+				break;
+				
+			case  UploadForm::UPLOAD_WARNING :
+				header('HTTP/1.0 400 Bad Request');
+				echo('<html><body>');
+				echo('<p>The server issued a warning for this file:</p>');
+				$this->echoDetails($details['warning']);
+				echo('</body></html>');
+				break;
+				
+			case  UploadForm::INTERNAL_ERROR :
+				header('HTTP/1.0 500 Internal Server Error');
+				echo('<html><body>');
+				echo('<p>Function UploadForm:internalProcessUpload encountered an internal error.</p>');
+				echo('<p>'.$details['internal'].'</p>');
+				echo('</body></html>');
+				break;
+				
+			default :
+				header('HTTP/1.0 500 Internal Server Error');
+				echo('<html><body>Function UploadForm:internalProcessUpload returned an unknown code: '.$outcome.'.</body></html>');
+				break;
+		}
+		exit();
+	}
+	
+	function echoDetails($msg) {
+		if (is_array($msg)) {
+			foreach ($msg as $submsg) {
+				$this->echoDetails($submsg);
+			}
+		} else {
+			echo('</p>'.$msg.'</p>');
+		}
+	}
+}
+?>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/AnyWikiDraw/anywikidraw/mediawiki 1.12 to 1.15/extensions/AnyWikiDraw/AnyWikiDraw.i18n.php	Fri Oct 30 21:03:37 2009 +0100
@@ -0,0 +1,48 @@
+<?php
+/*
+ * @(#)AnyWikiDraw.i18n.php  
+ *
+ * Copyright (c) 2007-2009 by the original authors of AnyWikiDraw
+ * and all its contributors.
+ * All rights reserved.
+ *
+ * The copyright of this software is owned by the authors and  
+ * contributors of the AnyWikiDraw project ("the copyright holders").
+ * You may not use, copy or modify this software, except in  
+ * accordance with the license agreement you entered into with  
+ * the copyright holders. For details see accompanying license terms. 
+ */
+
+/**
+ * --------
+ * WARNING: This is an extension for MediaWiki 1.12 through 1.15 only.
+ * Do not use it with other versions of MediaWiki without extensive testing!
+ * --------
+ *
+ * Internationalisation file for AnyWikiDraw_body.php.
+ *
+ * @author Werner Randelshofer
+ * @version $Id: AnyWikiDraw.i18n.php 120 2009-06-28 08:05:06Z rawcoder $
+ */
+$messages = array();
+$messages['en'] = array(
+    'anywikidraw' => 'AnyWikiDraw Drawing Extension',
+    'anywikidraw_about' => '<p>On this Wiki the AnyWikiDraw $1 Drawing Extension is installed.</p>'.
+        '<p>With this extension, you can edit drawings directly inside of a Wiki page.</p>'.
+        '<p>To include a drawing in a page, use a tag of the form '.
+        '<b><nowiki>{{&#35;drawing:File.svg|width|height}}</nowiki></b>.</p>'.
+        '<p>For example '.
+        '<b><nowiki>{{&#35;drawing:HappyFace.svg|400|300}}</nowiki></b>.</p>'.
+        '<p>The following filename extensions are supported: .svg, .png, .jpg.</p>'.
+        '<p>If the file doesn\'t exist, it will be created the first time a drawing has been edited.</p>'.
+        '<p>All files that have been created using this extension are listed on the [[Special:Imagelist|file list]] special page.',
+    'anywikidraw_license_terms_new_work' => 'By saving your work you agree to the license terms of this Wiki. '.
+        '<br>For more information see $1. ',
+    'anywikidraw_license_terms_derived_work' => 'By saving your changes you agree to the terms given by the copyright holder of the original work. '.
+        '<br>For more information see $2. ',
+    'anywikidraw_upload_disabled' => '<p><b>You can not edit drawings using AnyWikiDraw, because you have not enabled file uploading using <code>$wgEnableUploads=true;</code> in LocalSettings.php.</b></p>',
+    'anywikidraw_cookie_http_only' => '<p><b>You can not edit drawings using AnyWikiDraw, because you have not made cookies accessible to Java applets using <code>$wgCookieHttpOnly=false;</code> in LocalSettings.php.</b></p>',
+    'anywikidraw_extension_disabled' => '<p><b>You can not edit drawings with extension $2 using AnyWikiDraw, because you have not enabled this extension using <code>$wgFileExtensions[] = \'$2\';</code> in LocalSettings.php.</b></p>',
+    'anywikidraw_extensions_blacklisted' => '<p><b>You can not edit drawings with extensions $2 using AnyWikiDraw, because you have explicitly blocked this extension using <code>$wgFileBlacklist = \'$2\';</code> in LocalSettings.php.</b></p>',
+);
+?>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/AnyWikiDraw/anywikidraw/mediawiki 1.12 to 1.15/extensions/AnyWikiDraw/AnyWikiDraw.php	Fri Oct 30 21:03:37 2009 +0100
@@ -0,0 +1,291 @@
+<?php
+/*
+ * @(#)AnyWikiDraw.php  
+ *
+ * Copyright (c) 2007-2009 by the original authors of AnyWikiDraw
+ * and all its contributors.
+ *
+ * The copyright of this software is owned by the authors and  
+ * contributors of the AnyWikiDraw project ("the copyright holders").
+ * You may not use, copy or modify this software, except in  
+ * accordance with the license agreement you entered into with  
+ * the copyright holders. For details see accompanying license terms. 
+ */
+
+/**
+ * --------
+ * WARNING: This is an extension for MediaWiki 1.12 through 1.15 only.
+ * Do not use it with other versions of MediaWiki without extensive testing!
+ * --------
+ *
+ * With the AnyWikiDraw extension it is possible to define new tags of the form
+ *
+ * {{#drawing:image.svg|width|height}}
+ *
+ # - The tag needs to be put into two curly braces.
+ * - The name of the tag is #drawing:
+ * - The parameter image.svg specifies the name of the image file. 
+ * - If you specify an image file that does not yet exist in your Wiki, the image 
+ *   is created the first time you save a drawing.
+ * - The parameter width specifies the width of the image.
+ * - The parameter height specifies the height of the image.
+ *
+ * The enable drawing for the image HappyWiki.svg, which has a width of 400 and
+ * a height of 300 pixels, insert the following tag into a page:
+ *
+ * {{#drawing:HappyDrawing.svg|300|200}}
+ *
+ * To activate the extension, include it from your LocalSettings.php
+ * with: 
+ *
+ * require_once("$IP/extensions/AnyWikiDraw/AnyWikiDraw.php"); 
+ * 
+ * @author Werner Randelshofer
+ * @version $Id: AnyWikiDraw.php 131 2009-07-08 20:24:04Z rawcoder $
+ */
+
+# Add a hook for the parser function setup function
+$wgExtensionFunctions[] = 'efAnyWikiDrawParserFunction_Setup';
+$wgHooks['LanguageGetMagic'][] = 'efAnyWikiDrawParserFunction_Magic';
+
+# Add a hook for the special page
+$wgAutoloadClasses['AnyWikiDraw'] = dirname(__FILE__) . '/AnyWikiDraw.body.php';
+$wgExtensionMessagesFiles['AnyWikiDraw'] = dirname(__FILE__) . '/AnyWikiDraw.i18n.php';
+$wgSpecialPages['AnyWikiDraw'] = 'AnyWikiDraw';
+
+# Setup the AnyWikDraw parser function
+function efAnyWikiDrawParserFunction_Setup() {
+    # Setup AnyWikiDraw Version
+    global $wgAnywikidrawVersion;
+    $wgAnyWikiDrawVersion = '0.13.2';
+
+    # Setup messages
+    global $wgMessageCache;
+    require( dirname( __FILE__ ) . '/AnyWikiDraw.i18n.php' );
+    foreach ( $messages as $lang => $langMessages ) {
+        $wgMessageCache->addMessages( $langMessages, $lang );
+    }
+
+    # Setup extension credits
+    $wgExtensionCredits['parserhook'][] = array(
+       'name' => 'AnyWikiDraw',
+       'version' => $wgAnyWikiDrawVersion,
+       'author' =>'Werner Randelshofer', 
+       'url' => 'http://sourceforge.net/projects/anywikidraw', 
+       'description' => 'The AnyWikiDraw extensions adds a <nowiki>{{#drawing:}}</nowiki> tag to the MediaWiki parser which allows to edit SVG, PNG and JPEG images directly in a page using a Java applet.'
+       );
+
+	# Setup function hook associating the "drawing" magic word with our function
+	global $wgParser;
+	$wgParser->setFunctionHook( 'drawing', 'efAnyWikiDrawParserFunction_Render' );
+
+}
+
+function efAnyWikiDrawParserFunction_Magic( &$magicWords, $langCode ) {
+	# Add the magic word
+	# The first array element is case sensitive, in this case it is not case sensitive
+	# All remaining elements are synonyms for our parser function
+	$magicWords['drawing'] = array( 0, 'drawing' );
+	# unless we return true, other parser functions extensions won't get loaded.
+	return true;
+}
+
+function efAnyWikiDrawParserFunction_Render( &$parser, $name = null, $width = null, $height = null ) {
+	global $wgUser, $wgLang, $wgTitle, $wgRightsText, $wgOut, $wgArticlePath, $wgScriptPath, $wgEnableUploads;
+	$skin = $wgUser->getSkin();
+
+	// Don't cache pages with drawings on it
+	$parser->disableCache();
+	
+	# Validate parameters
+	$error = '';
+	if ($name == null || strlen($name) == 0) {
+		$error .= '<br>Please specify a name for your drawing.';
+	}
+	if ($width != null && 
+			(! is_numeric($width) || $width < 1 || $width > 2000)) {
+		$error .= '<br>Please specify the width as a number between 1 and 2000 or leave it away.';
+	}
+	if ($height != null && 
+			(! is_numeric($height) || $height < 1 || $height > 2000)) {
+		$error .= '<br>Please specify the height as a number between 1 and 2000 or leave it away.';
+	}
+	if (strlen($error) > 0) {
+		$error = '<b>Sorry.</b>'.$error.'<br>'.
+				'Usage: <code>{{#drawing:<i>image.svg</i>|<i>width</i>||<i>height</i>}}</code><br>'.
+				'Example: <code>{{#drawing:HappyDrawing.svg|400|300}}</code><br>';
+		return array($error, 'isHTML'=>true, 'noparse'=>true);
+	}
+
+	# The parser function itself
+	# The input parameters are wikitext with templates expanded
+	# The output should be wikitext too, but in this case, it is HTML
+	#return array("param1 is $param1 and param2 is $param2", 'isHTML');
+	
+	# Generate the image HTML as if viewed by a web request
+	$image = wfFindFile($name);
+	
+	
+	$isProtected = $parser->getTitle()->isProtected();
+	
+	if ($width == null && $image != null && $image->getWidth() != -1) {
+			$width = $image->getWidth();
+	}
+	if ($height == null && $image != null && $image->getHeight() != -1) {
+		$height = $image->getHeight();
+	}
+		
+	// render a header
+	$output = '<table><tr><td>';
+	if ($wgEnableUploads && ! $isProtected && 
+			key_exists('drawingtitle', $_POST) && 
+			$_POST['drawingtitle'] == $name) {
+		
+		// edit the drawing using the applet
+        $uploadURL = str_replace('$1', 'Special:AnyWikiDraw', $wgArticlePath);
+		$output .= 
+				'<a name="anywikidraw" id="anywikidraw">'.
+				'<applet codebase="/"'. 
+				' archive="'.$wgScriptPath.'/extensions/AnyWikiDraw/AnyWikiDrawForMediaWiki.jar"'.
+				' code="org.anywikidraw.mediawiki.MediaWikiDrawingApplet.class"'.
+				' width="'.htmlspecialchars(min(max($width+4, 600), 800)).'"'.
+                ' height="'.htmlspecialchars(min(max($height+240, 480), 600)).'"'.
+                ' mayscript'.
+				'>'.
+
+           // The following parameters are used to tell AnyWikiDraw how to communicate with MediaWiki:
+
+				//'<script type="text/javascript">document.write(\'<param name="Cookies" value="\'+document.cookie+\'"/>\');</script>'.
+				'<param name="DrawingName" value="'.htmlspecialchars($name).'"/>'.
+				'<param name="DrawingWidth" value="'.htmlspecialchars($width).'"/>'.
+				'<param name="DrawingHeight" value="'.htmlspecialchars($height).'"/>'.
+				(($image !== false) ? '<param name="DrawingURL" value="'.$image->getFullUrl().'">' : '').
+				'<param name="PageURL" value="'.htmlspecialchars($wgTitle->getLocalURL()).'">'.
+				'<param name="UploadURL" value="'.$uploadURL.'">'.
+
+           // The following parameters are used to configure the drawing applet: 
+
+                '<param name="Locale" value="'.$wgUser->getOption('language','en').'"/>'.
+           
+           // The following parameters are used to configure Sun's Java Plug-In: 
+
+                '<param name="codebase_lookup" value="false"/>'.
+                '<param name="classloader_cache" value="false"/>'.
+                '<param name="java_arguments" value="-Djnlp.packEnabled=true"/>'.
+                '<param name="image" value="lib/Splash.gif"/>'.
+                '<param name="boxborder" value="false"/>'.
+                '<param name="centerimage" value="true"/>'.
+
+				'</applet>'.
+				'</a>'
+                ;
+			
+		$output .= '<div style="'.
+					'background-color: #C9CDD6; border: 1px solid #ccc; padding: 5px 10px 5px 10px; text-align: left; '.
+					'font-size: 12px; line-height: 16px; '.
+					'">'.
+					wfMsg(($image === false) ? 'anywikidraw_license_terms_new_work' : 'anywikidraw_license_terms_derived_work',
+					'<a href='.wfMsgForContent('copyrightpage').'>'.wfMsg('copyrightpage').'</a>', '<a href="./Image:'.$name.'">Image:'.$name.'</a>').
+					'</div>';
+	} else {
+		// Retrieve the page object of the image to determine, whether the user may edit it
+		$filtered = preg_replace ( "/[^".Title::legalChars()."]|:/", '-', $name );
+		$nt = Title::newFromText( $filtered );
+		if(! is_null( $nt ) ) {
+			$nt =& Title::makeTitle( NS_IMAGE, $nt->getDBkey() );
+		}
+
+        // Determine if the user has permission to edit the image
+		$userCanEdit = $wgEnableUploads && 
+                    !$isProtected && 
+                    (is_null($nt) || $nt->userCanEdit()) &&
+                    (is_null($image) || $wgUser->isAllowed( 'reupload' ));
+        /*$output .= 'enableUploads='.$wgEnableUploads.','.
+                'isProtected='.$isProtected.','.
+                'page.userCanEdit='.(is_null($nt) ? 'null' : $nt->userCanEdit()).','.
+                'image.exists='.$image->exists().','.
+                'user.reupload allowed='.$wgUser->isAllowed( 'reupload' );
+        */
+
+        // Determine if the user may edit images using the specified 
+        // filename extension.
+        if ($userCanEdit) {
+            $extension = array_pop(explode( '.', $filtered ));
+            global $wgFileExtensions;
+            $userCanEdit = in_array($extension, $wgFileExtensions);
+        }
+		
+		
+		// If the user can edit the image, display an edit link.
+        // We do not display the edit link, if the user is already
+        // editing a drawing.
+		if ($userCanEdit && ! key_exists('drawingtitle', $_POST)) {
+			$formId = 'Form'.rand();
+            global $wgUsePathInfo;
+            if ($wgUsePathInfo) {
+                $action = $wgTitle->getLocalURL().'#anywikidraw';
+            } else {
+                //$action = str_replace('?','#anywikidraw?',$wgTitle->getLocalURL());
+                $action = $wgTitle->getLocalURL();
+            }
+			$output .= '<form name="'.$formId.'" method="post" action="'.$action.'">'.
+					'<input type="hidden" name="drawingtitle" value="'.htmlspecialchars($name).'">'.
+					'<p align="right">'.
+					'[<a href="javascript:document.'.$formId.'.submit();">'.wfMsg('edit').'</a>]'.
+					'<noscript><input type="submit" name="submit" value="'.wfMsg('edit').'"></input></noscript>'.
+					'</p>'
+					;
+		}
+		// render the drawing
+		if ($image === false) {
+			// the drawing does not exist yet, render an empty rectangle
+			$output .= '<div style="border:1px solid #000;text-align:center;'.
+				(($width != null) ? 'width:'.$width.'px;' : '').
+				(($height != null) ? 'height:'.$height.'px;' : '').'"'.
+				'>'.htmlspecialchars($name).'</div>';
+		} else {
+			// Render an img tag
+			// Render the image map, if it exists
+			$thumbnail = $image->getThumbnail($width);
+			$isImageMap = $thumbnail != null && file_exists($thumbnail->path.'.map');
+			$mapId = 'Map_'.$name.'_'.rand();
+			if ($isImageMap) {
+				$output .= '<map name="'.$mapId.'">'.
+					file_get_contents($thumbnail->path.'.map').
+					'</map>';
+			}
+			// Render the image
+			if (! $isImageMap) {
+				$output .= '<a href="./Image:'.$name.'">';
+			}
+            // Note: We append the timestamp of the image to the
+            //       view URL as a query string. This way, we ensure,
+            //       that the browser always displays the last edited version
+            //       of the image
+			$output .= '<img '.
+				'src="'.$image->getViewUrl().
+                    '?version='.$image->nextHistoryLine()->img_timestamp.'" '.
+				(($width != null) ? 'width="'.$width.'" ' : '').
+				(($height != null) ? 'height="'.$height.'" ' : '').
+				'alt="Image:'.$name.'" '.
+				'title="Image:'.$name.'" '.
+				(($isImageMap) ? 'usemap="#'.$mapId.'" ' : '').
+				'></img>';
+			if (! $isImageMap) {
+				$output .= '</a>';
+			}
+		}
+		// If the user can edit the image, display an edit link.
+        // We do not display the edit link, if the user is already
+        // editing a drawing.
+		if ($userCanEdit && ! key_exists('drawingtitle', $_POST)) {
+			$output .= '</form>';
+		}
+	}
+	
+	// render a footer
+	$output .= '</tr></td></table>';
+	
+	return array($output, 'isHTML'=>true, 'noparse'=>true);
+}
+?>
\ No newline at end of file
Binary file contrib/AnyWikiDraw/anywikidraw/mediawiki 1.12 to 1.15/extensions/AnyWikiDraw/AnyWikiDrawForMediaWiki.jar has changed
Binary file contrib/AnyWikiDraw/anywikidraw/mediawiki 1.12 to 1.15/extensions/AnyWikiDraw/AnyWikiDrawForMediaWiki.jar.pack.gz has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/AnyWikiDraw/anywikidraw/mediawiki 1.7 to 1.10/extensions/AnyWikiDraw/AnyWikiDraw.i18n.php	Fri Oct 30 21:03:37 2009 +0100
@@ -0,0 +1,47 @@
+<?php
+/*
+ * @(#)AnyWikiDraw.i18n.php
+ *
+ * Copyright (c) 2007-2008 by the original authors of AnyWikiDraw
+ * and all its contributors.
+ * All rights reserved.
+ *
+ * The copyright of this software is owned by the authors and  
+ * contributors of the AnyWikiDraw project ("the copyright holders").
+ * You may not use, copy or modify this software, except in  
+ * accordance with the license agreement you entered into with  
+ * the copyright holders. For details see accompanying license terms. 
+ */
+
+/**
+ * --------
+ * WARNING: This is an extension for MediaWiki 1.7 through 1.10 only.
+ * Do not use it with other versions of MediaWiki without extensive testing!
+ * --------
+ *
+ * Internationalisation file for AnyWikiDraw_body.php.
+ *
+ * @author Werner Randelshofer
+ * @version $Id: AnyWikiDraw.i18n.php 127 2009-07-05 12:04:33Z rawcoder $
+ */
+$messages = array();
+$messages['en'] = array(
+    'anywikidraw' => 'AnyWikiDraw Drawing Extension',
+    'anywikidraw_about' => '<p>On this Wiki the AnyWikiDraw Drawing Extension $1 is installed.</p>'.
+        '<p>With this extension, you can edit drawings directly inside of a Wiki page.</p>'.
+        '<p>To include a drawing in a page, use a tag of the form '.
+        '<b><nowiki>{{&#35;drawing:File.svg|width|height}}</nowiki></b>.</p>'.
+        '<p>For example '.
+        '<b><nowiki>{{&#35;drawing:HappyFace.svg|400|300}}</nowiki></b>.</p>'.
+        '<p>The following filename extensions are supported: .svg, .png, .jpg.</p>'.
+        '<p>If the file doesn\'t exist, it will be created the first time a drawing has been edited.</p>'.
+        '<p>All files that have been created using this extension are listed on the [[Special:Imagelist|file list]] special page.',
+    'anywikidraw_license_terms_new_work' => 'By saving your work you agree to the license terms of this Wiki. '.
+        '<br>For more information see $1. ',
+    'anywikidraw_license_terms_derived_work' => 'By saving your changes you agree to the terms given by the copyright holder of the original work. '.
+        '<br>For more information see $2. ',
+    'anywikidraw_upload_disabled' => '<p><b>You can not edit drawings using AnyWikiDraw, because File uploads are disabled on $1.</b></p>',
+    'anywikidraw_extension_disabled' => '<p><b>You can not edit drawings with extension $2 using AnyWikiDraw, because this extension is disabled on $1.</b></p>',
+    'anywikidraw_extensions_disabled' => '<p><b>You can not edit drawings with extensions $2 using AnyWikiDraw, because these extensions are disabled on $1.</b></p>',
+);
+?>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/AnyWikiDraw/anywikidraw/mediawiki 1.7 to 1.10/extensions/AnyWikiDraw/AnyWikiDraw.php	Fri Oct 30 21:03:37 2009 +0100
@@ -0,0 +1,294 @@
+<?php
+/*
+ * @(#)AnyWikiDraw.php  
+ *
+ * Copyright (c) 2007-2008 by the original authors of AnyWikiDraw
+ * and all its contributors.
+ * All rights reserved.
+ *
+ * The copyright of this software is owned by the authors and  
+ * contributors of the AnyWikiDraw project ("the copyright holders").
+ * You may not use, copy or modify this software, except in  
+ * accordance with the license agreement you entered into with  
+ * the copyright holders. For details see accompanying license terms. 
+ */
+
+/**
+ * --------
+ * WARNING: This is an extension for MediaWiki 1.7 through 1.10 only.
+ * Do not use it with other versions of MediaWiki without extensive testing!
+ * --------
+ *
+ * With the AnyWikiDraw extension it is possible to define new tags of the form
+ *
+ * {{#drawing:image.svg|width|height}}
+ *
+ * - The tag needs to be put into two curly braces.
+ * - The name of the tag is #drawing:
+ * - The parameter image.svg specifies the name of the image file. 
+ * - If you specify an image file that does not yet exist in your Wiki, the image 
+ *   is created the first time you save a drawing.
+ * - The parameter width specifies the width of the image.
+ * - The parameter height specifies the height of the image.
+ *
+ * The enable drawing for the image HappyWiki.svg, which has a width of 400 and
+ * a height of 300 pixels, insert the following tag into a page:
+ *
+ * {{#drawing:HappyDrawing.svg|300|200}}
+ *
+ * To activate the extension, include it from your LocalSettings.php
+ * with: include("extensions/AnyWikiDraw/AnyWikiDraw.php"); 
+ *
+ * @author Werner Randelshofer
+ * @version $Id: AnyWikiDraw.php 127 2009-07-05 12:04:33Z rawcoder $
+ */
+
+
+# AnyWikiDraw Version
+global $wgAnywikidrawVersion;
+$wgAnyWikiDrawVersion = '0.13.2';
+
+# Define a setup function
+$wgExtensionFunctions[] = 'wfAnyWikiDrawParserFunction_Setup';
+
+# Add a hook to initialise the magic word
+$wgHooks['LanguageGetMagic'][]       = 'wfAnyWikiDrawParserFunction_Magic';
+
+# Define a special page
+$wgAutoloadClasses['AnyWikiDraw'] = dirname(__FILE__) . '/AnyWikiDraw_body.php';
+$wgSpecialPages['AnyWikiDraw'] = 'AnyWikiDraw';
+$wgHooks['LoadAllMessages'][] = 'wfAnyWikiDrawLoadMessages';
+
+
+function wfAnyWikiDrawParserFunction_Setup() {
+	global $wgParser;
+	# Set a function hook associating the "drawing" magic word with our function
+	$wgParser->setFunctionHook( 'drawing', 'wfAnyWikiDrawParserFunction_Render' );
+}
+
+function wfAnyWikiDrawParserFunction_Magic( &$magicWords, $langCode ) {
+	# Add the magic word
+	# The first array element is case sensitive, in this case it is not case sensitive
+	# All remaining elements are synonyms for our parser function
+	$magicWords['drawing'] = array( 0, 'drawing' );
+	# unless we return true, other parser functions extensions won't get loaded.
+	return true;
+}
+
+function wfAnyWikiDrawParserFunction_Render( &$parser, $name = null, $width = null, $height = null ) {
+	global $wgUser, $wgLang, $wgTitle, $wgRightsText, $wgOut, $wgArticlePath, $wgScriptPath, $wgEnableUploads;
+	$skin = $wgUser->getSkin();
+	wfAnyWikiDrawLoadMessages();
+
+	// Don't cache pages with drawings on it
+	$parser->disableCache();
+	
+	# Validate parameters
+	$error = '';
+	if ($name == null || strlen($name) == 0) {
+		$error .= '<br>Please specify a name for your drawing.';
+	}
+	if ($width != null && 
+			(! is_numeric($width) || $width < 1 || $width > 2000)) {
+		$error .= '<br>Please specify the width as a number between 1 and 2000 or leave it away.';
+	}
+	if ($height != null && 
+			(! is_numeric($height) || $height < 1 || $height > 2000)) {
+		$error .= '<br>Please specify the height as a number between 1 and 2000 or leave it away.';
+	}
+	if (strlen($error) > 0) {
+		$error = '<b>Sorry.</b>'.$error.'<br>'.
+				'Usage: <code>{{#drawing:<i>image.svg</i>|<i>width</i>||<i>height</i>}}</code><br>'.
+				'Example: <code>{{#drawing:HappyDrawing.svg|400|300}}</code><br>';
+		return array($error, 'isHTML'=>true, 'noparse'=>true);
+	}
+
+	# The parser function itself
+	# The input parameters are wikitext with templates expanded
+	# The output should be wikitext too, but in this case, it is HTML
+	#return array("param1 is $param1 and param2 is $param2", 'isHTML');
+	
+	# Generate the image HTML as if viewed by a web request
+	$image = Image::newFromName($name);
+	
+	
+	$isProtected = $parser->getTitle()->isProtected();
+	
+	if ($width == null && $image->getWidth() != -1) {
+			$width = $image->getWidth();
+	}
+	if ($height == null && $image->getHeight() != -1) {
+		$height = $image->getHeight();
+	}
+		
+	// render a header
+	$output = '<table><tr><td>';
+	if ($wgEnableUploads && ! $isProtected &&
+			key_exists('drawingtitle', $_POST) && 
+			$_POST['drawingtitle'] == $name) {
+		
+		// edit the drawing using the applet
+        global $wgUsePathInfo;
+        if ($wgUsePathInfo) {
+            $downloadURL = str_replace('$1', 'Special:AnyWikiDraw?image='.htmlspecialchars($image->getName()), $wgArticlePath);
+        } else {
+            $downloadURL = str_replace('$1', 'Special:AnyWikiDraw&image='.htmlspecialchars($image->getName()), $wgArticlePath);
+        }
+        $uploadURL = str_replace('$1', 'Special:AnyWikiDraw', $wgArticlePath);
+		$output .= 
+				'<a name="anywikidraw" id="anywikidraw">'.
+				'<applet codebase="/" archive="'.$wgScriptPath.'/extensions/AnyWikiDraw/AnyWikiDrawForMediaWiki.jar"'. 
+				' code="org.anywikidraw.mediawiki.MediaWikiDrawingApplet.class"'.
+				' width="'.htmlspecialchars(min(max($width+4, 600), 800)).'" '.
+                ' height="'.htmlspecialchars(min(max($height+140, 480), 600)).'">'.
+
+           // The following parameters are used to tell AnyWikiDraw how to communicate with MediaWiki:
+
+				'<param name="DrawingName" value="'.htmlspecialchars($name).'">'.
+				'<param name="DrawingWidth" value="'.htmlspecialchars($width).'">'.
+				'<param name="DrawingHeight" value="'.htmlspecialchars($height).'">'.
+				(($image->getURL() !== '') ? '<param name="DrawingURL" value="'.$downloadURL.'">' : '').
+				'<param name="PageURL" value="'.htmlspecialchars($wgTitle->getLocalURL()).'">'.
+				'<param name="UploadURL" value="'.$uploadURL.'">'.
+
+           // The following parameters are used to configure the drawing applet: 
+
+                '<param name="Locale" value="'.$wgUser->getOption('language','en').'"/>'.
+           
+           // The following parameters are used to configure Sun's Java Plug-In: 
+
+                '<param name="codebase_lookup" value="false"/>'.
+                '<param name="classloader_cache" value="false"/>'.
+                '<param name="java_arguments" value="-Djnlp.packEnabled=true"/>'.
+                '<param name="image" value="lib/Splash.gif"/>'.
+                '<param name="boxborder" value="false"/>'.
+                '<param name="centerimage" value="true"/>'.
+
+				'</applet>'.
+				'</a>';
+			
+		$output .= '<div style="'.
+					'background-color: #C9CDD6; border: 1px solid #ccc; padding: 5px 10px 5px 10px; text-align: left; '.
+					'font-size: 12px; line-height: 16px; '.
+					'">'.
+					wfMsg(($image->getURL() == '') ? 'anywikidraw_license_terms_new_work' : 'anywikidraw_license_terms_derived_work',
+					'<a href='.wfMsgForContent('copyrightpage').'>'.wfMsg('copyrightpage').'</a>', '<a href="./Image:'.$name.'">Image:'.$name.'</a>').
+					'</div>';
+	} else {
+		// Retrieve the page object of the image to determine, whether the user may edit it
+		$filtered = preg_replace ( "/[^".Title::legalChars()."]|:/", '-', $name );
+		$nt = Title::newFromText( $filtered );
+		if(! is_null( $nt ) ) {
+			$nt =& Title::makeTitle( NS_IMAGE, $nt->getDBkey() );
+		}
+
+        // Determine if the user has permission to edit the image
+		$userCanEdit = $wgEnableUploads && 
+                    !$isProtected && 
+                    (is_null($nt) || $nt->userCanEdit()) &&
+                    ($image->getURL() == null || $wgUser->isAllowed( 'reupload' ));
+
+        // Determine if the user may edit images using the specified 
+        // filename extension.
+        if ($userCanEdit) {
+            $extension = array_pop(explode( '.', $filtered ));
+            global $wgFileExtensions;
+            $userCanEdit = in_array($extension, $wgFileExtensions);
+        }
+		
+		// If the user can edit the image, display an edit link.
+        // We do not display the edit link, if the user is already
+        // editing a drawing.
+		if ($userCanEdit && ! key_exists('drawingtitle', $_POST)) {
+			$formId = 'Form'.rand();
+            global $wgUsePathInfo;
+            if ($wgUsePathInfo) {
+                $action = $wgTitle->getLocalURL().'#anywikidraw';
+            } else {
+                //$action = str_replace('?','#anywikidraw?',$wgTitle->getLocalURL());
+                $action = $wgTitle->getLocalURL();
+            }
+			$output .= '<form name="'.$formId.'" method="post" action="'.$action.'">'.
+					'<input type="hidden" name="drawingtitle" value="'.htmlspecialchars($name).'">'.
+					'<p align="right">'.
+					'[<a href="javascript:document.'.$formId.'.submit();">'.wfMsg('edit').'</a>]'.
+					'<noscript><input type="submit" name="submit" value="'.wfMsg('edit').'"></input></noscript>'.
+					'</p>'
+					;
+		}
+		// render the drawing
+		$image->width = $width; // FIXME This is an ugly hack to get a view URL
+		$viewURL = $image->getViewURL();
+		
+		if ($image->getURL() == '') {
+			// the drawing does not exist yet, render an empty rectangle
+			$output .= '<div style="border:1px solid #000;text-align:center;'.
+				(($width != null) ? 'width:'.$width.'px;' : '').
+				(($height != null) ? 'height:'.$height.'px;' : '').'"'.
+				'>'.htmlspecialchars($name).'</div>';
+		} else if (substr($name,-4) == '.svg' && $viewURL == null) {
+			// SVG images need an object tag
+			$output .= '<object '.
+				'type="image/svg+xml" '.
+				'data="'.(($viewURL != null) ? $viewURL : $image->getURL()).'" '.
+				(($width != null) ? 'width="'.$width.'" ' : '').
+				(($height != null) ? 'height="'.$height.'" ' : '').
+				'></object>';
+		} else {
+			// All other image types need an img tag
+			// Render the image map, if it exists
+			$thumbnail = $image->getThumbnail($width);
+			$isImageMap = $thumbnail != null && file_exists($thumbnail->path.'.map');
+			$mapId = 'Map'.rand();
+			if ($isImageMap) {
+				$output .= '<map name="'.$mapId.'">'.
+					file_get_contents($thumbnail->path.'.map').
+					'</map>';
+			}
+			// Render the image
+			if (! $isImageMap) {
+				$output .= '<a href="./Image:'.$name.'">';
+			}
+            // Note: We append the timestamp of the image to the
+            //       view URL as a query string. This way, we ensure,
+            //       that the browser always displays the last edited version
+            //       of the image
+			$output .= '<img '.
+				'src="'.(($viewURL != null) ? $viewURL : $image->getURL()).
+                    '?version='.$image->nextHistoryLine()->img_timestamp.'" '.
+				(($width != null) ? 'width="'.$width.'" ' : '').
+				(($height != null) ? 'height="'.$height.'" ' : '').
+				'alt="Image:'.$name.'" '.
+				'title="Image:'.$name.'" '.
+				(($isImageMap) ? 'usemap="#'.$mapId.'" ' : '').
+				'></img>';
+			if (! $isImageMap) {
+				$output .= '</a>';
+			}
+		}
+		// If the user can edit the image, display an edit link.
+        // We do not display the edit link, if the user is already
+        // editing a drawing.
+		if ($userCanEdit && ! key_exists('drawingtitle', $_POST)) {
+			$output .= '</form>';
+		}
+	}
+	
+	// render a footer
+	$output .= '</tr></td></table>';
+	
+	return array($output, 'isHTML'=>true, 'noparse'=>true);
+}
+
+function wfAnyWikiDrawLoadMessages() {
+		global $wgAnyWikiDrawMessagesLoaded;
+		global $wgMessageCache;
+		if ( $wgAnyWikiDrawMessagesLoaded ) return;
+		$wgAnyWikiDrawMessagesLoaded = true;
+
+		require( dirname( __FILE__ ) . '/AnyWikiDraw.i18n.php' );
+		foreach ( $messages as $lang => $msgs ) {
+				$wgMessageCache->addMessages( $msgs, $lang );
+		}
+}
+?>
\ No newline at end of file
Binary file contrib/AnyWikiDraw/anywikidraw/mediawiki 1.7 to 1.10/extensions/AnyWikiDraw/AnyWikiDrawForMediaWiki.jar has changed
Binary file contrib/AnyWikiDraw/anywikidraw/mediawiki 1.7 to 1.10/extensions/AnyWikiDraw/AnyWikiDrawForMediaWiki.jar.pack.gz has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/AnyWikiDraw/anywikidraw/mediawiki 1.7 to 1.10/extensions/AnyWikiDraw/AnyWikiDraw_body.php	Fri Oct 30 21:03:37 2009 +0100
@@ -0,0 +1,593 @@
+<?php
+/*
+ * @(#)AnyWikiDraw_body.php 
+ *
+ * Copyright (c) 2007-2008 by the original authors of AnyWikiDraw
+ * and all its contributors.
+ * All rights reserved.
+ *
+ * The copyright of this software is owned by the authors and  
+ * contributors of the AnyWikiDraw project ("the copyright holders").
+ * You may not use, copy or modify this software, except in  
+ * accordance with the license agreement you entered into with  
+ * the copyright holders. For details see accompanying license terms. 
+ */
+
+/**
+ * --------
+ * WARNING: This is an extension for MediaWiki 1.7 through 1.10 only.
+ * Do not use it with other versions of MediaWiki without extensive testing!
+ * --------
+ *
+ * This file contains the AnyWikiDraw special page.
+ *
+ * The special page displays a description of AnyWikiDraw, and it is
+ * used by the applet to download and upload an image to the Wiki.
+ *
+ * @author Werner Randelshofer
+ * @version $Id: AnyWikiDraw_body.php 120 2009-06-28 08:05:06Z rawcoder $
+ */
+
+include 'SpecialUpload.php';
+
+class AnyWikiDraw extends SpecialPage {
+	/**#@+
+	 * @access private
+	 */
+	var $mUploadDescription, $mLicense, $mUploadOldVersion;
+	var $mUploadCopyStatus, $mUploadSource, $mWatchthis;
+	
+	function AnyWikiDraw() {
+		SpecialPage::SpecialPage("AnyWikiDraw");
+		self::loadMessages();
+
+		$this->mUploadDescription = '';
+		$this->mLicense = '';
+		$this->mUploadCopyStatus = '';
+		$this->mUploadSource = '';
+		$this->mWatchthis = false;
+	}
+	
+	function execute( $par ) {
+		global $wgRequest, $wgOut;
+		
+		if ($wgRequest->wasPosted()) {
+			$this->processUpload();
+		} else if (strlen($wgRequest->getVal("image","")) > 0) {
+			$this->processDownload();
+		} else {
+			$this->setHeaders();
+		
+			# Get request data from, e.g.
+			# $param = $wgRequest->getText('param');
+				
+			# Show information about AnyWikiDraw
+            global $wgAnyWikiDrawVersion;
+			$wgOut->addWikiText(
+				wfMsg('anywikidraw_about', $wgAnyWikiDrawVersion)
+			);
+
+            # Check uploading enabled
+            global $wgEnableUploads, $wgSitename;
+        	if( !$wgEnableUploads ) {
+    			$wgOut->addWikiText(
+        			wfMsg('anywikidraw_upload_disabled', $wgSitename)
+                );
+            } 
+
+            # Check file extensions enabled
+            global $wgFileExtensions;
+            $requiredExtensions = array("svg","png","jpg");
+            $missingExtensions = array();
+            foreach ($requiredExtensions as $ext) {
+                if (! in_array($ext, $wgFileExtensions)) {
+                    $missingExtensions[] = $ext;
+                }
+            }
+            if (count($missingExtensions) == 1) {
+    			$wgOut->addWikiText(
+        			wfMsg('anywikidraw_extension_disabled', $wgSitename, ".".implode(", .", $missingExtensions) )
+                );
+            } else if (count($missingExtensions) > 1) {
+    			$wgOut->addWikiText(
+        			wfMsg('anywikidraw_extensions_disabled', $wgSitename, ".".implode(", .", $missingExtensions) )
+                );
+            }
+		
+
+		
+			// Output
+			// $wgOut->addHTML( $output );
+		}
+	}
+	
+	/** I BORROWED THIS FUNCTION FROM SpecialUpload.php!! CHECK FOR EACH VERSION OF MEDIAWIKI, IF
+	 *  THIS FUNCTION STILL MAKES SENSE!
+	 *
+	 */
+	function processUpload() {
+		global $wgUser, $wgUploadDirectory, $wgRequest;
+		
+		$fname= "AnyWikiDraw_body::processUpload";
+
+		// Retrieve form fields
+		$drawingName = $wgRequest->getText('DrawingName');
+		$drawingWidth = $wgRequest->getText('DrawingWidth');
+		$drawingHeight = $wgRequest->getText('DrawingHeight');
+		$drawingTempFile =  $wgRequest->getFileTempName('DrawingData');
+		$drawingFileSize = $wgRequest->getFileSize( 'DrawingData' );
+		$drawingUploadError = $wgRequest->getUploadError('DrawingData');
+		$renderedTempFile =  $wgRequest->getFileTempName('RenderedImageData');
+		$renderedFileSize = $wgRequest->getFileSize( 'RenderedImageData' );
+		$renderedUploadError = $wgRequest->getUploadError('RenderedImageData');
+		$imageMapTempFile =  $wgRequest->getFileTempName('ImageMapData');
+		$imageMapFileSize = $wgRequest->getFileSize( 'ImageMapData' );
+		$imageMapUploadError = $wgRequest->getUploadError('ImageMapData');
+		$uploadSummary = $wgRequest->getText('UploadSummary');
+		
+		// validate image dimension
+		if (! is_numeric($drawingWidth) || $drawingWidth < 1) {
+			$drawingWidth = null;
+		}
+		if (! is_numeric($drawingHeight) || $drawingHeight < 1) {
+			$drawingHeight = null;
+		}
+
+		# If there was no filename or no image data, give up quickly.
+		if (strlen($drawingName) == 0 || $drawingFileSize == 0) {
+			wfDebug('[client '.$_SERVER["REMOTE_ADDR"].']'.
+					'[user '.$wgUser->getName().'] '.
+					$fname.' received bad request [DrawingName='.$drawingName.']'.
+					'[fileSize(DrawingData)='.$drawingFileSize.']'
+			);
+			header('HTTP/1.0 400 Bad Request');
+			exit("\n\n"+'<html><body>DrawingName and DrawingData must be supplied.</body></html>');
+		}
+
+		// Verify filename
+		# Chop off any directories in the given filename.
+		$drawingName = wfBaseName($drawingName);
+		$imageExtension = substr(strrchr($drawingName, '.'), 1);
+		
+		# Only allow filenames with known extensions
+		$allowedExtensions = array('svg', 'svgz', 'png', 'jpg');
+		if (! in_array($imageExtension, $allowedExtensions)) {
+			wfDebug('[client '.$_SERVER["REMOTE_ADDR"].']'.
+					'[user '.$wgUser->getName().'] '.
+					$fname.' Received bad image extension [DrawingName='.$drawingName.']');
+			header('HTTP/1.0 400 Bad Request');
+			exit("\n\n"+'<html><body>DrawingName must have one of the following extensions: '.
+					implode(',', $allowedExtensions).
+				'.</body></html>');
+		}
+
+		/**
+		 * Filter out illegal characters, and try to make a legible name
+		 * out of it. We'll strip some silently that Title would die on.
+		 */
+		$filtered = preg_replace ( "/[^".Title::legalChars()."]|:/", '-', $drawingName );
+		$nt = Title::newFromText( $filtered );
+		if( is_null( $nt ) ) {
+			wfDebug('[client '.$_SERVER["REMOTE_ADDR"].']'.
+					'[user '.$wgUser->getName().'] '.
+					$fname.' Received bad image name [DrawingName='.$drawingName.']');
+			header('HTTP/1.0 400 Bad Request');
+			exit("\n\n"+'<html><body>DrawingName must contain legible characters only.</body></html>');
+		}
+		$nt =& Title::makeTitle( NS_IMAGE, $nt->getDBkey() );
+		$uploadSaveName = $nt->getDBkey();
+		
+		
+		/**
+		 * If the image is protected, non-sysop users won't be able
+		 * to modify it by uploading a new revision.
+		 */
+		if( !$nt->userCanEdit() ) {
+			wfDebug('[client '.$_SERVER["REMOTE_ADDR"].']'.
+					'[user '.$wgUser->getName().'] '.
+					$fname.' image is protected [DrawingName='.$drawingName.']');
+			header('HTTP/1.0 403 Forbidden');
+			exit("\n\n"+'<html><body>You are not allowed to edit this image.</body></html>');
+		}
+
+		/**
+		 * In some cases we may forbid overwriting of existing files.
+		 */
+		if( !$this->userCanOverwrite($uploadSaveName) ) {
+			wfDebug('[client '.$_SERVER["REMOTE_ADDR"].']'.
+					'[user '.$wgUser->getName().'] '.
+					$fname.' image may not be overwritten [DrawingName='.$drawingName.']');
+			header('HTTP/1.0 403 Forbidden');
+			exit("\n\n"+'<html><body>You are not allowed to overwrite this image.</body></html>');
+		}
+		
+		/** Check if the image directory is writeable, this is a common mistake */
+		if( !is_writeable( $wgUploadDirectory ) ) {
+			header('HTTP/1.0 403 Forbidden');
+			exit("\n\n"+'<html><body>The upload directory on the server is read only.</body></html>');
+		}
+		
+		/**
+		 * Upload the file into the temp directory, so that we can scrutinize its content
+		 */
+		$archive = wfImageArchiveDir( $uploadSaveName, 'temp' );
+		
+		/**
+		 * Look at the contents of the file; if we can recognize the
+		 * type but it's corrupt or data of the wrong type, we should
+		 * probably not accept it.
+		 */
+		$veri = $this->verify( $drawingTempFile, $imageExtension );
+		if( $veri !== true ) { 
+			wfDebug('[client '.$_SERVER["REMOTE_ADDR"].']'.
+					'[user '.$wgUser->getName().'] '.
+					$fname.' image failed verification [DrawingName='.$drawingName.'][DrawingTempFile='.$drawingTempFile.']');
+			unlink($drawingTempFile);
+			header('HTTP/1.0 400 Bad Request');
+			exit("\n\n"+'<html><body>The image data is corrupt.</body></html>');
+		}
+
+		/**
+		 * Provide an opportunity for extensions to add further checks
+		 */
+		$error = '';
+		if( !wfRunHooks( 'UploadVerification',
+				array( $uploadSaveName, $drawingTempFile, &$error ) ) ) {
+			wfDebug('[client '.$_SERVER["REMOTE_ADDR"].']'.
+					'[user '.$wgUser->getName().'] '.
+					$fname.' image failed extended verification [DrawingName='.$drawingName.']');
+			unlink($drawingTempFile);
+			header('HTTP/1.0 400 Bad Request');
+			exit("\n\n"+'<html><body>The image data does not match the image name extension.</body></html>');
+		}
+
+	
+		/**
+		 * Try actually saving the thing...
+		 * It will show an error form on failure.
+		 */
+		if( $this->saveUploadedFile( $uploadSaveName,
+		                             $drawingTempFile,
+		                             true ) ) {
+			/**
+			 * Update the upload log and create the description page
+			 * if it's a new file.
+			 */
+			$img = Image::newFromName( $uploadSaveName );
+			if ($drawingWidth != null) {
+				$img->width = $drawingWidth;
+			}
+			if ($drawingHeight != null) {
+				$img->height = $drawingHeight;
+			}
+			$this->mUploadDescription = $uploadSummary;
+
+			$success = $img->recordUpload( $this->mUploadOldVersion,
+			                                $this->mUploadDescription,
+			                                $this->mLicense,
+			                                $this->mUploadCopyStatus,
+			                                $this->mUploadSource,
+			                                $this->mWatchthis );
+			                                
+			/**
+			 * Save the rendered image, if one was provided
+			 */
+			 if ($renderedTempFile != null && $drawingWidth != null)
+			 {
+				$thumbName = $img->thumbName($drawingWidth, $img->fromSharedDirectory );
+				$thumbDir = wfImageThumbDir( $img->name, $img->fromSharedDirectory );
+				$thumbPath = $thumbDir.'/'.$thumbName;
+				wfDebug("we have a rendered image: ".$renderedTempFile.' width='.$drawingWidth.' height='.$drawingHeight.' thumbName='.$thumbPath );
+				if (!file_exists(dirname($thumbPath))) {
+					mkdir(dirname($thumbPath), 0777, true);
+				}
+				// Look at the contents of the file; if we can recognize the
+				// type but it's corrupt or data of the wrong type, we should
+				// probably not accept it.
+				$veri = $this->verify( $renderedTempFile, 'png' );
+				if( $veri !== true ) { 
+					wfDebug('[client '.$_SERVER["REMOTE_ADDR"].']'.
+						'[user '.$wgUser->getName().'] '.
+						$fname.' rendered image failed verification [DrawingName='.$drawingName.'][RenderedTempFile='.$renderedTempFile.']');
+					unlink($renderedTempFile);
+				} else {
+					move_uploaded_file($renderedTempFile, $thumbPath);
+				}
+			 } else {
+			 	if ($renderedTempFile!= null) {
+			 		unlink($renderedTempFile);
+			 	}
+			 }
+
+			/**
+			 * Save the image map, if one was provided
+			 */
+			 if ($imageMapTempFile != null && $drawingWidth != null)
+			 {
+				$thumbName = $img->thumbName($drawingWidth, $img->fromSharedDirectory );
+				$thumbDir = wfImageThumbDir( $img->name, $img->fromSharedDirectory );
+				$imageMapPath = $thumbDir.'/'.$thumbName.'.map';
+				wfDebug("we have an image map: ".$imageMapTempFile);
+				if (!file_exists(dirname($imageMapPath))) {
+					mkdir(dirname($imageMapPath), 0777, true);
+				}
+				// Look at the contents of the file; if we can recognize the
+				// type but it's corrupt or data of the wrong type, we should
+				// probably not accept it.
+				$hasScript = $this->detectScript( $imageMapTempFile, 'text/html', 'html' );
+				if( $hasScript !== false ) { 
+					wfDebug('[client '.$_SERVER["REMOTE_ADDR"].']'.
+						'[user '.$wgUser->getName().'] '.
+						$fname.' image map failed verification [DrawingName='.$drawingName.'][ImageMapTempFile='.$imageMapTempFile.']');
+					unlink($imageMapTempFile);
+				} else {
+					move_uploaded_file($imageMapTempFile, $imageMapPath);
+				}
+			 } else {
+			 	if ($imageMapTempFile!= null) {
+			 		unlink($imageMapTempFile);
+			 	}
+			 }
+
+
+			if ( $success ) {
+				$this->showSuccess();
+				wfRunHooks( 'UploadComplete', array( &$img ) );
+			} else {
+				// Image::recordUpload() fails if the image went missing, which is
+				// unlikely, hence the lack of a specialised message
+				$wgOut->showFileNotFoundError( $this->mUploadSaveName );
+			}
+		}
+		if ($renderedTempFile!= null) {
+			unlink($renderedTempFile);
+	 	}
+		if ($imageMapTempFile!= null) {
+			unlink($imageMapTempFile);
+	 	}
+	}
+	
+	/** Downloads the specified image to the applet, and disallows caching by the browser.
+	 * We need this function, because if we retrieve an image using the MediaWiki
+	 * image URL, the image gets cached by the browser. This is very bad for editing,
+	 * because we wan't to edit the newest version of the image only.
+	 */
+	function processDownload() {
+		global $wgRequest;
+	
+		$name = $wgRequest->getVal("image","");
+		$image = Image::newFromName($name);
+		$imagePath = $image->getImagePath();
+		if ($imagePath != null && file_exists($imagePath) && $filehandle=fopen($imagePath,'r')) {
+			header('Last-Modified: '.date(DATE_RFC822, filectime($imagePath)));
+			header('Cache-Control: no-cache');
+			if ($image->getMimeType() == 'image/svg') {
+				header('Content-Type: image/svg+xml');
+			} else {
+				header('Content-Type: '.$image->getMimeType());
+			}
+			header('Content-Length: '.filesize($imagePath));
+			fpassthru($filehandle);
+			fclose($filehandle);
+			exit;
+		} else {
+			header('HTTP/1.0 404 Not Found');
+			echo 'image '.$name.' not found'; // do we need to i18n this? It's never displayed to a user.
+			exit;
+		}
+	}
+	/**
+	 * Show some text and linkage on successful upload.
+	 * @access private
+	 */
+	function showSuccess() {
+		header('HTTP/1.0 200 OK');
+		exit;
+	}
+
+	/** I BORROWED THIS FUNCTION FROM SpecialUpload.php!! CHECK FOR EACH VERSION OF MEDIAWIKI, IF
+	 *  THIS FUNCTION STILL MAKES SENSE!
+	 *
+	 * Move the uploaded file from its temporary location to the final
+	 * destination. If a previous version of the file exists, move
+	 * it into the archive subdirectory.
+	 *
+	 * @todo If the later save fails, we may have disappeared the original file.
+	 *
+	 * @param string $saveName
+	 * @param string $tempName full path to the temporary file
+	 * @param bool $useRename if true, doesn't check that the source file
+	 *                        is a PHP-managed upload temporary
+	 */
+	function saveUploadedFile( $saveName, $tempName, $useRename = false ) {
+		global $wgOut, $wgAllowCopyUploads;
+		
+		$fname= "SpecialUpload::saveUploadedFile";
+		
+		if ( !$useRename && $wgAllowCopyUploads && $this->mSourceType == 'web' ) {
+			$useRename = true;
+		}
+
+		$dest = wfImageDir( $saveName );
+		$archive = wfImageArchiveDir( $saveName );
+		if ( !is_dir( $dest ) ) wfMkdirParents( $dest );
+		if ( !is_dir( $archive ) ) wfMkdirParents( $archive );
+		
+		$this->mSavedFile = "{$dest}/{$saveName}";
+
+		if( is_file( $this->mSavedFile ) ) {
+			$this->mUploadOldVersion = gmdate( 'YmdHis' ) . "!{$saveName}";
+			wfSuppressWarnings();
+			$success = rename( $this->mSavedFile, "${archive}/{$this->mUploadOldVersion}" );
+			wfRestoreWarnings();
+
+			if( ! $success ) {
+				$wgOut->showFileRenameError( $this->mSavedFile,
+				  "${archive}/{$this->mUploadOldVersion}" );
+				return false;
+			}
+			else wfDebug("$fname: moved file ".$this->mSavedFile." to ${archive}/{$this->mUploadOldVersion}\n");
+		}
+		else {
+			$this->mUploadOldVersion = '';
+		}
+
+		wfSuppressWarnings();
+		$success = $useRename
+			? rename( $tempName, $this->mSavedFile )
+			: move_uploaded_file( $tempName, $this->mSavedFile );
+		wfRestoreWarnings();
+
+		if( ! $success ) {
+			$wgOut->showFileCopyError( $tempName, $this->mSavedFile );
+			return false;
+		} else {
+			wfDebug("$fname: wrote tempfile $tempName to ".$this->mSavedFile."\n");
+		}
+
+		chmod( $this->mSavedFile, 0644 );
+		return true;
+	}
+	
+	function loadMessages() {
+		static $messagesLoaded = false;
+		global $wgMessageCache;
+		if ( $messagesLoaded ) return;
+		$messagesLoaded = true;
+
+		require( dirname( __FILE__ ) . '/AnyWikiDraw.i18n.php' );
+		foreach ( $messages as $lang => $msgs ) {
+				$wgMessageCache->addMessages( $msgs, $lang );
+		}
+        return true;
+	}
+
+	/** I BORROWED THIS FUNCTION FROM SpecialUpload.php!! CHECK FOR EACH VERSION OF MEDIAWIKI, IF
+	 *  THIS FUNCTION STILL MAKES SENSE!
+	 *
+	 * Check if there's an overwrite conflict and, if so, if restrictions
+	 * forbid this user from performing the upload.
+	 *
+	 * @return true on success, false on failure
+	 * @access private
+	 */
+	function userCanOverwrite( $name ) {
+		$img = Image::newFromName( $name );
+		if( is_null( $img ) ) {
+			// Uh... this shouldn't happen ;)
+			// But if it does, fall through to previous behavior
+			return false;
+		}
+
+		if( $img->exists() ) {
+			global $wgUser, $wgOut;
+			if( $img->isLocal() ) {
+				if( !$wgUser->isAllowed( 'reupload' ) ) {
+					return false;
+				}
+			} else {
+				if( !$wgUser->isAllowed( 'reupload' ) ||
+				    !$wgUser->isAllowed( 'reupload-shared' ) ) {
+				    return false;
+				}
+			}
+		}
+
+		// Rockin', go ahead and upload
+		return true;
+	}
+	
+	/**
+	 * Verifies that it's ok to include the uploaded file
+	 *
+	 * @param string $tmpfile the full path of the temporary file to verify
+	 * @param string $extension The filename extension that the file is to be served with
+	 * @return mixed true of the file is verified, a WikiError object otherwise.
+	 */
+	function verify( $tmpfile, $extension ) {
+		$fname= "AnyWikiDraw_body::verify";
+		
+		#magically determine mime type
+		// BEGIN PATCH MediaWiki 1.7.1
+		//$magic=& MimeMagic::singleton();
+		//$mime= $magic->guessMimeType($tmpfile,false);
+		$magic=& wfGetMimeMagic();
+		$mime= $magic->guessMimeType($tmpfile,false);
+		// END PATCH MediaWiki 1.7.1
+
+		#check mime type, if desired
+		global $wgVerifyMimeType;
+		if ($wgVerifyMimeType) {
+
+			#check mime type against file extension
+			if( !$this->verifyExtension( $mime, $extension ) ) {
+				//return new WikiErrorMsg( 'uploadcorrupt' );
+				return false;
+			}
+			/*
+			#check mime type blacklist
+			global $wgMimeTypeBlacklist;
+			if( isset($wgMimeTypeBlacklist) && !is_null($wgMimeTypeBlacklist)
+				&& $this->checkFileExtension( $mime, $wgMimeTypeBlacklist ) ) {
+				//return new WikiErrorMsg( 'badfiletype', htmlspecialchars( $mime ) );
+				wfDebug($fname.' badfiletype');
+				return false;
+			}*/
+		}
+
+		#check for htmlish code and javascript
+		if( $this->detectScript ( $tmpfile, $mime, $extension ) ) {
+			//return new WikiErrorMsg( 'uploadscripted' );
+				wfDebug($fname.' uploadscripted');
+			return false;
+		}
+
+		/**
+		* Scan the uploaded file for viruses
+		*/
+		$virus= $this->detectVirus($tmpfile);
+		if ( $virus ) {
+			//return new WikiErrorMsg( 'uploadvirus', htmlspecialchars($virus) );
+				wfDebug($fname.' uploadvirus');
+			return false;
+		}
+
+		//wfDebug( "$fname: all clear; passing.\n" );
+		return true;
+	}
+	/** 
+	 * Checks if the mime type of the uploaded file matches the file extension.
+	 *
+	 * @param string $mime the mime type of the uploaded file
+	 * @param string $extension The filename extension that the file is to be served with
+	 * @return bool
+	 */
+	function verifyExtension( $mime, $extension ) {
+		return UploadForm::verifyExtension($mime, $extension);
+	}
+	/** Heuristig for detecting files that *could* contain JavaScript instructions or
+	* things that may look like HTML to a browser and are thus
+	* potentially harmful. The present implementation will produce false positives in some situations.
+	*
+	* @param string $file Pathname to the temporary upload file
+	* @param string $mime The mime type of the file
+	* @param string $extension The extension of the file
+	* @return bool true if the file contains something looking like embedded scripts
+	*/
+	function detectScript($file, $mime, $extension) {
+		return UploadForm::detectScript($file, $mime, $extension);
+	}
+	/** Generic wrapper function for a virus scanner program.
+	* This relies on the $wgAntivirus and $wgAntivirusSetup variables.
+	* $wgAntivirusRequired may be used to deny upload if the scan fails.
+	*
+	* @param string $file Pathname to the temporary upload file
+	* @return mixed false if not virus is found, NULL if the scan fails or is disabled,
+	*         or a string containing feedback from the virus scanner if a virus was found.
+	*         If textual feedback is missing but a virus was found, this function returns true.
+	*/
+	function detectVirus($file) {
+		return UploadForm::detectVirus($file);
+	}
+}
+?>
\ No newline at end of file
Binary file contrib/AnyWikiDraw/anywikidraw/moinmoin/AnyWikiDrawForMoinMoin.jar has changed
Binary file contrib/AnyWikiDraw/anywikidraw/moinmoin/AnyWikiDrawForMoinMoin.jar.pack.gz has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/AnyWikiDraw/anywikidraw/pmwiki/cookbook/AnyWikiDraw/AnyWikiDraw.php	Fri Oct 30 21:03:37 2009 +0100
@@ -0,0 +1,744 @@
+<?php
+ # Embeds the AnyWikiDraw Plugin from the AnyWikiDraw project
+ # (http://sourceforge.net/projects/anywikidraw) 
+ # 
+ # This plugin/Cookbook script can be fairly destructive, so
+ # be careful, anything and everything that does or could go
+ # wrong is your problem not mine, sorry! (I've not had any problems
+ # myself, but as it accesses files on your system, it may go horribly
+ # wrong, who knows!)
+ #
+ # docs see http://www.pmwiki.org/wiki/Cookbook/PmWikiDraw
+ #
+ # @version $Id: AnyWikiDraw.php 107 2009-06-15 19:33:05Z rawcoder $
+ # @author Werner Randelshofer
+ #
+ # This script is mostly a copy of the pmwikdraw.php script by Ciaran Jessup and Knut Albol
+ #
+
+// Security check.
+if (!defined('PmWiki')) exit(); 
+ 
+//---------------- Global Configuration Variables ----------------
+SDV($PmWikiDrawPubUrl, $PubDirUrl);
+$CookbookDirURL = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['SCRIPT_NAME'].'/../cookbook';
+SDV($EnableDrawingDebug, false);
+SDV($EnableDrawingVersioning , false); 
+SDV($EnableDrawingRecentChanges, false);
+SDV($drawingExtraColors, ""); 
+SDV($drawingCompatibilityMode, false);
+SDV($displayDrawingHistoryFmt, "<a class='pmwikidrawlink' href='\$showHistoryUrl' title='$[Image history]'><img src='\$pubdirurl/drawing/news.gif'/></a>");
+SDV($displayDrawingEditFmt, "<a class='pmwikidrawlink' href='\$editImageUrl' title='$[Edit Image]'><img src='".$CookbookDirURL."/AnyWikiDraw/edit.gif'/></a>");
+
+// css style for drawing caption
+#$HTMLStylesFmt[] = ".pmwikidraweditlink { font-size:70%; font-weight:bold; }\n"; 
+
+// Add extra colors to the fill/color menus.
+#$drawingExtraColors = "Aquamarine=#70DB93,New Tan=EBC79E,Sea Green=238E68,Motorola Blue=#3ff"; 
+// -----------------------------------------------------------------------------------------------------------------
+
+//-------------------- Globally executed code --------------------
+
+// Work out which version of PmWiki we're looking at :)
+preg_match('/.*-(\\d+)/',$Version,$match);
+$pmwikiver = $match[1];
+if($pmwikiver <= 1) {
+     echo "PmWikiDraw no longer supports PmWiki1, please upgrade to PmWiki2. Thanks.";
+	exit();
+}
+
+// Add in our required file extensions and associate the new markup. 
+SDVA($UploadExts,  array(
+	'gif' => 'image/gif', 
+	'draw' => 'text/plain', 
+	'map' => 'text/plain',
+	'png' => 'image/png', 
+	'jpg' => 'image/jpeg', 
+	'jpeg' => 'image/jpeg', 
+	'svg' => 'image/svg+xml'
+));
+Markup('drawing','inline', "/\\(:drawing\\s*(\\w[-.\\w]*\\w)\\s*(?:|\\s*(\\d+))*\\s*:\\)/e", "drawing('$1')");
+SDV($HandleActions['imagehistory'],'HandleImageHistory');
+SDV($HandleActions['postDrawing'], 'HandlePostDrawing');
+
+// Modify global variables based on the current action type.
+if ($action=='editimage')
+  { $editImage = true; } 
+else 
+  { $editImage = false; }
+
+if($action=='print' || $action=='publish' || $action=='editimage' || $action=='edit') { 
+	 // Hide the edit & history links when printing/publishing/editing
+	$displayDrawingEditFmt = ""; 
+	$displayDrawingHistoryFmt = "";
+} 
+
+if (!$EnableDrawingVersioning)
+  { $displayDrawingHistoryFmt = ""; }
+
+// ------------------- Handle the drawing markup --------------------------------
+function drawing($str) {
+  global $EnableUpload;
+  
+  $output = "";
+
+  if($EnableUpload != 1) { // Helpful hint to make sure people turn on uploads!
+     $output.= "<b>Please note your administrator *NEEDS* to enable uploads before you can save your drawings.</b><br/>";
+  } 
+
+
+  $drawing = $str;
+  $pos = strrpos($drawing, '.');
+  $filenameExtension = ($pos == false) ? '' : strtolower(substr($drawing, $pos + 1));
+  if (in_array($filenameExtension, array('','draw'))) {
+    $output .= drawing_draw($str);
+  } else {
+    $output .= drawing_any($str);
+  }
+  return Keep($output);
+}
+
+// ------------------- Handle the drawing markup for all file formats except .draw --------------------------------
+function drawing_any($str) {
+  global $action, $group, $pagename, $ScriptUrl, $UploadPrefixFmt;
+  global $UploadUrlFmt, $UploadDir, $editImage, $displayDrawingEditFmt, $EnableDrawingDebug; 
+  global $drawing, $editImageUrl, $drawingExtraColors, $EnableDrawingVersioning;
+  global $pubdirurl, $PmWikiDrawPubUrl, $showHistoryUrl, $displayDrawingHistoryFmt;
+  global $FmtV, $GCount, $drawingCompatibilityMode, $scripturl;
+  global $Now;
+
+  $CookbookDirURL = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['SCRIPT_NAME'].'/../cookbook';
+
+
+
+  $drawing = $str;
+  
+  $output = "";
+
+  // expand to full URL (incl http://) if url is relative:
+  if (!preg_match('/^http:/',$ScriptUrl)) 
+    { $scripturl = "http://".$_SERVER['HTTP_HOST'] . $ScriptUrl; }
+  else 
+    { $scripturl = $ScriptUrl; }
+
+ 
+  // expand to full URL (incl http://) if url is relative:
+  if (!preg_match('/^http:/',$PmWikiDrawPubUrl)) 
+    { $pubdirurl = "http://".$_SERVER['HTTP_HOST'] . $PmWikiDrawPubUrl; }
+  else 
+    { $pubdirurl = $PmWikiDrawPubUrl; }
+
+  // Work out the uploads path, both as a url and as an absolute path on the disk.
+  $uploadsUrl = FmtPageName("$UploadUrlFmt$UploadPrefixFmt", $pagename)."/";
+
+  // expand to full URL (incl http://) if url is relative:
+  if (!preg_match('/^http:/',$uploadsUrl)) 
+    { $uploadsUrl = "http://".$_SERVER['HTTP_HOST'] . $uploadsUrl; }
+  
+  $uploadsPath = FmtPageName("$UploadDir$UploadPrefixFmt",$pagename)."/"; //Change for tegan, different urls used for direct-downloads...
+  if( $EnableDirectDownload != 1 )
+  {
+	$uploadsUrl= "$scripturl?n=$pagename&action=download&upname=";
+  }
+
+  if ( isset($_GET['image']) )
+    { $imageToEdit = $_GET['image']; }
+	
+  $pos = strrpos($drawing, '.');
+  $filenameExtension = ($pos == false) ? '' : strtolower(substr($drawing, $pos + 1));
+  $renderedDrawing = in_array($filenameExtension, array('png','jpg','jpeg')) ?
+    $drawing : $drawing.".png";
+  
+  $currentlyExists = file_exists($uploadsPath.$drawing);
+  $renderedCurrentlyExists = file_exists($uploadsPath.$renderedDrawing);
+  $mapCurrentlyExists = file_exists($uploadsPath.$drawing.".map");
+
+
+  $editImageUrl = $scripturl.'?pagename='.$pagename.'&action=editimage&image='.$drawing;
+  $showHistoryUrl = $scripturl.'?pagename='.$pagename.'&action=imagehistory&image='.$drawing;
+  
+  
+  if ($editImage == false || !isset($imageToEdit) || $imageToEdit != $drawing) {
+	  if ($mapCurrentlyExists) {
+		$filename = $uploadsPath.$drawing.".map";
+		$fp = fopen($filename, "r");
+		$contents = fread($fp, filesize($filename));
+		fclose($fp);
+		$GCount = 0;	
+		
+		// Translate all global pmwiki $variables included in map
+		$contents = FmtPageName($contents,$pagename); 
+		
+		// Write the MAP into the outgoing HTML code.
+		$output .= "\n".$contents."\n";
+	  }
+	
+	  if ($currentlyExists) {
+		$output .= '<img ';
+		
+		if ($mapCurrentlyExists ) {
+		  $output .= ' usemap="#'.$drawing.'" ';
+		}
+	
+		$output .= ' class="pmwikidrawing" ';
+		$output .= ' src="'.$uploadsUrl.$renderedDrawing.'"/>';
+  	
+  	// Mechanism to ensure that our urls get properly added into the variables that
+  	// FmtPagename references.
+####CJ: I still can't get this to work, any ideas Knut?
+//  	if($pmwikiver >1) {
+//	  	$FmtV['$editImageUrl'] = $editImageUrl;
+//  		$FmtV['$showHistoryUrl'] = $showHistoryUrl;
+//  		$FmtV['$pubdirurl'] = $pubdirurl;
+//  		$FmtV['$scripturl'] = $scripturl;
+//  	}
+//  	else {
+	  	$GCount = 0;	
+//  	}  
+
+		$output .= FmtPagename($displayDrawingEditFmt,$pagename); 
+		$output .= FmtPagename($displayDrawingHistoryFmt, $pagename);
+	  }
+	  else 
+		{ $output .= FmtPageName('<a href="'.$editImageUrl.'">$[Create Image]('.$drawing.')</a>'."\n",$pagename); }
+	}
+
+  if ($editImage == true && isset($imageToEdit) && $imageToEdit == $drawing) {
+
+	#### CJ: Hmm this might be an issue, as we can't determine whether a user
+	#### is *allowed* to edit a picture until the point they save it we might end up 
+	#### creating version files when there's no need to, or more to the point, shouldn't
+	#### do as we'll be creating new files taking up space when its impossible for the user
+	#### to modify the drawing anyway?
+	#### Possible work arounds:
+	####    1) Always modify a 'tmp' drawing file and have the applet return to this page with
+	####       a particular action 'postDrawingEdit' for example.  And at this point check if the 
+	####       tmp file was modified i.e. diff between the 'original' and the 'tmp' if so then do 
+	####       versioning and redirect to 'browse' on the current page.
+	####    2) Too tired.. there must be others..ideas ?
+	
+    
+    // copy of drawing file(s) for versioning
+    if($EnableDrawingVersioning == true)  {
+      $drawfileprefix = $uploadsPath.$drawing;
+      
+      if (file_exists("$drawfileprefix.draw")) {
+        
+        $drawfilelastchanged  = filemtime("$drawfileprefix.draw");
+        $drawbackupfileprefix = "$drawfileprefix,$drawfilelastchanged";
+        
+        if (!file_exists("$drawbackupfileprefix.draw")) {
+          // backupfile does not exist
+          
+          // Copy drawing source file
+          if (!@copy("$drawfileprefix.draw", "$drawbackupfileprefix.draw"))
+            { $output .= "<pre class='error'>failed to create backup $drawfileprefix.draw to $drawbackupfileprefix.draw</pre>\n"; }
+          else
+            { $output .= "<pre class='msg'>backuped ".basename("$drawfileprefix.draw")." to ".basename("$drawbackupfileprefix.draw")."</pre>\n"; }
+  
+          ### KAL: TODO: if copy-ok-messages not wanted, possibly en/disable display of msg by variable ?
+          ###            copy messages will only be displayed under then image when in image-edit-mode
+          ### KAL: TODO: check if needed to copy all files of drawing
+          
+          // Copy the map-file
+          if (!@copy("$drawfileprefix.map", "$drawbackupfileprefix.map"))
+            { $output .= "<pre class='error'>failed to backup $drawfileprefix.map  to $drawbackupfileprefix.map</pre>\n"; }
+          else
+            { $output .= "<pre class='msg'>backuped ".basename("$drawfileprefix.map")."  to ".basename("$drawbackupfileprefix.map")."</pre>\n"; }
+            
+          // Copy the gif file (better for displaying old versions)
+          if (!@copy("$drawfileprefix.gif", "$drawbackupfileprefix.gif"))
+            { $output .= "<pre class='error'>failed to backup $drawfileprefix.gif  to $drawbackupfileprefix.gif</pre>\n"; }
+          else
+            { $output .= "<pre class='msg'>backuped ".basename("$drawfileprefix.gif")."  to ".basename("$drawbackupfileprefix.gif")."</pre>\n"; }
+  
+          ### versioning the draw-file and gif-file could be enough, versions could be displayed via (:attachlist:) or via an own
+          ### directive that allows display (then possibly better version map and gif too) and / or editing / recovery of older versions
+        }
+      }
+    }    
+     // Build the applet string.
+      // create applet tag for image formats supported by the new applet
+      $output .= '<applet code="org.anywikidraw.pmwiki.PmWikiDrawingApplet.class" ';
+      $output .= 'archive="'.$CookbookDirURL.'/AnyWikiDraw/AnyWikiDrawForPmWiki.jar" ';
+      $output .= 'width="600" height="480">'."\n";
+
+      // The following parameters are used to tell AnyWikiDraw how to communicate with PmWiki:
+
+      if ($currentlyExists) {
+          $output .= '<param name="DrawingURL" value="'.$uploadsUrl.$drawing.'"/>'."\n";
+      }
+      $output .= '<param name="DrawingName" value="'.$drawing.'"/>'."\n";
+      $output .= '<param name="DrawingWidth" value="'."400".'"/>'."\n";
+      $output .= '<param name="DrawingHeight" value="'."240".'"/>'."\n";
+      $output .= '<param name="PageName" value="'.$pagename.'"/>'."\n";
+      $output .= '<param name="PageURL" value="'.$scripturl.'/'.$pagename.'"/>'."\n";
+      $output .= '<param name="DrawingRevision" value="'.$Now.'"/>'."\n";
+      $output .= '<param name="UploadURL" value="'.$scripturl.'"/>'."\n";
+      $output .= '<param name="UploadAction" value="postDrawing"/>'."\n";
+
+      // The following parameters are used to configure the drawing applet:
+      // TODO : get the language of the user and set it here
+      //$output .= '<param name="Locale" value="'.$wgUser->getOption('language','en').'"/>'."\n";
+           
+      // The following parameters are used to configure Sun's Java Plug-In:
+
+      $output .= '<param name="codebase_lookup" value="false"/>'."\n";
+      $output .= '<param name="classloader_cache" value="false"/>'."\n";
+      $output .= '<param name="java_arguments" value="-Djnlp.packEnabled=true"/>'."\n";
+      $output .= '<param name="image" value="lib/Splash.gif"/>'."\n";
+      $output .= '<param name="boxborder" value="false"/>'."\n";
+      $output .= '<param name="centerimage" value="true"/>'."\n";
+
+      $output .= '</applet>'."\n";
+  }
+ 
+  return $output;
+}
+// ------------------- Handle the drawing markup for the .draw file format --------------------------------
+function drawing_draw($str) {
+  global $action, $group, $pagename, $ScriptUrl, $UploadPrefixFmt;
+  global $UploadUrlFmt, $UploadDir, $editImage, $displayDrawingEditFmt, $EnableDrawingDebug; 
+  global $drawing, $editImageUrl, $drawingExtraColors, $EnableDrawingVersioning;
+  global $pubdirurl, $PmWikiDrawPubUrl, $showHistoryUrl, $displayDrawingHistoryFmt;
+  global $FmtV, $GCount, $drawingCompatibilityMode, $scripturl;
+  global $Now;
+
+  $drawing = $str;
+  
+  $output = "";
+
+  // expand to full URL (incl http://) if url is relative:
+  if (!preg_match('/^http:/',$ScriptUrl)) 
+    { $scripturl = "http://".$_SERVER['HTTP_HOST'] . $ScriptUrl; }
+  else 
+    { $scripturl = $ScriptUrl; }
+
+ 
+  // expand to full URL (incl http://) if url is relative:
+  if (!preg_match('/^http:/',$PmWikiDrawPubUrl)) 
+    { $pubdirurl = "http://".$_SERVER['HTTP_HOST'] . $PmWikiDrawPubUrl; }
+  else 
+    { $pubdirurl = $PmWikiDrawPubUrl; }
+
+  // Work out the uploads path, both as a url and as an absolute path on the disk.
+  $uploadsUrl = FmtPageName("$UploadUrlFmt$UploadPrefixFmt", $pagename)."/";
+
+  // expand to full URL (incl http://) if url is relative:
+  if (!preg_match('/^http:/',$uploadsUrl)) 
+    { $uploadsUrl = "http://".$_SERVER['HTTP_HOST'] . $uploadsUrl; }
+  
+  $uploadsPath = FmtPageName("$UploadDir$UploadPrefixFmt",$pagename)."/";
+
+  //Change for tegan, different urls used for direct-downloads...
+  if( $EnableDirectDownload != 1 )
+  {
+	$uploadsUrl= "$scripturl?n=$pagename&action=download&upname=";
+  }
+
+  if ( isset($_GET['image']) )
+    { $imageToEdit = $_GET['image']; }
+	
+  $currentlyExists = file_exists($uploadsPath.$drawing.".gif");
+  $mapCurrentlyExists = file_exists($uploadsPath.$drawing.".map");
+
+
+  $editImageUrl = $scripturl.'?pagename='.$pagename.'&action=editimage&image='.$drawing;
+  $showHistoryUrl = $scripturl.'?pagename='.$pagename.'&action=imagehistory&image='.$drawing;
+  
+  if ($mapCurrentlyExists && $editImage == false) {
+    // Add the map :)
+    $filename = $uploadsPath.$drawing.".map";
+    $fp = fopen($filename, "r");
+    $contents = fread($fp, filesize($filename));
+    fclose($fp);
+//    $contents = str_replace("%BUILDEDITLINK%", $editImageUrl, $contents);
+
+####CJ: I still can't get this to work, any ideas Knut?
+//  	if($pmwikiver >1) {
+//  		$FmtV['$scripturl'] = $scripturl;
+//  		$FmtV['$editImageUrl'] = $editImageUrl;
+//  	}
+//  	else {
+	  	$GCount = 0;	
+// 	}  
+  	
+    // Translate all global pmwiki $variables included in map
+    $contents = FmtPageName($contents,$pagename); 
+	
+    // Write the MAP into the outgoing HTML code.
+    $output .= "\n".$contents."\n";
+  }
+
+  if ($currentlyExists ) {
+    $output .= '<img ';
+    
+	if ($mapCurrentlyExists ) {
+      $output .= ' usemap="#'.$drawing.'" ';
+	}
+
+  	// Put a nice red border around the current image we're editing.
+	if($editImage == true && isset($imageToEdit) && $imageToEdit == $drawing) {
+      $output .= ' style="border:4px solid red;" alt="Image being edited" class="pmwikidrawing_editing"';
+	}
+	else {
+	 $output .= ' class="pmwikidrawing" ';
+	}
+
+    $output .= ' src="'.$uploadsUrl.$drawing.'.gif"/>';
+  	
+  	// Mechanism to ensure that our urls get properly added into the variables that
+  	// FmtPagename references.
+####CJ: I still can't get this to work, any ideas Knut?
+//  	if($pmwikiver >1) {
+//	  	$FmtV['$editImageUrl'] = $editImageUrl;
+//  		$FmtV['$showHistoryUrl'] = $showHistoryUrl;
+//  		$FmtV['$pubdirurl'] = $pubdirurl;
+//  		$FmtV['$scripturl'] = $scripturl;
+//  	}
+//  	else {
+	  	$GCount = 0;	
+//  	}  
+
+    $output .= FmtPagename($displayDrawingEditFmt,$pagename); 
+    $output .= FmtPagename($displayDrawingHistoryFmt, $pagename);
+
+    /* KAL: debugging only:
+    DEBUG(htmlentities($editImageUrl),1);
+    DEBUG(htmlentities($displayDrawingEditFmt),1);
+    DEBUG(htmlentities(FmtPagename($displayDrawingEditFmt,$pagename)),1);
+    DEBUG(htmlentities($displayDrawingHistoryFmt),1);
+    DEBUG(htmlentities(FmtPagename($displayDrawingHistoryFmt, $pagename)),1);
+    /* */
+  }
+  else 
+    { $output .= FmtPageName('<a href="'.$editImageUrl.'">$[Create Image]('.$drawing.')</a>'."\n",$pagename); }
+
+  if ($editImage == true && isset($imageToEdit) && $imageToEdit == $drawing) {
+
+	#### CJ: Hmm this might be an issue, as we can't determine whether a user
+	#### is *allowed* to edit a picture until the point they save it we might end up 
+	#### creating version files when there's no need to, or more to the point, shouldn't
+	#### do as we'll be creating new files taking up space when its impossible for the user
+	#### to modify the drawing anyway?
+	#### Possible work arounds:
+	####    1) Always modify a 'tmp' drawing file and have the applet return to this page with
+	####       a particular action 'postDrawingEdit' for example.  And at this point check if the 
+	####       tmp file was modified i.e. diff between the 'original' and the 'tmp' if so then do 
+	####       versioning and redirect to 'browse' on the current page.
+	####    2) Too tired.. there must be others..ideas ?
+	
+    
+    // copy of drawing file(s) for versioning
+    if($EnableDrawingVersioning == true)  {
+      $drawfileprefix = $uploadsPath.$drawing;
+      
+      if (file_exists("$drawfileprefix.draw")) {
+        
+        $drawfilelastchanged  = filemtime("$drawfileprefix.draw");
+        $drawbackupfileprefix = "$drawfileprefix,$drawfilelastchanged";
+        
+        if (!file_exists("$drawbackupfileprefix.draw")) {
+          // backupfile does not exist
+          
+          // Copy drawing source file
+          if (!@copy("$drawfileprefix.draw", "$drawbackupfileprefix.draw"))
+            { $output .= "<pre class='error'>failed to create backup $drawfileprefix.draw to $drawbackupfileprefix.draw</pre>\n"; }
+          else
+            { $output .= "<pre class='msg'>backuped ".basename("$drawfileprefix.draw")." to ".basename("$drawbackupfileprefix.draw")."</pre>\n"; }
+  
+          ### KAL: TODO: if copy-ok-messages not wanted, possibly en/disable display of msg by variable ?
+          ###            copy messages will only be displayed under then image when in image-edit-mode
+          ### KAL: TODO: check if needed to copy all files of drawing
+          
+          // Copy the map-file
+          if (!@copy("$drawfileprefix.map", "$drawbackupfileprefix.map"))
+            { $output .= "<pre class='error'>failed to backup $drawfileprefix.map  to $drawbackupfileprefix.map</pre>\n"; }
+          else
+            { $output .= "<pre class='msg'>backuped ".basename("$drawfileprefix.map")."  to ".basename("$drawbackupfileprefix.map")."</pre>\n"; }
+            
+          // Copy the gif file (better for displaying old versions)
+          if (!@copy("$drawfileprefix.gif", "$drawbackupfileprefix.gif"))
+            { $output .= "<pre class='error'>failed to backup $drawfileprefix.gif  to $drawbackupfileprefix.gif</pre>\n"; }
+          else
+            { $output .= "<pre class='msg'>backuped ".basename("$drawfileprefix.gif")."  to ".basename("$drawbackupfileprefix.gif")."</pre>\n"; }
+  
+          ### versioning the draw-file and gif-file could be enough, versions could be displayed via (:attachlist:) or via an own
+          ### directive that allows display (then possibly better version map and gif too) and / or editing / recovery of older versions
+        }
+     
+        /* for debugging only: (add # in front of this statement to activate !
+        $output .= "<pre class='debug'>";
+        $output .= "drawfileprefix=$drawfileprefix\n";
+        $output .= "drawbackupfileprefix=$drawbackupfileprefix\n";
+        $output .= "drawfilelastchanged=$drawfilelastchanged\n";
+        $output .= "</pre>";
+        /* */
+      }
+    }    
+     // Build the applet string.
+     $CookbookDirURL = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['SCRIPT_NAME'].'/../cookbook';
+//     if( $drawingCompatibilityMode == false) {
+      $output .= '<applet code="com.wombatinvasion.pmwikidraw.PmWikiDraw.class" ';
+      $output .= 'archive="'.$CookbookDirURL.'/AnyWikiDraw/draw/PmWikiDraw.jar" width="0" height="0">'."\n";
+      $output .= '<param name="drawingname" value="'.$drawing.'"/>'."\n";
+      $output .= '<param name="wikiurl" value="'.$scripturl.'"/>'."\n";
+      $output .= '<param name="pagename" value="'.$pagename.'"/>'."\n";  
+      $output .= '<param name="resourcesurl" value="'.$pubdirurl.'/drawing/"/>'."\n";
+      $output .= '<param name="drawingbasetime" value="'.$Now.'"/>'."\n";
+      $output .= '<param name="drawingloadpath" value="'.$uploadsUrl.$drawing.'.draw"/>'."\n";
+
+      // Configurable parameters.
+      if( $EnableDrawingDebug == true) 
+        { $output .= '<param name="debug" value="true"/>'."\n"; }
+
+      if ( $drawingExtraColors != "") 
+        { $output .= '<param name="extracolors" value="'.$drawingExtraColors.'"/>'."\n"; }
+      $output .= '</applet>'."\n";
+  //  }
+//    else { // Compatibility mode...painful...
+//      // In theory, IE should see the OBJECt and run that, but Mozilla should see the comment and run the embed... in theory....
+//      $output .= '<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" width="0" height="0" align="baseline" codebase="http://javaweb.eng/plugin/jre-1_3-win.exe#Version=1,3,0,0">'."\n";
+//      $output .= '  <PARAM NAME="code" VALUE="CH.ifa.draw.twiki.TWikiDraw.class">'."\n";
+//      $output .= '  <PARAM NAME="archive" VALUE="'.$pubdirurl.'/drawing/PmWikiDraw.jar"/>'."\n";
+//      $output .= '  <PARAM NAME="type" VALUE="application/x-java-applet;version=1.3" />'."\n";
+//     $output .= '  <param name="drawingname" value="'.$drawing.'"/>'."\n";
+//      $output .= '  <param name="wikiurl" value="'.$scripturl.'"/>'."\n";
+//      $output .= '  <param name="pagename" value="'.$pagename.'"/>'."\n";  
+//      $output .= '  <param name="resourcesurl" value="'.$pubdirurl.'/drawing/"/>'."\n";
+//      $output .= '  <param name="drawingloadpath" value="'.$uploadsUrl.$drawing.'.draw"/>'."\n";
+//      $output .= '  <COMMENT>'."\n";  // This fella should be picked up by mozilla/netscape et al.
+//      $output .= '    <EMBED type                  ="application/x-java-applet;version=1.3" width="0" height="0"'."\n";
+//      $output .= '                  align                  ="baseline" code="CH.ifa.draw.twiki.TWikiDraw.class"'."\n";
+//      $output .= '                  drawingname     ="'.$drawing.'"'."\n";
+//      $output .= '                  wikiurl               ="'.$scripturl.'"'."\n";
+ //     $output .= '                  pagename          ="'.$pagename.'"'."\n";
+ //     $output .= '                  resourcesurl      ="'.$pubdirurl.'/drawing/"'."\n";
+ //     $output .= '                  drawingloadpath ="'.$uploadsUrl.$drawing.'.draw"'."\n";
+ //     $output .= '                  archive               ="'.$pubdirurl.'/drawing/PmWikiDraw.jar"'."\n";
+ //     $output .= '     >'."\n";
+  //    $output .= '    <NOEMBED></COMMENT>'."\n";
+   //   $output .= '         No JDK 1.3 support for APPLET!! (Fall back to 1.1 Put original pmwikidraw applet here and swap the other two to use the most recent one)'."\n";
+   //   $output .='     </NOEMBED>'."\n";
+   //   $output .='   </EMBED>'."\n";
+    //  $output .= '</OBJECT>'."\n";
+    //}
+  }
+ 
+  return $output;
+}
+// ------------ Revision history code. ---------------
+// Handle Image History
+function HandleImageHistory($pagename) {
+  global $HandleDiffFmt,$PageStartFmt,$PageDiffFmt,$PageEndFmt;
+  Lock(1);
+
+  if ( isset($_GET['image']) )
+    { $imageToSeeHistory = $_GET['image']; }
+
+  $page = ReadPage($pagename,'');
+  if (!$page) { Abort("?cannot diff $pagename"); }
+//  SDV($HandleDiffFmt,array(&$PageStartFmt,
+//    &$PageDiffFmt,'function:PrintDiff',
+//    &$PageEndFmt));
+
+  SDV($HandleDiffFmt,array(&$PageStartFmt,
+    &$PageDiffFmt,"image history of $imageToSeeHistory",
+    &$PageEndFmt));
+
+  PrintFmt($pagename,$HandleDiffFmt);
+}
+
+// ---------------------------------------------------
+function HandlePostEditImage($pagename) {
+  global $PageUrl;
+  Redirect($pagename,"\$PageUrl");
+}
+
+// ---------------------------------------------------
+function HandlePostEditImage2($pagename) {
+    global $RecentChangesFmt, $IsPagePosted, $EnableDrawingRecentChanges;
+
+    if ( $EnableDrawingRecentChanges == true && isset($_GET['image']) ){ 
+      $imageModified = $_GET['image']; 
+      $RecentChangesFmt = array(
+       'Main.AllRecentChanges' => 
+       '* [[$Group/$Name]]  Drawing - '.$imageModified.' modified . . . $CurrentTime',
+       '$Group.RecentChanges' =>
+       '* [[$Group/$Name]]  Drawing - '.$imageModified.' modified . . . $CurrentTime');   	 
+      $IsPagePosted = true;
+	$x = "";
+	$y="";
+      PostRecentChanges($pagename, $x,$y);
+      $IsPagePosted = false;
+   }
+   HandlePostEditImage($pagename);
+}
+
+
+function HandlePostDrawing($pagename) {
+	global $UploadVerifyFunction,$UploadFileFmt,$LastModFile, $Now;
+	global $RecentChangesFmt, $IsPagePosted, $EnableDrawingRecentChanges;
+	
+	if ($_POST['drawingbasetime']) {
+		HandlePostDrawing_draw($pagename);
+	} else {
+		HandlePostDrawing_any($pagename);
+	}
+}
+
+/**
+ * Handle all file formats except the .draw format
+ */
+function HandlePostDrawing_any($pagename) {
+	global $UploadVerifyFunction,$UploadFileFmt,$LastModFile, $Now;
+	global $RecentChangesFmt, $IsPagePosted, $EnableDrawingRecentChanges;
+	
+  $page = RetrieveAuthPage($pagename,'upload');
+  if (!$page) Abort("?cannot upload to $pagename");
+  $uploadImage = $_FILES['RenderedImageData'];
+  $uploadDrawing = $_FILES['DrawingData'];
+  $uploadMap = $_FILES['ImageMapData'];
+
+  $drawingBaseTime = $_POST['DrawingRevision'];  // The time the user began editing this drawing.
+  $imageupname=$uploadImage['name'];
+  $drawingupname=$uploadDrawing['name'];
+  $mapupname=$uploadMap['name'];
+
+  $imageupname = MakeUploadName($pagename,$imageupname);
+  $drawingupname = MakeUploadName($pagename,$drawingupname);
+  $mapupname = MakeUploadName($pagename,$mapupname);
+  $imageFilePath = FmtPageName("$UploadFileFmt/$imageupname",$pagename);
+  $drawingFilePath = FmtPageName("$UploadFileFmt/$drawingupname",$pagename);
+  $mapFilePath = FmtPageName("$UploadFileFmt/$mapupname",$pagename);
+
+  if( file_exists($drawingFilePath) ) {
+	// Only worth checking timestamps if a drawing actually currently exists!
+    if ( filemtime( $drawingFilePath ) > $drawingBaseTime ) {
+		// Assign a new timestamp to the client... hopefully this time they'll be ok... 
+		header("PmWikiDraw-DrawingChanged: $Now");
+		exit;
+    }
+  } 
+
+  // If we've got to here then we can assume its safe to overwrite the current file
+  // Note: we should do the history archival/recent changes stuff here.
+    if ( $EnableDrawingRecentChanges == true && isset($_POST['drawingname']) ){ 
+      $imageModified = $_POST['drawingname']; 
+      $RecentChangesFmt = array(
+       'Main.AllRecentChanges' => 
+       '* [[$Group/$Name]]  Drawing - '.$imageModified.' modified . . . $CurrentTime',
+       '$Group.RecentChanges' =>
+       '* [[$Group/$Name]]  Drawing - '.$imageModified.' modified . . . $CurrentTime');   	 
+      $IsPagePosted = true;
+	$x = "";
+	$y="";
+      PostRecentChanges($pagename, $x,$y);
+      $IsPagePosted = false;
+   }
+    
+  error_log('HandlePostDrawing we got here:'.$uploadDrawing);
+  $filedir = preg_replace('#/[^/]*$#','',$imageFilePath);
+  mkdirp($filedir);
+  if (!move_uploaded_file($uploadImage['tmp_name'],$imageFilePath)) { 
+    // Rendered image is optional, we don't need to abort here 
+    //Abort("?cannot move uploaded image to $imageFilePath"); return;
+  }
+  fixperms($imageFilePath,0444);
+  if ($LastModFile) { touch($LastModFile); fixperms($LastModFile); }
+
+  $filedir = preg_replace('#/[^/]*$#','',$drawingFilePath);
+  if (!move_uploaded_file($uploadDrawing['tmp_name'],$drawingFilePath))
+    { Abort("?cannot move uploaded drawing to $drawingFilePath"); return; }
+  fixperms($drawingFilePath,0444);
+  if ($LastModFile) { touch($LastModFile); fixperms($LastModFile); }
+
+  $filedir = preg_replace('#/[^/]*$#','',$mapFilePath);
+  mkdirp($filedir);
+  if (!move_uploaded_file($uploadMap['tmp_name'],$mapFilePath)) { 
+    // Image map is optional, we don't need to abort here
+    //Abort("?cannot move uploaded map to $mapFilePath"); return; 
+  }
+  fixperms($mapFilePath,0444);
+  if ($LastModFile) { touch($LastModFile); fixperms($LastModFile); }
+
+  // Sets the drawingBaseTime header for incremental save support.
+  header( "PmWikiDraw-DrawingBaseTime: ".filemtime( $drawingFilePath ) );
+}
+/**
+ * Handle the .draw file format
+ */
+function HandlePostDrawing_draw($pagename) {
+  global $UploadVerifyFunction,$UploadFileFmt,$LastModFile, $Now;
+  global $RecentChangesFmt, $IsPagePosted, $EnableDrawingRecentChanges;
+
+  $page = RetrieveAuthPage($pagename,'upload');
+  if (!$page) Abort("?cannot upload to $pagename");
+  $uploadImage = $_FILES['uploadImage'];
+  $uploadDrawing = $_FILES['uploadDrawing'];
+  $uploadMap = $_FILES['uploadMap'];
+
+  $drawingBaseTime = $_POST['drawingbasetime'];  // The time the user began editing this drawing.
+  $imageupname=$uploadImage['name'];
+  $drawingupname=$uploadDrawing['name'];
+  $mapupname=$uploadMap['name'];
+
+  $imageupname = MakeUploadName($pagename,$imageupname);
+  $drawingupname = MakeUploadName($pagename,$drawingupname);
+  $mapupname = MakeUploadName($pagename,$mapupname);
+  $imageFilePath = FmtPageName("$UploadFileFmt/$imageupname",$pagename);
+  $drawingFilePath = FmtPageName("$UploadFileFmt/$drawingupname",$pagename);
+  $mapFilePath = FmtPageName("$UploadFileFmt/$mapupname",$pagename);
+
+  if( file_exists($drawingFilePath) ) {
+	// Only worth checking timestamps if a drawing actually currently exists!
+    if ( filemtime( $drawingFilePath ) > $drawingBaseTime ) {
+		// Assign a new timestamp to the client... hopefully this time they'll be ok... 
+		header("PmWikiDraw-DrawingChanged: $Now");
+		exit;
+    }
+  } 
+
+  // If we've got to here then we can assume its safe to overwrite the current file
+  // Note: we should do the history archival/recent changes stuff here.
+    if ( $EnableDrawingRecentChanges == true && isset($_POST['drawingname']) ){ 
+      $imageModified = $_POST['drawingname']; 
+      $RecentChangesFmt = array(
+       'Main.AllRecentChanges' => 
+       '* [[$Group/$Name]]  Drawing - '.$imageModified.' modified . . . $CurrentTime',
+       '$Group.RecentChanges' =>
+       '* [[$Group/$Name]]  Drawing - '.$imageModified.' modified . . . $CurrentTime');   	 
+      $IsPagePosted = true;
+	$x = "";
+	$y="";
+      PostRecentChanges($pagename, $x,$y);
+      $IsPagePosted = false;
+   }
+    
+  $filedir = preg_replace('#/[^/]*$#','',$imageFilePath);
+  mkdirp($filedir);
+  if (!move_uploaded_file($uploadImage['tmp_name'],$imageFilePath))
+    { Abort("?cannot move uploaded image to $imageFilePath"); return; }
+  fixperms($imageFilePath,0444);
+  if ($LastModFile) { touch($LastModFile); fixperms($LastModFile); }
+
+  $filedir = preg_replace('#/[^/]*$#','',$drawingFilePath);
+  mkdirp($filedir);
+  if (!move_uploaded_file($uploadDrawing['tmp_name'],$drawingFilePath))
+    { Abort("?cannot move uploaded drawing to $drawingFilePath"); return; }
+  fixperms($drawingFilePath,0444);
+  if ($LastModFile) { touch($LastModFile); fixperms($LastModFile); }
+
+  $filedir = preg_replace('#/[^/]*$#','',$mapFilePath);
+  mkdirp($filedir);
+  if (!move_uploaded_file($uploadMap['tmp_name'],$mapFilePath))
+    { Abort("?cannot move uploaded map to $mapFilePath"); return; }
+  fixperms($mapFilePath,0444);
+  if ($LastModFile) { touch($LastModFile); fixperms($LastModFile); }
+
+  // Sets the drawingBaseTime header for incremental save support.
+  header( "PmWikiDraw-DrawingBaseTime: ".filemtime( $drawingFilePath ) );
+  
+  exit();
+}
+?>
Binary file contrib/AnyWikiDraw/anywikidraw/pmwiki/cookbook/AnyWikiDraw/AnyWikiDrawForPmWiki.jar has changed
Binary file contrib/AnyWikiDraw/anywikidraw/pmwiki/cookbook/AnyWikiDraw/AnyWikiDrawForPmWiki.jar.pack.gz has changed
Binary file contrib/AnyWikiDraw/anywikidraw/pmwiki/cookbook/AnyWikiDraw/Splash.gif has changed
Binary file contrib/AnyWikiDraw/anywikidraw/pmwiki/cookbook/AnyWikiDraw/draw/PmWikiDraw.jar has changed
Binary file contrib/AnyWikiDraw/anywikidraw/pmwiki/cookbook/AnyWikiDraw/draw/edit.gif has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/AnyWikiDraw/anywikidraw/pmwiki/cookbook/AnyWikiDraw/draw/images/images	Fri Oct 30 21:03:37 2009 +0100
@@ -0,0 +1,24 @@
+# Image file Please
+# enter any images you would like your users to see in here, if the filename
+# is not in here then the user will not be able to use that image in their
+# drawings.
+#
+# Note that any subdirectories in here will appear as submenus/groups in the
+# image selection utilities in PmWikiDraw
+# To get a space in your group name please use the alternate chracter '_' in both
+# the physical directory name and the reference below, the plugin
+# will automatically convert '_' to ' ' for display but use it for fetching the image.
+# This is to work around a strange bug in the latest (1.5.0 Java Applet VM) 
+
+#Samples showing example grouping.
+samples/Backgrounds/backgrnd.gif
+samples/Backgrounds/bg1.gif
+samples/Backgrounds/rain.gif
+samples/Java_Related/javacentral.gif
+samples/Java_Related/Juggler0.gif
+samples/Java_Related/beans.gif
+samples/Java_Related/DUKE.gif
+samples/Java_Related/joe.surf.yellow.small.gif
+
+#Test to show that top level images work too.
+rain.gif  
\ No newline at end of file
Binary file contrib/AnyWikiDraw/anywikidraw/pmwiki/cookbook/AnyWikiDraw/draw/images/rain.gif has changed
Binary file contrib/AnyWikiDraw/anywikidraw/pmwiki/cookbook/AnyWikiDraw/draw/images/samples/Backgrounds/backgrnd.gif has changed
Binary file contrib/AnyWikiDraw/anywikidraw/pmwiki/cookbook/AnyWikiDraw/draw/images/samples/Backgrounds/bg1.gif has changed
Binary file contrib/AnyWikiDraw/anywikidraw/pmwiki/cookbook/AnyWikiDraw/draw/images/samples/Backgrounds/rain.gif has changed
Binary file contrib/AnyWikiDraw/anywikidraw/pmwiki/cookbook/AnyWikiDraw/draw/images/samples/Java_Related/DUKE.gif has changed
Binary file contrib/AnyWikiDraw/anywikidraw/pmwiki/cookbook/AnyWikiDraw/draw/images/samples/Java_Related/Juggler0.gif has changed
Binary file contrib/AnyWikiDraw/anywikidraw/pmwiki/cookbook/AnyWikiDraw/draw/images/samples/Java_Related/beans.gif has changed
Binary file contrib/AnyWikiDraw/anywikidraw/pmwiki/cookbook/AnyWikiDraw/draw/images/samples/Java_Related/javacentral.gif has changed
Binary file contrib/AnyWikiDraw/anywikidraw/pmwiki/cookbook/AnyWikiDraw/draw/images/samples/Java_Related/joe.surf.yellow.small.gif has changed
Binary file contrib/AnyWikiDraw/anywikidraw/pmwiki/cookbook/AnyWikiDraw/draw/news.gif has changed
Binary file contrib/AnyWikiDraw/anywikidraw/pmwiki/cookbook/AnyWikiDraw/draw/symbols/flags.jar has changed
Binary file contrib/AnyWikiDraw/anywikidraw/pmwiki/cookbook/AnyWikiDraw/draw/symbols/sample.jar has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/AnyWikiDraw/anywikidraw/pmwiki/cookbook/AnyWikiDraw/draw/symbols/symbols	Fri Oct 30 21:03:37 2009 +0100
@@ -0,0 +1,7 @@
+# Image file Please enter any symbol packs you would like your users to 
+# be able to usein here, if the filename is not in here then the 
+# user will not be able to use that symbol in their drawings.
+#
+
+sample
+flags
\ No newline at end of file
Binary file contrib/AnyWikiDraw/anywikidraw/pmwiki/cookbook/AnyWikiDraw/edit.gif has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/AnyWikiDraw/demo/anywikidraw_for_twiki_demo.html	Fri Oct 30 21:03:37 2009 +0100
@@ -0,0 +1,45 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<!-- 
+    Document   : anywikidraw_for_twiki_demo
+    Created on : May 13, 2008, 7:32:27 AM
+    Author     : werni
+    Version    : $Id: anywikidraw_for_twiki_demo.html 107 2009-06-15 19:33:05Z rawcoder $
+-->
+    <head>
+        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+        <title>AnyWikiDraw for TWiki Demonstration</title>
+    </head>
+    <body>
+        <p>
+            This is a demonstration of the AnyWikiDraw drawing applet for TWiki.<br/>
+            This demo is running without TWiki, thus you can only edit the drawing, but you can not save it.<br/>
+        </p>
+        <applet codebase="." 
+                archive="lib/AnyWikiDrawForTWiki.jar" 
+                code="org.anywikidraw.twiki.TWikiDrawingApplet.class" 
+                width="600" height="540">
+                  
+           <!-- The following parameters are used to tell AnyWikiDraw how to communicate with TWiki.
+                Replace /~/ with the URL path to TWiki
+           -->
+           <param name="DrawingName" value="lion.svg"/>
+           <param name="DrawingWidth" value="600"/>
+           <param name="DrawingHeight" value="480"/>
+           <param name="DrawingURL" value="data/lion.svg"/>
+           <param name="PageURL" value="anywikidraw_for_twiki_demo.html"/>
+           <param name="UploadURL" value="/~/twiki/bin/upload/..."/>
+           
+           <!-- The following parameters are used to configure the drawing applet -->
+           <param name="Locale" value="en"/>
+           
+           <!-- The following parameters are used to configure Sun's Java Plug-In -->
+           <param name="codebase_lookup" value="false"/>
+           <param name="classloader_cache" value="false"/>
+           <param name="java_arguments" value="-Djnlp.packEnabled=true"/>
+           <param name="image" value="lib/Splash.gif"/>
+           <param name="boxborder" value="false"/>
+           <param name="centerimage" value="true"/>
+        </applet>
+    </body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/AnyWikiDraw/demo/data/lion.svg	Fri Oct 30 21:03:37 2009 +0100
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.2" baseProfile="tiny" viewport-fill="#fff"><defs/><g><polygon points="69,18, 82,8, 99,3, 118,5, 135,12, 149,21, 156,13, 165,9, 177,13, 183,28, 180,50, 164,91, 155,107, 154,114, 151,121, 141,127, 139,136, 155,206, 157,251, 126,342, 133,357, 128,376, 83,376, 75,368, 67,350, 61,350, 53,369, 4,369, 2,361, 5,354, 12,342, 16,321, 4,257, 4,244, 7,218, 9,179, 26,127, 43,93, 32,77, 30,70, 24,67, 16,49, 17,35, 18,23, 30,12, 40,7, 53,7, 62,12" fill="#f2cc99" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="142,79, 136,74, 138,82, 133,78, 133,84, 127,78, 128,85, 124,80, 125,87, 119,82, 119,90, 125,99, 125,96, 128,100, 128,94, 131,98, 132,93, 135,97, 136,93, 138,97, 139,94, 141,98, 143,94, 144,85" fill="#e5b27f" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="127,101, 132,100, 137,99, 144,101, 143,105, 135,110" fill="#eb8080" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="178,229, 157,248, 139,296, 126,349, 137,356, 158,357, 183,342, 212,332, 235,288, 235,261, 228,252, 212,250, 188,251" fill="#f2cc99" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="56,229, 48,241, 48,250, 57,281, 63,325, 71,338, 81,315, 76,321, 79,311, 83,301, 75,308, 80,298, 73,303, 76,296, 71,298, 74,292, 69,293, 74,284, 78,278, 71,278, 74,274, 68,273, 70,268, 66,267, 68,261, 60,266, 62,259, 65,253, 57,258, 59,251, 55,254, 55,248, 60,237, 54,240, 58,234, 54,236" fill="#9c826b" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="74,363, 79,368, 81,368, 85,362, 89,363, 92,370, 96,373, 101,372, 108,361, 110,371, 113,373, 116,371, 120,358, 122,363, 123,371, 126,371, 129,367, 132,357, 135,361, 130,376, 127,377, 94,378, 84,376, 76,371" fill="#9c826b" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="212,250, 219,251, 228,258, 236,270, 235,287, 225,304, 205,332, 177,343, 171,352, 158,357, 166,352, 168,346, 168,339, 165,333, 155,327, 155,323, 161,320, 165,316, 169,316, 167,312, 171,313, 168,308, 173,309, 170,306, 177,306, 175,308, 177,311, 174,311, 176,316, 171,315, 174,319, 168,320, 168,323, 175,327, 179,332, 183,326, 184,332, 189,323, 190,328, 194,320, 194,325, 199,316, 201,320, 204,313, 206,316, 208,310, 211,305, 219,298, 226,288, 229,279, 228,266, 224,259, 217,253" fill="#9c826b" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="151,205, 151,238, 149,252, 141,268, 128,282, 121,301, 130,300, 126,313, 118,324, 116,337, 120,346, 133,352, 133,340, 137,333, 145,329, 156,327, 153,319, 153,291, 157,271, 170,259, 178,277, 193,250, 174,216" fill="#9c826b" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="78,127, 90,142, 95,155, 108,164, 125,167, 139,175, 150,206, 152,191, 141,140, 121,148, 100,136" fill="#9c826b" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="21,58, 35,63, 38,68, 32,69, 42,74, 40,79, 47,80, 54,83, 45,94, 34,81, 32,73, 24,66" fill="#9c826b" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="71,34, 67,34, 66,27, 59,24, 54,17, 48,17, 39,22, 30,26, 28,31, 31,39, 38,46, 29,45, 36,54, 41,61, 41,70, 50,69, 54,71, 55,58, 67,52, 76,43, 76,39, 68,44" fill="#9c826b" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="139,74, 141,83, 143,89, 144,104, 148,104, 155,106, 154,86, 157,77, 155,72, 150,77, 144,77" fill="#9c826b" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="105,44, 102,53, 108,58, 111,62, 112,55" fill="#9c826b" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="141,48, 141,54, 144,58, 139,62, 137,66, 136,59, 137,52" fill="#9c826b" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="98,135, 104,130, 105,134, 108,132, 108,135, 112,134, 113,137, 116,136, 116,139, 119,139, 124,141, 128,140, 133,138, 140,133, 139,140, 126,146, 104,144" fill="#9c826b" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="97,116, 103,119, 103,116, 111,118, 116,117, 122,114, 127,107, 135,111, 142,107, 141,114, 145,118, 149,121, 145,125, 140,124, 127,121, 113,125, 100,124" fill="#9c826b" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="147,33, 152,35, 157,34, 153,31, 160,31, 156,28, 161,28, 159,24, 163,25, 163,21, 165,22, 170,23, 167,17, 172,21, 174,18, 175,23, 176,22, 177,28, 177,33, 174,37, 176,39, 174,44, 171,49, 168,53, 164,57, 159,68, 156,70, 154,60, 150,51, 146,43, 144,35" fill="#9c826b" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="85,72, 89,74, 93,75, 100,76, 105,75, 102,79, 94,79, 88,76" fill="#9c826b" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="86,214, 79,221, 76,232, 82,225, 78,239, 82,234, 78,245, 81,243, 79,255, 84,250, 84,267, 87,254, 90,271, 90,257, 95,271, 93,256, 95,249, 92,252, 93,243, 89,253, 89,241, 86,250, 87,236, 83,245, 87,231, 82,231, 90,219, 84,221" fill="#9c826b" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><g><polygon points="93,68, 96,72, 100,73, 106,72, 108,66, 105,63, 100,62" fill="#ffcc7f" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="144,64, 142,68, 142,73, 146,74, 150,73, 154,64, 149,62" fill="#ffcc7f" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/></g><polygon points="57,91, 42,111, 52,105, 41,117, 53,112, 46,120, 53,116, 50,124, 57,119, 55,127, 61,122, 60,130, 67,126, 66,134, 71,129, 72,136, 77,130, 76,137, 80,133, 82,138, 86,135, 96,135, 94,129, 86,124, 83,117, 77,123, 79,117, 73,120, 75,112, 68,116, 71,111, 65,114, 69,107, 63,110, 68,102, 61,107, 66,98, 61,103, 63,97, 57,99" fill="#9c826b" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="83,79, 76,79, 67,82, 75,83, 65,88, 76,87, 65,92, 76,91, 68,96, 77,95, 70,99, 80,98, 72,104, 80,102, 76,108, 85,103, 92,101, 87,98, 93,96, 86,94, 91,93, 85,91, 93,89, 99,89, 105,93, 107,85, 102,82, 92,80" fill="#9c826b" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="109,77, 111,83, 109,89, 113,94, 117,90, 117,81, 114,78" fill="#9c826b" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="122,128, 127,126, 134,127, 136,129, 134,130, 130,128, 124,129" fill="#9c826b" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="78,27, 82,32, 80,33, 82,36, 78,37, 82,40, 78,42, 81,46, 76,47, 78,49, 74,50, 82,52, 87,50, 83,48, 91,46, 86,45, 91,42, 88,40, 92,37, 86,34, 90,31, 86,29, 89,26" fill="#9c826b" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="82,17, 92,20, 79,21, 90,25, 81,25, 94,28, 93,26, 101,30, 101,26, 107,33, 108,28, 111,40, 113,34, 115,45, 117,39, 119,54, 121,46, 124,58, 126,47, 129,59, 130,49, 134,58, 133,44, 137,48, 133,37, 137,40, 133,32, 126,20, 135,26, 132,19, 138,23, 135,17, 142,18, 132,11, 116,6, 94,6, 78,11, 92,12, 80,14, 90,16" fill="#9c826b" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="142,234, 132,227, 124,223, 115,220, 110,225, 118,224, 127,229, 135,236, 122,234, 115,237, 113,242, 121,238, 139,243, 121,245, 111,254, 95,254, 102,244, 104,235, 110,229, 100,231, 104,224, 113,216, 122,215, 132,217, 141,224, 145,230, 149,240" fill="#9c826b" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="115,252, 125,248, 137,249, 143,258, 134,255, 125,254" fill="#9c826b" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="114,212, 130,213, 140,219, 147,225, 144,214, 137,209, 128,207" fill="#9c826b" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="102,263, 108,258, 117,257, 131,258, 116,260, 109,265" fill="#9c826b" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="51,241, 35,224, 40,238, 23,224, 31,242, 19,239, 28,247, 17,246, 25,250, 37,254, 39,263, 44,271, 47,294, 48,317, 51,328, 60,351, 60,323, 53,262, 47,246" fill="#9c826b" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="2,364, 9,367, 14,366, 18,355, 20,364, 26,366, 31,357, 35,364, 39,364, 42,357, 47,363, 53,360, 59,357, 54,369, 7,373" fill="#9c826b" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="7,349, 19,345, 25,339, 18,341, 23,333, 28,326, 23,326, 27,320, 23,316, 25,311, 20,298, 15,277, 12,264, 9,249, 10,223, 3,248, 5,261, 15,307, 17,326, 11,343" fill="#9c826b" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="11,226, 15,231, 25,236, 18,227" fill="#9c826b" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="13,214, 19,217, 32,227, 23,214, 16,208, 15,190, 24,148, 31,121, 24,137, 14,170, 8,189" fill="#9c826b" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="202,254, 195,258, 199,260, 193,263, 197,263, 190,268, 196,268, 191,273, 188,282, 200,272, 194,272, 201,266, 197,265, 204,262, 200,258, 204,256" fill="#9c826b" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="151,213, 165,212, 179,225, 189,246, 187,262, 179,275, 176,263, 177,247, 171,233, 163,230, 165,251, 157,264, 146,298, 145,321, 133,326, 143,285, 154,260, 153,240" fill="#845433" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="91,132, 95,145, 97,154, 104,148, 107,155, 109,150, 111,158, 115,152, 118,159, 120,153, 125,161, 126,155, 133,164, 132,154, 137,163, 137,152, 142,163, 147,186, 152,192, 148,167, 141,143, 124,145, 105,143" fill="#845433" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="31,57, 23,52, 26,51, 20,44, 23,42, 21,36, 22,29, 25,23, 24,32, 30,43, 26,41, 30,50, 26,48" fill="#9c826b" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="147,21, 149,28, 155,21, 161,16, 167,14, 175,15, 173,11, 161,9" fill="#9c826b" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="181,39, 175,51, 169,57, 171,65, 165,68, 165,75, 160,76, 162,91, 171,71, 180,51" fill="#9c826b" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="132,346, 139,348, 141,346, 142,341, 147,342, 143,355, 133,350" fill="#9c826b" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="146,355, 151,352, 155,348, 157,343, 160,349, 151,356, 147,357" fill="#9c826b" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="99,266, 100,281, 94,305, 86,322, 78,332, 72,346, 73,331, 91,291" fill="#9c826b" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="20,347, 32,342, 45,340, 54,345, 45,350, 42,353, 38,350, 31,353, 29,356, 23,350, 19,353, 15,349" fill="#9c826b" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="78,344, 86,344, 92,349, 88,358, 84,352" fill="#9c826b" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="93,347, 104,344, 117,345, 124,354, 121,357, 116,351, 112,351, 108,355, 102,351" fill="#9c826b" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><g><polygon points="105,12, 111,18, 113,24, 113,29, 119,34, 116,23, 112,16" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="122,27, 125,34, 127,43, 128,34, 125,29" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="115,13, 122,19, 122,15, 113,10" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/></g><polygon points="116,172, 107,182, 98,193, 98,183, 90,199, 89,189, 84,207, 88,206, 87,215, 95,206, 93,219, 91,230, 98,216, 97,226, 104,214, 112,209, 104,208, 113,202, 126,200, 139,207, 132,198, 142,203, 134,192, 142,195, 134,187, 140,185, 130,181, 136,177, 126,177, 125,171, 116,180" fill="#ffe5b2" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="74,220, 67,230, 67,221, 59,235, 63,233, 60,248, 70,232, 65,249, 71,243, 67,256, 73,250, 69,262, 73,259, 71,267, 76,262, 72,271, 78,270, 76,275, 82,274, 78,290, 86,279, 86,289, 92,274, 88,275, 87,264, 82,270, 82,258, 77,257, 78,247, 73,246, 77,233, 72,236" fill="#ffe5b2" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="133,230, 147,242, 148,250, 145,254, 138,247, 129,246, 142,245, 138,241, 128,237, 137,238" fill="#ffe5b2" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="133,261, 125,261, 116,263, 111,267, 125,265" fill="#ffe5b2" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="121,271, 109,273, 103,279, 99,305, 92,316, 85,327, 83,335, 89,340, 97,341, 94,336, 101,336, 96,331, 103,330, 97,327, 108,325, 99,322, 109,321, 100,318, 110,317, 105,314, 110,312, 107,310, 113,308, 105,306, 114,303, 105,301, 115,298, 107,295, 115,294, 108,293, 117,291, 109,289, 117,286, 109,286, 118,283, 112,281, 118,279, 114,278, 119,276, 115,274" fill="#ffe5b2" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="79,364, 74,359, 74,353, 76,347, 80,351, 83,356, 82,360" fill="#ffe5b2" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="91,363, 93,356, 97,353, 103,355, 105,360, 103,366, 99,371, 94,368" fill="#ffe5b2" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="110,355, 114,353, 118,357, 117,363, 113,369, 111,362" fill="#ffe5b2" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="126,354, 123,358, 124,367, 126,369, 129,361, 129,357" fill="#ffe5b2" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="30,154, 24,166, 20,182, 23,194, 29,208, 37,218, 41,210, 41,223, 46,214, 46,227, 52,216, 52,227, 61,216, 59,225, 68,213, 73,219, 70,207, 77,212, 69,200, 77,202, 70,194, 78,197, 68,187, 76,182, 64,182, 58,175, 58,185, 53,177, 50,186, 46,171, 44,182, 39,167, 36,172, 36,162, 30,166" fill="#ffe5b2" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="44,130, 41,137, 45,136, 43,150, 48,142, 48,157, 53,150, 52,164, 60,156, 61,169, 64,165, 66,175, 70,167, 74,176, 77,168, 80,183, 85,172, 90,182, 93,174, 98,181, 99,173, 104,175, 105,169, 114,168, 102,163, 95,157, 94,166, 90,154, 87,162, 82,149, 75,159, 72,148, 68,155, 67,143, 62,148, 62,138, 58,145, 56,133, 52,142, 52,128, 49,134, 47,125" fill="#ffe5b2" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="13,216, 19,219, 36,231, 22,223, 16,222, 22,227, 12,224, 13,220, 16,220" fill="#ffe5b2" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="10,231, 14,236, 25,239, 27,237, 19,234" fill="#ffe5b2" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="9,245, 14,242, 25,245, 13,245" fill="#ffe5b2" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="33,255, 26,253, 18,254, 25,256, 18,258, 27,260, 18,263, 27,265, 19,267, 29,270, 21,272, 29,276, 21,278, 30,281, 22,283, 31,287, 24,288, 32,292, 23,293, 34,298, 26,299, 37,303, 32,305, 39,309, 33,309, 39,314, 34,314, 40,318, 34,317, 40,321, 34,321, 41,326, 33,326, 40,330, 33,332, 39,333, 33,337, 42,337, 54,341, 49,337, 52,335, 47,330, 50,330, 45,325, 49,325, 45,321, 48,321, 45,316, 46,306, 45,286, 43,274, 36,261" fill="#ffe5b2" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="7,358, 9,351, 14,351, 17,359, 11,364" fill="#ffe5b2" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="44,354, 49,351, 52,355, 49,361" fill="#ffe5b2" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="32,357, 37,353, 40,358, 36,361" fill="#ffe5b2" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="139,334, 145,330, 154,330, 158,334, 154,341, 152,348, 145,350, 149,340, 147,336, 141,339, 139,345, 136,342, 136,339" fill="#ffe5b2" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="208,259, 215,259, 212,255, 220,259, 224,263, 225,274, 224,283, 220,292, 208,300, 206,308, 203,304, 199,315, 197,309, 195,318, 193,313, 190,322, 190,316, 185,325, 182,318, 180,325, 172,321, 178,320, 176,313, 186,312, 180,307, 188,307, 184,303, 191,302, 186,299, 195,294, 187,290, 197,288, 192,286, 201,283, 194,280, 203,277, 198,275, 207,271, 200,269, 209,265, 204,265, 212,262" fill="#ffe5b2" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="106,126, 106,131, 109,132, 111,134, 115,132, 115,135, 119,133, 118,137, 123,137, 128,137, 133,134, 136,130, 136,127, 132,124, 118,128, 112,128, 106,126, 106,126, 106,126" fill="#ffe5b2" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="107,114, 101,110, 98,102, 105,97, 111,98, 119,102, 121,108, 118,112, 113,115" fill="#ffe5b2" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="148,106, 145,110, 146,116, 150,118, 152,111, 151,107" fill="#ffe5b2" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="80,55, 70,52, 75,58, 63,57, 72,61, 57,61, 67,66, 57,67, 62,69, 54,71, 61,73, 54,77, 63,78, 53,85, 60,84, 56,90, 69,84, 63,82, 75,76, 70,75, 77,72, 72,71, 78,69, 72,66, 81,67, 78,64, 82,63, 80,60, 86,62" fill="#ffe5b2" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="87,56, 91,52, 96,50, 102,56, 98,56, 92,60" fill="#ffe5b2" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="85,68, 89,73, 98,76, 106,74, 96,73, 91,70" fill="#ffe5b2" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="115,57, 114,64, 111,64, 115,75, 122,81, 122,74, 126,79, 126,74, 131,78, 130,72, 133,77, 131,68, 126,61, 119,57" fill="#ffe5b2" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="145,48, 143,53, 147,59, 151,59, 150,55" fill="#ffe5b2" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="26,22, 34,15, 43,10, 52,10, 59,16, 47,15, 32,22" fill="#ffe5b2" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="160,19, 152,26, 149,34, 154,33, 152,30, 157,30, 155,26, 158,27, 157,23, 161,23" fill="#ffe5b2" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="98,117, 105,122, 109,122, 105,117, 113,120, 121,120, 130,112, 128,108, 123,103, 123,99, 128,101, 132,106, 135,109, 142,105, 142,101, 145,101, 145,91, 148,101, 145,105, 136,112, 135,116, 143,124, 148,120, 150,122, 142,128, 133,122, 121,125, 112,126, 103,125, 100,129, 96,124" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="146,118, 152,118, 152,115, 149,115" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="148,112, 154,111, 154,109, 149,109" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="106,112, 108,115, 114,116, 118,114" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="108,108, 111,110, 116,110, 119,108" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="106,104, 109,105, 117,106, 115,104" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="50,25, 41,26, 34,33, 39,43, 49,58, 36,51, 47,68, 55,69, 54,59, 61,57, 74,46, 60,52, 67,42, 57,48, 61,40, 54,45, 60,36, 59,29, 48,38, 52,30, 47,32" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="147,34, 152,41, 155,49, 161,53, 157,47, 164,47, 158,43, 168,44, 159,40, 164,37, 169,37, 164,33, 169,34, 165,28, 170,30, 170,25, 173,29, 175,27, 176,32, 173,36, 175,39, 172,42, 172,46, 168,49, 170,55, 162,57, 158,63, 155,58, 153,50, 149,46" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="155,71, 159,80, 157,93, 157,102, 155,108, 150,101, 149,93, 154,101, 152,91, 151,83, 155,79" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="112,78, 115,81, 114,91, 112,87, 113,82" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="78,28, 64,17, 58,11, 47,9, 36,10, 28,16, 21,26, 18,41, 20,51, 23,61, 33,65, 28,68, 37,74, 36,81, 43,87, 48,90, 43,100, 40,98, 39,90, 31,80, 30,72, 22,71, 17,61, 14,46, 16,28, 23,17, 33,9, 45,6, 54,6, 65,12" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="67,18, 76,9, 87,5, 101,2, 118,3, 135,8, 149,20, 149,26, 144,19, 132,12, 121,9, 105,7, 89,8, 76,14, 70,20" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="56,98, 48,106, 56,103, 47,112, 56,110, 52,115, 57,113, 52,121, 62,115, 58,123, 65,119, 63,125, 69,121, 68,127, 74,125, 74,129, 79,128, 83,132, 94,135, 93,129, 85,127, 81,122, 76,126, 75,121, 71,124, 71,117, 66,121, 66,117, 62,117, 64,112, 60,113, 60,110, 57,111, 61,105, 57,107, 60,101, 55,102" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="101,132, 103,138, 106,134, 106,139, 112,136, 111,142, 115,139, 114,143, 119,142, 125,145, 131,142, 135,138, 140,134, 140,129, 143,135, 145,149, 150,171, 149,184, 145,165, 141,150, 136,147, 132,151, 131,149, 126,152, 125,150, 121,152, 117,148, 111,152, 110,148, 105,149, 104,145, 98,150, 96,138, 94,132, 94,130, 98,132" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="41,94, 32,110, 23,132, 12,163, 6,190, 7,217, 5,236, 3,247, 9,230, 12,211, 12,185, 18,160, 26,134, 35,110, 43,99" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="32,246, 41,250, 50,257, 52,267, 53,295, 53,323, 59,350, 54,363, 51,365, 44,366, 42,360, 40,372, 54,372, 59,366, 62,353, 71,352, 75,335, 73,330, 66,318, 68,302, 64,294, 67,288, 63,286, 63,279, 59,275, 58,267, 56,262, 50,247, 42,235, 44,246, 32,236, 35,244" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="134,324, 146,320, 159,322, 173,327, 179,337, 179,349, 172,355, 158,357, 170,350, 174,343, 170,333, 163,328, 152,326, 134,329" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="173,339, 183,334, 184,338, 191,329, 194,332, 199,323, 202,325, 206,318, 209,320, 213,309, 221,303, 228,296, 232,289, 234,279, 233,269, 230,262, 225,256, 219,253, 208,252, 198,252, 210,249, 223,250, 232,257, 237,265, 238,277, 238,291, 232,305, 221,323, 218,335, 212,342, 200,349, 178,348" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="165,296, 158,301, 156,310, 156,323, 162,324, 159,318, 162,308, 162,304" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="99,252, 105,244, 107,234, 115,228, 121,228, 131,235, 122,233, 113,235, 109,246, 121,239, 133,243, 121,243, 110,251" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="117,252, 124,247, 134,249, 136,253, 126,252" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="117,218, 132,224, 144,233, 140,225, 132,219, 117,218, 117,218, 117,218" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="122,212, 134,214, 143,221, 141,213, 132,210" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="69,352, 70,363, 76,373, 86,378, 97,379, 108,379, 120,377, 128,378, 132,373, 135,361, 133,358, 132,366, 127,375, 121,374, 121,362, 119,367, 117,374, 110,376, 110,362, 107,357, 106,371, 104,375, 97,376, 90,375, 90,368, 86,362, 83,364, 86,369, 85,373, 78,370, 73,362, 71,351" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="100,360, 96,363, 99,369, 102,364" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="115,360, 112,363, 114,369, 117,364" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="127,362, 125,364, 126,369, 128,365" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="5,255, 7,276, 11,304, 15,320, 13,334, 6,348, 2,353, 0,363, 5,372, 12,374, 25,372, 38,372, 44,369, 42,367, 36,368, 31,369, 30,360, 27,368, 20,370, 16,361, 15,368, 10,369, 3,366, 3,359, 6,352, 11,348, 17,331, 19,316, 12,291, 9,274" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="10,358, 7,362, 10,366, 11,362" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="25,357, 22,360, 24,366, 27,360" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="37,357, 34,361, 36,365, 38,361" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="49,356, 46,359, 47,364, 50,360" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="130,101, 132,102, 135,101, 139,102, 143,103, 142,101, 137,100, 133,100" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="106,48, 105,52, 108,56, 109,52" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="139,52, 139,56, 140,60, 142,58, 141,56" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="25,349, 29,351, 30,355, 33,350, 37,348, 42,351, 45,347, 49,345, 44,343, 36,345" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="98,347, 105,351, 107,354, 109,349, 115,349, 120,353, 118,349, 113,346, 104,346" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="83,348, 87,352, 87,357, 89,351, 87,348" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="155,107, 163,107, 170,107, 186,108, 175,109, 155,109" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="153,114, 162,113, 175,112, 192,114, 173,114, 154,115" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="152,118, 164,120, 180,123, 197,129, 169,123, 151,120" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="68,109, 87,106, 107,106, 106,108, 88,108" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="105,111, 95,112, 79,114, 71,116, 85,115, 102,113" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="108,101, 98,99, 87,99, 78,99, 93,100, 105,102" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="85,63, 91,63, 97,60, 104,60, 108,62, 111,69, 112,75, 110,74, 108,71, 103,73, 106,69, 105,65, 103,64, 103,67, 102,70, 99,70, 97,66, 94,67, 97,72, 88,67, 84,66" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="140,74, 141,66, 144,61, 150,61, 156,62, 153,70, 150,73, 152,65, 150,65, 151,68, 149,71, 146,71, 144,66, 143,70, 143,74" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="146,20, 156,11, 163,9, 172,9, 178,14, 182,18, 184,32, 182,42, 182,52, 177,58, 176,67, 171,76, 165,90, 157,105, 160,92, 164,85, 168,78, 167,73, 173,66, 172,62, 175,59, 174,55, 177,53, 180,46, 181,29, 179,21, 173,13, 166,11, 159,13, 153,18, 148,23" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="150,187, 148,211, 150,233, 153,247, 148,267, 135,283, 125,299, 136,292, 131,313, 122,328, 122,345, 129,352, 133,359, 133,367, 137,359, 148,356, 140,350, 131,347, 129,340, 132,332, 140,328, 137,322, 140,304, 154,265, 157,244, 155,223, 161,220, 175,229, 186,247, 185,260, 176,275, 178,287, 185,277, 188,261, 196,253, 189,236, 174,213" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="147,338, 142,341, 143,345, 141,354, 147,343" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="157,342, 156,349, 150,356, 157,353, 163,346, 162,342" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/><polygon points="99,265, 96,284, 92,299, 73,339, 73,333, 87,300" transform="matrix(0.9848077 0.17364818 -0.17364818 0.9848077 65.94442 -2.0653005)"/></g></svg>
\ No newline at end of file
Binary file contrib/AnyWikiDraw/demo/lib/Splash.gif has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/AnyWikiDraw/guide/contents/changes.html	Fri Oct 30 21:03:37 2009 +0100
@@ -0,0 +1,126 @@
+<html>
+    <head>
+    <title>AnyWikiDraw Changes</title>
+    <link href="style.css" rel="stylesheet" type="text/css">
+    </head>
+    <body>
+        <h1>AnyWikiDraw Changes</h1>
+        <h2>0.14 2009-10-18</h2>
+        <h3>Enhancements</h3>
+        <ul>
+          <li>Added support for MoinMoin Wiki.</li>
+          <li>Upgraded to JHotDraw 7.3.1.</li>
+        </ul>
+        <h2></h2>
+        <h2>0.13.3 2009-07-08</h2>
+    <h3>Fixes</h3>
+        <ul>
+          <li>MediaWiki:<br>
+            - Thumbnail image was not stored when no SVG converter was installed.<br>
+          - A PHP error occured when the width or height was not specified in the drawing tag.</li>
+        </ul>
+        <h2></h2>
+        <h2>0.13.2 2009-07-07</h2>
+    <h3>Enhancements</h3>
+        <ul>
+          <li>Added distinct plugins for TWiki version 4.1 and 4.3. </li>
+        </ul>
+        <h3>Fixes</h3>
+        <ul>
+          <li>The first time the text of a figure was edited, the text field filled the whole drawing view. </li>
+        </ul>
+        <h2>0.13.1 2009-06-30</h2>
+    <h3>Fixes</h3>
+        <ul>
+          <li>Switched off debug mode, because the applet did not work when used with the Sun J2SE 6 JVM.</li>
+          </ul>
+        <h2>0.13 2009-06-28</h2>
+    <h3>Enhancements</h3>
+        <ul>
+          <li>Added support for MediaWiki 1.8, 1.10, 1.11, 1.13, 1.14, 1.15.</li>
+          <li>Upgraded to JHotDraw 7 revision 538.</li>
+        </ul>
+        <h3>Fixes</h3>
+        <ul>
+          <li>The scribble tool does not create anymore control points which are far away.</li>
+          <li>The size of the drawing is now stored in SVG images.</li>
+        </ul>
+        <h2>0.12.11 2009-03-13</h2>
+    <h3>Enhancements</h3>
+        <ul>
+            <li>Upgraded to JHotDraw 7 revision 476.</li>
+        </ul>
+        <h2>0.11 2008-05-28</h2>
+        <h3>Enhancements</h3>
+        <ul>
+            <li>Redesigned toolbars of the drawing applet (work in progress).</li>
+            <li>MediaWiki: AnyWikiDraw works now also with MediaWiki 1.9.3 and 1.12.0.</li>
+        </ul>
+    <h3>Fixes</h3>
+        <ul>
+          <li>Loading and Saving: The applet edits now always the current image, and not old versions of an image.</li>
+        </ul>
+        <h2>0.10 2007-06-03</h2>
+    <h3>Enhancements</h3>
+        <ul>
+            <li>TWiki: Introducing support for TWiki.</li>
+        </ul>
+        <h3>Fixes</h3>
+        <ul>
+          <li>Applet: Grid Toggle button was not always selected when the grid was turned on.</li>
+        </ul>
+    <h2>0.9</h2>
+        <h3>Enhancements</h3>
+        <ul>
+            <li>PmWiki: Introducing support for PmWiki.</li>
+        </ul>
+        <h3>Fixes</h3>
+        <ul>
+            <li>Applet: Entry fields for opacity and line width did not work.</li>
+            <li>MediaWiki: Image maps did not always work.</li>
+        </ul>
+        <h2>0.8 2007-05-27</h2>
+        <h3>Enhancements</h3>
+        <ul>
+            <li>Applet: Implemented all new user interface for the drawing editor.</li>
+        </ul>
+        <h3>Fixes</h3>
+        <ul>
+            <li>Applet: Fixed bugs with SVG files containing gradients.</li>
+            <li>MediaWiki: The server side code now properly stores the rendered PNG and HTML map files for the first revision of a drawing.</li>
+            <li>MediaWiki: When a drawing is sent to the applet, HTTP caching is now disabled, to prevent that an old version of a drawing is shown in the editor.</li>
+        </ul>
+        <h2>0.7 2007-04-24</h2>
+        <h3>Enhancements</h3>
+        <ul>
+            <li>Applet: A change summary can now be entered.</li>
+            <li>Applet: Links can now be added to figures.</li>
+        </ul>
+        <h3>Fixes</h3>
+        <ul>
+            <li>Applet: Fixes bugs with reading and writing SVG text areas and SVG path attributes.</li>
+            <li>MediaWiki: The server side code uses now variables from MediaWiki to determine the location of the applet files.</li>
+        </ul>
+        <h2>0.6 2007-04-16</h2>
+        <h3>Enhancements</h3>
+        <ul>
+            <li>Applet: User preferences, such as whether the grid is on or off, are now rememberd.</li>
+        </ul>
+        <h3>Fixes</h3>
+        <ul>
+            <li>Applet: The position of SVG Text figures was lost sometimes.</li>
+        </ul>
+        <h2>0.5 2007-04-15</h2>
+        <h3>Fixes</h3>
+        <ul>
+            <li>Applet: Fixed several SVG issues.</li>
+        </ul>
+        <h2>0.4 2007-04-10</h2>
+        <h3>Enhancements</h3>
+        <ul>
+            <li>MediaWiki: Introducing support for MediaWiki.</li>
+        </ul>
+    </body>    
+</html>
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/AnyWikiDraw/guide/contents/copyright.html	Fri Oct 30 21:03:37 2009 +0100
@@ -0,0 +1,25 @@
+<html>
+    <head>
+    <title>AnyWikiDraw Copyright</title>
+    <link href="style.css" rel="stylesheet" type="text/css">
+    </head>
+    <body>
+        <h1>AnyWikiDraw Copyright</h1>
+        <p>AnyWikiDraw is copyright by
+        <a href="http://sourceforge.net/projects/anywikidraw">AnyWikiDraw.org</a>
+             and its contributors.</p>
+        <p>Project owners</p>
+        <ul>
+            <li>Werner Randelshofer, werner.randelshofer@bluewin.ch</li>
+            <li>Cjaran Jessup, ciaranj@gmail.com</li>
+        </ul>
+        <p>Parts of the code are copyright by </p>
+        <ul>
+            <li><a href="http://sourceforge.net/projects/jhotdraw">JHotDraw.org<a> and its contributors</li>
+            <li><a href="http://www.pmwiki.org/wiki/Cookbook/PmWikiDraw">PmWikiDraw.org<a> and its contributors</li>
+            <li><a href="http://twiki.org/cgi-bin/view/Plugins/TWikiDrawPluginDev">TWikiDraw.org<a> and its contributors</li>
+        </ul>
+    </body>    
+</html>
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/AnyWikiDraw/guide/contents/license.html	Fri Oct 30 21:03:37 2009 +0100
@@ -0,0 +1,22 @@
+<html>
+    <head>
+    <title>AnyWikiDraw License</title>
+    <link href="style.css" rel="stylesheet" type="text/css">
+    </head>
+    <body>
+        <h1>AnyWikiDraw License</h1>
+        <p>You can license most parts of AnyWikiDraw under the <p>
+        <p>Lesser GNU Public License (LGPL)<br/>
+            <a href="http://www.gnu.org/licenses/lgpl.html">http://www.gnu.org/licenses/lgpl.html</a>
+        </p>
+        <p>or under the</p>
+        <p>Creative Commons Attribution 3.0 License<br/>
+            <a href="http://creativecommons.org/licenses/by/3.0">http://creativecommons.org/licenses/by/3.0</a>
+        </p>
+            <p>Some server side code of AnyWikiDraw links with GNU licensed code.</p>
+        You can license this code under the</p> 
+        <p>GNU General Public License (GPL)<br/>
+        <a href="http://www.gnu.org/copyleft/gpl.html">http://www.gnu.org/copyleft/gpl.html</a>
+        <p>
+    </body>    
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/AnyWikiDraw/guide/contents/mediawiki.html	Fri Oct 30 21:03:37 2009 +0100
@@ -0,0 +1,88 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+    <title>AnyWikiDraw for MediaWiki</title>
+    <link href="style.css" rel="stylesheet" type="text/css" />
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+</head>
+    <body>
+        <h1>AnyWikiDraw for MediaWiki</h1>
+    <h3>Usage</h3>
+        <p>To include a drawing in a MediaWiki page, write the following tag in the
+        page:</p>
+        <p><code>{{#drawing:drawing.svg|width|height}}</code></p>
+        <ul>
+            <li>The tag needs to be put into double curly braces.</li>
+            <li>The name of the tag is <code>#drawing:</code></li>
+            <li>The parameter <code>drawing.svg</code> specifies the name of the drawing file.</li>
+            <li>The drawing file can have one of the following extensions 
+            <code>.svg</code>,<code> .png</code>, 
+            <code>.jpg</code>.</li> 
+          <li>If you specify an drawing file that does not yet exist in your Wiki, 
+            the drawing is created the first time you save a drawing.</li>
+            <li>The parameter width specifies the width of the drawing.</li>
+            <li>The parameter height specifies the height of the drawing.</li>
+         </ul>
+         <h3>Security considerations</h3>
+         <ul>
+           <li><span style="color:#990000">This is an experimental extension. Data loss may occur.<br /> 
+               <em>Install
+           it only on a Wiki system that does not contain critical data.</em><br />
+             <br />
+           </span></li>
+           <li>You need to grant access to session cookies to JavaScript and Java.<br />
+             <em>You may not want to do this if your wiki embeds JavaScript code from untrusted sources.<br />
+             F
+             or example if your wiki embeds banners and advertisements from a third party system.</em><br />
+             <br />
+           </li>
+           <li> You need to allow file upload to your users.<br />
+             <em>You may not want to do this if your wiki allows user account creation by people not known to you.             </em>           </li>
+         </ul>
+             <h3 align="left">Installation instructions</h3>
+         <ol>
+             <li >Enable Cookie access by JavaScript and Java Applets in  the <code>LocalSettings.php</code> script:<br />
+               <br />
+               <code>$wgCookieHttpOnly = false;</code><br />
+               <br />
+           </li>
+           <li>Enable file uploading in  <code>LocalSettings.php</code> script:<br />
+               <br />
+               <code>$wgEnableUploads = true;</code><br />
+                 <code></code><br /></li>
+           <li>If you want to use AnyWikiDraw as SVG editor, make sure that you have properly installed and enabled SVG support on your MediaWiki server. For example, if you have installed ImageMagick on your server, you can activate SVG support using the following lines in  the <code>LocalSettings.php</code> script:<br />
+               <code><br />
+               $wgUseImageMagick = true;<br />
+$wgImageMagickConvertCommand='/opt/local/bin/convert';<br />
+$wgSVGConverterPath='/opt/local/bin';<br />
+$wgFileExtensions[] = 'svg';<br />
+             </code><code><br />
+</code></li>
+             <li>Place the AnyWikiDraw folder into 
+             the <code>extensions</code> folder of your MediaWiki server. <br />
+             <em>Please note, that different versions of this extension exist for different versions of MediaWiki.</em><br />
+             <br />
+             </li>
+             <li>To activate this extension add the
+                 following lines to your <code>LocalSettings.php</code> script:<br/>
+                 <code><br />
+             require_once(&quot;extensions/AnyWikiDraw/AnyWikiDraw.php&quot;);</code></li>
+         </ol>
+               <h3>Summary of changes to LocalSettings.php</h3>
+               <p class="listing"><code>// Enable cookie access by JavaScript and Java Applets<br />
+               $wgCookieHttpOnly = false;<br />
+               <br />
+               </code><code>// Enable file upload<br />
+               $wgEnableUploads = true;</code><br />
+               <br />
+               <code>// Enable an SVG converter, for example ImageMagick<br />
+               $wgUseImageMagick = true;<br />
+               $wgImageMagickConvertCommand='/opt/local/bin/convert';<br />
+    $wgSVGConverterPath='/opt/local/bin';</code><br />
+    <code><code>$wgFileExtensions[] = 'svg';<br />
+    </code><br />
+      </code><code>// Enable AnyWikiDraw<br />
+    require_once(&quot;$IP/extensions/AnyWikiDraw/AnyWikiDraw.php&quot;);</code></p>
+</body>    
+</html>
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/AnyWikiDraw/guide/contents/moinmoin.html	Fri Oct 30 21:03:37 2009 +0100
@@ -0,0 +1,15 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+    <title>AnyWikiDraw for TWiki</title>
+    <link href="style.css" rel="stylesheet" type="text/css" />
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head>
+    <body>
+        <h1>AnyWikiDraw for MoinMoin</h1>
+    <h3>Usage</h3>
+        <p>To do</p>
+        <h3>Installation instructions</h3>
+        <p>To do</p>
+</body>    
+</html>
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/AnyWikiDraw/guide/contents/pmwiki.html	Fri Oct 30 21:03:37 2009 +0100
@@ -0,0 +1,42 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+    <title>AnyWikiDraw for PmWiki</title>
+    <link href="style.css" rel="stylesheet" type="text/css" />
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head>
+    <body>
+        <h1>AnyWikiDraw for PmWiki</h1>
+    <h3>Usage</h3>
+        <p>To include a drawing in a PmWiki page, write the following tag in the
+        page:</p>
+        <p><code>(:drawing drawing.svg|width|height:)</code></p>
+        <ul>
+            <li>The tag needs to be put into smileys.</li>
+            <li>The name of the tag is <code>drawing</code></li>
+            <li>The parameter <code>drawing.svg</code> specifies the name of the drawing file.</li>
+            <li>The drawing file can have one of the following extensions 
+                    <code>.draw</code>, <code>.svg</code>, <code>.svgz</code>, <code>.png</code>, 
+                <code>.jpg</code>.</li> 
+            <li>If you specify a drawing file that does not yet exist in your Wiki, 
+            the drawing is created the first time you save a drawing.</li>
+            <li>The parameter width specifies the width of the drawing.</li>
+            <li>The parameter height specifies the height of the drawing.</li>
+    </ul>
+         <h3>Installation instructions</h3>
+         <ol>
+             <li style="color:#990000">This is an experimental cookbook. Data loss may occur. Install
+             it only on a Wiki system that does not contain critical data.</li>
+             <li>This extension adds inline drawing editing support to your Wiki.
+                 Make sure, that you have proper licenses for all drawings on your 
+             Wiki.</li> 
+             <li>Deinstall the PmWikiDraw cookbook. AnyWikiDraw includes the 
+             PmWikiDraw cookbook. Having them installed both will result into 
+             conflicts between the two cookbooks.</li> 
+             <li>To activate this cookbook, place the AnyWikiDraw folder into 
+                 the cookbooks folder of your PmWiki server, and add the
+                 following line to your config.php script:<br/>&nbsp;<br/>
+             <code>include_once(&quot;cookbook/AnyWikiDraw/AnyWikiDraw.php&quot;);</code></li>
+         </ol>
+</body>    
+</html>
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/AnyWikiDraw/guide/contents/readme.html	Fri Oct 30 21:03:37 2009 +0100
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+    <title>AnyWikiDraw Read Me</title>
+    <link href="style.css" rel="stylesheet" type="text/css" />
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head>
+    <body>
+        <h1>AnyWikiDraw Read Me</h1>
+        <p>AnyWikiDraw adds support for drawing directly into a Wiki page.
+    </p><p>The following file formats are supported:</p>
+        <ul>
+            <li>Scaleable Vector Graphics (.svg, .svgz)</li>
+            <li>Portable Network Graphics (.png)</li>
+            <li>Joint Photographics Expert Group (.jpg, .jpeg)</li>
+            <li>PmWikiDraw (.draw) <em>only supported on PmWiki</em></li>
+        </ul>
+        <p>The following Wikis are supported:</p>
+        <ul>
+            <li><a href="mediawiki.html">MediaWiki</a></li>
+            <li><a href="pmwiki.html">PmWiki</a></li>
+            <li><a href="twiki.html">TWiki</a></li>
+            <li><a href="moinmoin.html">MoinMoin</a></li>
+        </ul>
+</body>    
+</html>
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/AnyWikiDraw/guide/contents/style.css	Fri Oct 30 21:03:37 2009 +0100
@@ -0,0 +1,156 @@
+@charset "UTF-8";
+/* CSS Document */
+
+* {
+	font-family: Verdana, Helvetica, Arial, sans-serif;
+	font-size: 12px;
+	line-height: 125%; /* = 15 pixel for 12 px fonts */
+	text-align: left;
+	margin: 0px;
+	padding: 0px;
+}
+body {
+	margin: 10px;
+	padding: 0px;
+}
+code {
+	font-family: Courier, monospace;
+}
+h1, h2, h3, h4 {
+	font-family: Tahoma, Helvetica, Arial, sans-serif;
+}
+h1 {
+	font-size: 28px;
+	margin: 0px 0 18px 0;
+	font-weight: bold;
+	line-height: 100%;
+}
+h2 {
+	font-size: 20px;
+	font-weight: bold;
+	margin: 18px 0 18px 0;
+	line-height: 120%;
+}
+h3 {
+	font-size: 18px;
+	font-weight: normal;
+	line-height: 120%;
+	margin: 18px 0 18px 0;
+}
+h4 {
+	font-weight: bold;
+}
+p {
+	margin-bottom: 9px;
+}
+p+h2, ul+h2 {
+	margin-top: 36px;
+}
+ul {
+	margin-bottom: 9px;
+	margin-left: 16px;
+}
+ol {
+	margin-bottom: 9px;
+	margin-left: 16px;
+}
+
+
+table {
+	margin-bottom: 18px;
+}
+th {
+	padding: 2px;
+	font-weight: bold;
+}
+td {
+	padding: 2px;
+}
+b, strong, i {
+	font-size:inherit;
+}
+
+#header {
+}
+#footer {
+}
+#nav1 {
+	background-color: #F0F0F0;
+}
+#nav2 {
+	background-color: #F0F0F0;
+}
+
+
+
+#notationBody, #noteBody, #cubeBody, #scriptBody {
+	width: 600px;
+}
+#notationBody table {
+
+}
+#notationBody  td {
+	background-color: #F0F0F0;
+}
+#notationBody th {
+	background-color: #CCCCCC;
+}
+#notationBody td.rowspacer {
+	background-color: #fff;
+}
+
+.listing {
+	font-family: Courier, monospace;
+	background-color: #f0f0f0;
+	padding: 6px 8px 6px 8px;
+	margin-bottom: 16px;
+	border: solid 1px #CCCCCC;
+}
+
+.listingTopFragment {
+	font-family: Courier, monospace;
+	background-color: #f0f0f0;
+	padding: 6px 8px 6px 8px;
+	margin-bottom: 16px;
+	border-top: solid 1px #CCCCCC;
+	border-right: solid 1px #CCCCCC;
+	border-left: solid 1px #CCCCCC;
+	border-bottom: dotted 1px #CCCCCC;
+}
+.listingMiddleFragment {
+	font-family: Courier, monospace;
+	background-color: #f0f0f0;
+	padding: 6px 8px 6px 8px;
+	margin-bottom: 16px;
+	border-top: dotted 1px #CCCCCC;
+	border-right: solid 1px #CCCCCC;
+	border-left: solid 1px #CCCCCC;
+	border-bottom: dotted 1px #CCCCCC;
+}
+.listingBottomFragment {
+	font-family: Courier, monospace;
+	background-color: #f0f0f0;
+	padding: 6px 8px 6px 8px;
+	margin-bottom: 16px;
+	border-top: dotted 1px #CCCCCC;
+	border-bottom: solid 1px #CCCCCC;
+	border-right: solid 1px #CCCCCC;
+	border-left: solid 1px #CCCCCC;
+}
+
+
+.tip {
+	color: #333;
+	font-size: 10px;
+}
+.description {
+	font-size: 10px;
+}
+.marginalia {
+	font-size: 10px;
+	text-align: right;
+	padding-right: 10px;
+}
+.paddingdouble {
+	padding-top: 16px;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/AnyWikiDraw/guide/contents/twiki.html	Fri Oct 30 21:03:37 2009 +0100
@@ -0,0 +1,41 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+    <title>AnyWikiDraw for TWiki</title>
+    <link href="style.css" rel="stylesheet" type="text/css" />
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head>
+    <body>
+        <h1>AnyWikiDraw for TWiki</h1>
+    <h3>Usage</h3>
+        <p>To include a drawing in a TWiki page, write the following tag in the
+        page:</p>
+        <p><code>%ANYWIKIDRAW{ &quot;drawing.svg&quot; width=&quot;240&quot; height=&quot;320&quot;}%<br />
+  %AWDRAW{ &quot;drawing.svg&quot; width=&quot;240&quot; height=&quot;320&quot;}%</code></p>
+        <ul>
+          <li>            The parameter drawing.svg specifies the name of the drawing file.<br />
+            </li>
+          <li>The drawing file can have one of the following extensions .draw, .svg, .svgz, .png, .jpg.<br />
+            </li>
+          <li>If you specify a drawing file that does not yet exist in your Wiki, the drawing is created the first time you save a drawing.<br />
+            </li>
+          <li>The parameter width specifies the width of the drawing.<br />
+            </li>
+          <li>The parameter height specifies the height of the drawing.</li>
+        </ul>
+    <h3>Installation instructions</h3>
+         <ol>
+             <li style="color:#990000">This is an experimental plugin. Data loss may occur. Install
+             it only on a Wiki system that does not contain critical data.<br />
+             <br />
+             </li>
+           <li>Copy the AnyWikiDraw files over 
+                 the TWiki server files. <br />
+                 <em>Please note, that different versions of this plugin exist for different</em><em> versions of TWiki.<br />      
+                 <br />
+                 </em></li>
+           <li>Enable the AnyWikDrawPlugin on the
+             configuration page of TWiki. </li>
+         </ol>
+</body>    
+</html>
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/AnyWikiDraw/guide/index.html	Fri Oct 30 21:03:37 2009 +0100
@@ -0,0 +1,14 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<title>PocketPlayer</title>
+</head>
+
+<frameset cols="200,*" frameborder="no" border="0" framespacing="0">
+  <frame src="nav.html" name="nav" scrolling="No" noresize="noresize" id="nav" />
+  <frame src="contents/readme.html" name="main" id="main" />
+</frameset>
+<noframes><body>
+</body>
+</noframes></html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/AnyWikiDraw/guide/nav.html	Fri Oct 30 21:03:37 2009 +0100
@@ -0,0 +1,25 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<title>Navigation</title>
+<link href="contents/style.css" rel="stylesheet" type="text/css" />
+</head>
+
+<body id="nav1">
+<h5>AnyWikiDraw</h5>
+<ul><li><a href="contents/readme.html" target="main">Read Me</a></li>
+  <li><a href="contents/changes.html" target="main">Changes </a></li>
+  <li>
+    <a href="contents/license.html" target="main">License</a></li>
+</ul>
+<h5>Usage and Installation</h5>
+<ul>
+  <li><a href="contents/mediawiki.html" target="main">MediaWiki</a></li>
+  <li><a href="contents/pmwiki.html" target="main">PmWiki</a></li>
+  <li><a href="contents/twiki.html" target="main">TWiki</a></li>
+  <li><a href="contents/moinmoin.html" target="_parent">MoinMoin</a></li>
+</ul>
+<p>&nbsp;</p>
+</body>
+</html>
Binary file contrib/AnyWikiDraw/src.tar.bz has changed