|
Cookbook /
AttachIconsSummary: Add icon images to Attach file links according to file extension
Version:
Prerequisites:
Status:
Maintainer:
Questions answered by this recipeHow can I automatically display an icon image specific to a file extension beside an attach link? DescriptionThe following markup adds an icon for .mov, .doc, and .xls files (but not others). Add the markup definition to config.php or another local customisation file. Extend and adjust the definition for other file extensions according to your needs. Markup('attachicon', '<links',
"/\\bAttach:[^\\s$UrlExcludeChars]*\\.(mov|doc|xls)/",
"$FarmPubDirUrl/icons/$2.png $0");
You need to create icon images The following markup definition will result in displaying any icon image you created for the associated file extension. Markup('attachicon', 'inline',
'/Attach:(.*?)\\.(\\w{1,4})/',
"$FarmPubDirUrl/icons/$2.png Attach:$1.$2");
Get your icons from here: www.stylegala.com/features/bulletmadness/ Rename them to be named like this: NotesRelease Notes
CommentsSee AlsoContributorsfrom pmwiki userlist: Anno, Marc, Pm |