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

eZ debug

Timing: Jan 31 2025 04:15:27
Script start
Timing: Jan 31 2025 04:15:27
Module start 'content'
Timing: Jan 31 2025 04:15:27
Module end 'content'
Timing: Jan 31 2025 04:15:27
Script end

Main resources:

Total runtime0.1286 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0045 587.8281180.8438
Module start 'content' 0.00450.0050 768.6719101.9609
Module end 'content' 0.00950.1190 870.6328529.8594
Script end 0.1285  1,400.4922 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00282.2085200.0001
Check MTime0.00120.9246200.0001
Mysql Total
Database connection0.00060.445610.0006
Mysqli_queries0.086166.93691410.0006
Looping result0.00120.94281390.0000
Template Total0.118792.410.1187
Template load0.00060.443410.0006
Template processing0.118291.905210.1182
Override
Cache load0.00040.313410.0004
Sytem overhead
Fetch class attribute can translate value0.00070.536710.0007
XML
Image XML parsing0.00020.177310.0002
General
dbfile0.00846.5323200.0004
String conversion0.00000.002430.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs