[pmwiki-devel] Sharing common functions between recipes / a core modification request
Hans
design5 at softflow.co.uk
Sat Nov 4 05:16:36 CST 2006
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.
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.
function DewPlayer($pagename, $tgt, $args) {
global $FarmPubDirUrl;
if(!ResolveLink($pagename, $tgt, $url, $lpath, $txt))
return isset($lpath) ? $url : '';
$out = '<object type="application/x-shockwave-flash"
data='.$FarmPubDirUrl.'/dewplayer/dewplayer-mini.swf?mp3='.$tgt.'&bgcolor=FFFFFF"
width="150" height="20">
<param name="movie"
value='.$FarmPubDirUrl.'/dewplayer/dewplayer-mini.swf?mp3='.$tgt.'&bgcolor=FFFFFF" />
</object>';
return $out;
}
$tgt gets just the value of Attach:filename
Hans
Hans
More information about the pmwiki-devel
mailing list