Content last modified Monday 3 September 2018
hop to #bottom
Categories:
Author:
Shaun Humphreys
Current version:
0.1
About It:
Get it:
Rate it:
  • Helpful?
  • 0 Yes
  • 1 No
Flag it:

If you'd like to provide updated information and do not have access to directly edit, please contact the site admin; thanks!

srh_file_icon

srh_file_icon displays either the file extension (eg PDF, DOC, ZIP) or an icon image for a file. Icon images must be present in the /images directory for each file type required (eg pdf.png, doc.png — filenames should be lowercase). The icon image type (eg png, gif) can also be specified.

Use: txp:srh_file_icon displaytype=”“ imagetype=”“ />
attributes:

  • displaytype – ‘text’ or ‘image’ defaults to ‘text’
  • imagetype – the type of image file used for the icon, defaults to png

You can get your file icons here:

http://www.zap.org.au/documents/icons/file-icons/sample.html

This plugin is a far more basic verion of mrz_file_preview (which did a lot more and was written by someone who knows PHP).

This is my first plugin, and if you look at the code you can probably tell I don’t know PHP at all. If I keep reading my PHP book, I might get around to adding some other obvious attributes like class, width & height, alt-text etc.

shaun

Article Request Count:
Initially released:
2007-1-21
Posted here:
25 Jan 2007

You know you want to visit the Archives.
Published with Textpattern