浏览代码

Merge branch 'wiki-draw-io'

Wiki draw io is now correctly explained to be installed sucessfully.
DricomDragon 5 年之前
父节点
当前提交
11d95b850c
共有 2 个文件被更改,包括 21 次插入0 次删除
  1. 16 0
      Guides/wiki.md
  2. 5 0
      Install/Templates/mediawiki/LocalSettings.php

+ 16 - 0
Guides/wiki.md

@@ -105,6 +105,22 @@ _todo_
 
 _todo_
 
+## Extensions
+
+### Draw.io
+
+[Extension:DrawioEditor](https://www.mediawiki.org/wiki/Extension:DrawioEditor)
+
+```
+cd /var/www/mediawiki/extensions/
+
+sudo git clone https://github.com/mgeb/mediawiki-drawio-editor DrawioEditor
+
+sudo git clone https://github.com/p12tic/NativeSvgHandler.git
+```
+
+**Fix SVG upload** : add `http://www.w3.org/1999/xhtml` in `/var/www/mediawiki/includes/upload/UploadBase.php`.
+
 ## Uninstall Mediawiki
 
 ### Disable site

+ 5 - 0
Install/Templates/mediawiki/LocalSettings.php

@@ -152,3 +152,8 @@ $wgSessionCacheType = CACHE_DB;
 
 # Add file extensions
 $wgFileExtensions = array('ppt', 'pptx', 'pdf', 'doc', 'docx', 'odt', 'odp', 'xml', 'json');
+
+# Enable extensions
+require_once "$IP/extensions/DrawioEditor/DrawioEditor.php";
+require_once "$IP/extensions/NativeSvgHandler/NativesSvgHandler.php";
+