[Pmwiki-users] help needed for custom markup
Knut Alboldt
pmwiki
Tue Dec 28 09:47:31 CST 2004
Benoit Pointet schrieb:
> Dear & happy PmWiki users,
>
> i'm using PmWiki as part of an electronic music band website, the other
> part being a mp3 browser/player.
>
> i want to have a new markup:
>
> play:RELPATH
>
> that will create such a HTML tag:
>
> <a href="player.php?path=RELPATH" target="player"><img
> src="track.png"/></a>
>
> but i've never really studied regexps and need help concerning this markup:
>
> - could somebody be kind enough to hack a markup declaration for me?
try:
Markup('play',
'directive',
'/play:(\S*)/',
'<a href="/somewhere/player.php?path=$1" target="player">
<img src="/anywhere/track.png"/>play this song</a>');
Do only use URL-convienient characters in the song's url (no space etc).
> - where should i add it? in local/config.php?
should do it. You can also put in in an extra script (e.g.
local/player.php) and include this in your local/config:
include_once("local/player.php");
Knut
More information about the pmwiki-users
mailing list