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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 21:08:48
Script start
Timing: Jan 18 2025 21:08:48
Module start 'layout'
Timing: Jan 18 2025 21:08:48
Module start 'content'
Timing: Jan 18 2025 21:08:49
Module end 'content'
Timing: Jan 18 2025 21:08:49
Script end

Main resources:

Total runtime0.7768 sec
Peak memory usage4,096.0000 KB
Database Queries69

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0057 587.8125152.6094
Module start 'layout' 0.00570.0034 740.421939.4141
Module start 'content' 0.00910.7663 779.8359704.7656
Module end 'content' 0.77540.0014 1,484.601616.1875
Script end 0.7767  1,500.7891 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.4283160.0002
Check MTime0.00130.1692160.0001
Mysql Total
Database connection0.00070.085410.0007
Mysqli_queries0.712291.6860690.0103
Looping result0.00080.1063670.0000
Template Total0.747296.220.3736
Template load0.00190.238820.0009
Template processing0.745395.951720.3727
Template load and register function0.00020.030510.0002
states
state_id_array0.00130.170310.0013
state_identifier_array0.00090.120420.0005
Override
Cache load0.00160.2062480.0000
Sytem overhead
Fetch class attribute can translate value0.00090.112450.0002
Fetch class attribute name0.00120.154590.0001
XML
Image XML parsing0.00280.366850.0006
class_abstraction
Instantiating content class attribute0.00000.002090.0000
General
dbfile0.00140.1794360.0000
String conversion0.00000.004840.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
12content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
4content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 31
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs