Table of Contents
jspwiki_import Plugin
Compatible with DokuWiki
2008-05-05
This extension has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues.
Extension name contains underscore, will not generate popularity points.
When migrating from JspWiki to DokuWiki, this plugin may help you in adapting the syntax style. With the help of JavaScript, it converts the most common notations from one language to the other.
Requirements
I've developed the plugin under the DokuWiki version of 2006-11-06. Since the current Development Version provides a new way to add toolbar buttons, I don't know whether it still works then without adaptation.
It does not work. Button is not incorporated into the toolbar.
Just change your lib/plugins/jspwiki_import/script.js
by
- renaming
insertJspWikiImportButton()
toinsertJspWikiImportButtonOld()
- Add the following code :
function addBtnActionJspInsert(btn,props,edid){ addEvent(btn,'click',function(){ openJspWikiTranslationPage(); return false; } ); return true; } /* * Register the toolbar button (old fashioned way) */ function insertJspWikiImportButton() { if(window.toolbar!=undefined){ toolbar[toolbar.length] = {"type":"JspInsert", "title":"Import JSPWiki-page", "icon":"../../plugins/jspwiki_import/jspwiki_logo.png", "key":"j"} } }
Download / Installation
Download and install the plugin using the Extension Manager. Refer to Plugins on how to install plugins manually.
Usage
This plugin adds a new button to your toolbar, when in edit mode: When you click this button, a new window will pop up, providing an edit box where you can paste your JspWiki syntax. Then, click the Conversion button and the converted text will be inserted into your current DokuWiki page.
Shortcomings
The importer is written using the Google Web Toolkit to compile the original Java JspWikiParser to JavaScript. Therefore, the JavaScript-file is currently somehow huge. As well, transformation is not 100% perfect, but it nevertheless is a big time saver.
Source
Known issues
Syntax error in action.php
The provided plugin does not work, because it contains a synthax error in action.php. So in order to get this working, you have to change line 31 to:
'name' => 'JspWiki Import',
Path error in script.js
Pressing the “JspWiki Import” button opened the URL
I changed the line 27 from script.js from
<wiki page path>/lib/plugins/jspwiki_import/importer/JspConverter.html
, which page really doesn't exist.
function openJspWikiTranslationPage () { jspw_converter = window.open("lib/plugins/jspwiki_import/importer/JspConverter.html", 'JspWikiConverter', "dependent=yes,locationbar=no,menubar=0,resizable=yes,status=no,width=560,height=400"); jspw_converter.focus(); }
to
function openJspWikiTranslationPage () { jspw_converter = window.open("./importer/JspConverter.html", 'JspWikiConverter', "dependent=yes, locationbar=no,menubar=0,resizable=yes,status=no,width=560,height=400"); jspw_converter.focus(); }
Now it is working — Uwe Kirbach
No, that was false. Original path should be kept. — Uwe Kirbach 03.05.2009