Share » Forums » Setup & design » How to get the filename of an icon ?

How to get the filename of an icon ?

How to get the filename of an icon ?

Monday 09 May 2005 3:29:22 am - 1 reply

Author Message

Xavier Dutoit

Monday 09 May 2005 9:19:21 am

Found a way, not so elegant:

on my icon.ini.append:


[ClassIcons]
# Default icon if there is no class match
Default=mimetypes/empty.png
# Mapping from a class identifier to it's icon file,
# the whole filename must be included
ClassMapID[]
ClassMapID[2]=mimetypes/document.png
ClassMapID[13]=mimetypes/txt2.png
ClassMapID[14]=apps/package_settings.png
ClassMapID[12]=mimetypes/binary.png
ClassMapID[1]=filesystems/folder.png
...

Then on my template:

{let icons=ezini( "ClassIcons", "ClassMapID","icon.ini" ) icon_folder='/share/icons/crystal-admin/16x16_indexed'}

file:{$icon_folder}/{$icons[$id]}

http://www.sydesy.com

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu