|
Cookbook /
AddImageTypeSummary: Add new image type extension
Version:
Prerequisites: This recipe was last tested on PmWiki version: 2.1beta20; this recipe requires at least PmWiki version: 2.0 and no other recipes.
Status:
Maintainer:
Categories: Images
Questions answered by this recipeHow do I add a new image type extension to the list that PmWiki automagically recognises to display as images? DescriptionTo add a new image type extension, say .ico (icon), add the following line to the $ImgExtPattern = "$ImgExtPattern|\\.ico|\\.ICO";
An example of adding .bmp (bit map) is $ImgExtPattern = "\\.(?:gif|jpg|jpeg|png|bmp|GIF|JPG|JPEG|PNG|BMP)";
NotesRelease NotesCommentsI was not able to make the above work (I was worrying about
$ImgExtPattern = ereg_replace("(\)$)", "|tiff|tif|TIFF|TIF)", $ImgExtPattern);
The Replace Regular Expression looks for the closing Simon Forknall, 02 June 2009 (PmWiki V2.2.1, Mac OS X) See AlsoContributors
|