Forums / Developer / Icons for each class

Icons for each class

Author Message

Anthony M.

Tuesday 19 December 2006 2:56:16 am

I would like to know how to modify the icons in the administration.
For example, i've created a class and i want to put a new icon for better identifying, but how do this ??

Thanks

Anthony

Brookins Consulting

Wednesday 20 December 2006 7:57:30 pm

Anthony,

You may find modifying the icons used in the admin siteaccess design templates very simple to do.
eZ publish provides a simple system to use to configure class icons used per siteaccess.

First start by creating an override setting file of the icon.ini file to customize the icons used in eZ publish (global override) or per siteacess (or design)

Here is an example of a the settings I used for a recent project.

File, '<i>settings/override/icon.ini.append.php</i>'

[IconSettings]
# Where to look for icons, relative to eZ publish
Repository=share/icons

# Which theme to use as current for all icon types
# If you wish to have a different theme per type you
# can set this variable in the INI group for the type.
Theme=crystal

# Wanted size of icons, the size is not checked and is expected
# to be just a string which should be a directory in the theme
Size=large
Sizes[]
Sizes[normal]=32x32
Sizes[small]=16x16
Sizes[large]=48x48

[ClassIcons]
ClassMap[]
ClassMap[manual]=mimetypes/pdf.png
ClassMap[datasheet]=mimetypes/pdf.png
ClassMap[antenna_datasheets]=mimetypes/pdf.png
ClassMap[xapp_conn_guide]=mimetypes/pdf.png
ClassMap[marketing_material]=mimetypes/pdf.png
# ClassMap[ladder]=mimetypes/binary.png
ClassMap[ladder]=mimetypes/ascii.png
ClassMap[xconfig_sw]=mimetypes/binary.png
ClassMap[firmware]=mimetypes/binary.png
ClassMap[utility]=mimetypes/binary.png
# ClassMap[product]=mimetypes/empty.png
# ClassMap[product]=apps/misc.png
ClassMap[product]=apps/ksim.png
ClassMap[information_page]=mimetypes/readme.png
# ClassMap[forum_topic]=filesystems/folder.png
# ClassMap[forum_topic]=actions/1rightarrow.png
# ClassMap[forum_reply]=actions/2rightarrow.png
ClassMap[forum_topic]=actions/email.png
ClassMap[forum_reply]=actions/mail_reply.png
ClassMap[ppt]=mimetypes/powerpoint.png
ClassMap[x_product]=apps/ksim.png
# ClassMap[distributor]=actions/identity.png
# ClassMap[distributor]=actions/contents.png
ClassMap[distributor]=actions/homepage.png
ClassMap[distributor_sales_contact]=actions/homepage.png
ClassMap[success_story]=actions/irkick.png
ClassMap[x_solution]=apps/misc.png
ClassMap[xconfig_sw]=mimetypes/tar.png
ClassMap[calendar_event]=actions/contents.png

In my example I created a mapping of class(es) to individual icons using class identifiers.

I also used the free software icon package, nuvola!
<i>http://www.icon-king.com/
http://icon-king.com/?p=15
http://www.icon-king.com/files/nuvola-1.0.tar.gz</i>

These icons look great and their directory structure matches the existing default icon theme in eZ publish.

If your looking to modify other icons (not related to class) with the eZ publish administration you may do this by modifying your admin siteaccess design's templates as needed.

//graham

eZ Partner | North American Experience
http://brookinsconsulting.com/experience

kracker (the)

Wednesday 20 December 2006 8:19:39 pm

<b>Related topics</b>

<i>http://ez.no/ezpublish/documentation/customization/components/icons

http://ez.no/community/forum/setup_design/icon_for_folder_objects
http://ez.no/community/forum/setup_design/mimetype_icons_for_3_4
http://ez.no/community/forum/general/get_file_icon
http://ez.no/community/forum/general/how_to_change_icon_for_class
http://ez.no/community/forum/install_configuration/icons_url_in_admin_setup_menu

http://ez.no/doc/ez_publish/technical_manual/3_8/reference/template_operators/miscellaneous/class_icon
http://ez.no/doc/ez_publish/technical_manual/3_8/reference/template_operators/miscellaneous/classgroup_icon
http://ez.no/doc/ez_publish/technical_manual/3_8/reference/template_operators/miscellaneous/mimetype_icon</i>

//kracker
<i>kmk - koast II koast</i>

Member since: 2001.07.13 || http://ezpedia.se7enx.com/

Xavier Dutoit

Thursday 21 December 2006 12:18:55 am

Out of curiousity, does someone know how the icons for the defaut classes (article,folder,user...) are set ?

In the settings/icon.ini, I have an empty ClassMap

# [ClassIcons]
# The theme for class-icons, overrides default
#Theme=crystal
# The size for class-icons, overrides default
#Size=normal
# Mapping from a class identifier to it's icon file,
# the whole filename must be included
#
# Each theme will define this mapping variable
#ClassMap[]

Otherwise, I am the only one thinking it'd be a good evolution to be able to set the icon class while editing the class definition (at the same time you deal with the attributes ?)

X+

http://www.sydesy.com

Kristof Coomans

Thursday 21 December 2006 12:29:32 am

HI Xavier

They are set in the icon.ini of your icon theme. For the admin interface, this is share\icons\crystal-admin\icon.ini.

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org