[pmwiki-devel] Sharing common functions between recipes / a core modification request

Dominique Faure dominique.faure at gmail.com
Sat Nov 4 07:22:16 CST 2006


On 11/4/06, Hans <design5 at softflow.co.uk> wrote:
> Thursday, November 2, 2006, 11:06:34 AM, Dominique wrote:
>
> > Thus, my request core modification is to provide an
> > ExplodeLink()-equivalent function in (and BTW having ResolveLink()
> > using it).
>
> > The ResolveLink() could be efficiently shared between all the recipes
> > that would make use of attachement/url specifications and therefore
> > being integrated also...
>
> Dom, I am all for reusing functions and code.
> Especially since I have difficulty in understanding them anyway!
> I can't comment on the implications of your request for changing the
> ExplodeLink function in pmwiki (if I understood you correctly).
> But I hope Pm was listening.
>

In fact, the core only has the "all-in-one" MakeLink() function available.
My purpose here was to have it splitted in two, with something
equivalent to my ExplodeLink() made available in the core. (the
current implementation is a quasi pure copy-paste).

> I would like to be able to use your ResolveLink() function,
> but I have not got it to work, since i don't understand it enough.
> I tried to construct a dewplayer (thanks for the link, a sweet
> little flash player!), but it worked only for external hhtp:// type
> links, Attach: links worked for uploading, but went into the html as
> Attach:file.ext, the path to uploads/Group etc was not converted.
> Can you tell me what I am missing?
> I used this code, plus the markup directive and the two functions
> you shared.

Feel free to play with my attached reference code (btw, soon to be
published as a recipe). The markup syntax is:

(:dewplayer MY_FILE MY_OPTIONS:)

with MY_FILE as url or attachment links and optionnaly MY_OPTIONS as:
width=... height=... bgcolor=... autoplay=... showtime=... volume=...
(dewplayer own options)
+link -link (provide links to the file before [-] and/or after [+] the
player itself)
txt=... (alternate text link)

As an example:

* (:dewplayer (Attach:)PmSong(.mp3) +link:)
* (:dewplayer http://localhost/~dfa/uploads/Test/PmSong.mp3 +link
txt="The PmWiki Song":)

Dom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dewplayer.php
Type: application/octet-stream
Size: 3602 bytes
Desc: not available
Url : /pipermail/pmwiki-devel/attachments/20061104/47c5fd7d/attachment.obj 


More information about the pmwiki-devel mailing list