[dokuwiki] Plugin writing

  • From: "Cheremin Ruslan" <cheremin@xxxxxxxxx>
  • To: <dokuwiki@xxxxxxxxxxxxx>
  • Date: Tue, 13 Oct 2009 16:19:00 +0400

Good day, all

I'm new in DokuWiki and I want to use it as base for educational website. I
need to add some new tags to wiki markup, especially one, for including java
applet onto the page (syntax plugin). I've used  existing plugins as
examples, and read docs on plugins on DokuWiki website. But it left some
points unclear, so I want to ask it here:

First of all, I want my plugin to bundle applet .jar file with it. So, I
want to create 'jars' subfolder inside my plugins folder  and put applet jar
into it. But how should I refer base URL of this folder
(lib/plugins/<my-plugin>/jars/) onto the page? I've tried it like
DOKU_URL.'lib/plugins/<my-plugin>/jars', but it seems to work unstable,
depending of url-rewriting mode and server settings. What is the correct way
to refer such files from inside plugin folder?

Second question is about refering the media files. Applet I've used is
actually a player for some kind of files. This files I've uploading as media
files, so, for example, I have :wiki:test.mkz media file. How can I refer
such file from <object> tag? For now I use
DOKU_URL.'lib/exe/fetch.php?w=&amp;h=&amp;cache=cache&amp;media=' .
str_replace( ":", "/", $file ) syntax, is it legal way? And what if I user
wants to use relative reference, e.g. referer the file :wiki:test.mkz from
page :wiki:test as just plain test.mkz without namespace prefix -- how can I
resolve such relative references?

Thank you for support!

Ruslan


 

-- 
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist

Other related posts: