[pmwiki-users] icons for uploaded files but...
Patrick R. Michaud
pmichaud at pobox.com
Tue Nov 14 08:30:12 CST 2006
On Mon, Nov 13, 2006 at 02:37:09PM -0800, Nicholas Buttle wrote:
> After help from the group I've managed to get an icon
> displayed for links to eg. .mov .doc .xls files etc
>
> But, I don't want the icons to be displayed for some
> files like .jpg or .gif
>
> can I introduce an 'if' statement into the markup
> below to choose which file extensions I want to show
> and which not. markup pasted below.
>
> #Icons for uploaded .xls .doc etc
> Markup('attachicon', 'inline',
> '/Attach:(.*?)\\.(\\w{1,4})/',
> 'http://localhost/wiki3nov/pub/icons/$2.png
> Attach:$1.$2');
Try:
Markup('attachicon', '<links'
"/\\bAttach:[^\\s$UrlExcludeChars]*\\.(mov|doc|xls)/",
'http://localhost/wiki3nov/pub/icons/$2.png $0');
This adds an icon for .mov, .doc, and .xls files (but not others).
Pm
More information about the pmwiki-users
mailing list