Forums / Developer / Image size override possible?

Image size override possible?

Author Message

K259

Wednesday 07 January 2004 1:34:48 am

Today in eZ publish we got 3 different image size possibilites: small, medium and large

I want the imagesize "SmallSizeWidth" to be 150pix instead of 100 for only a couple of nodes? Is it possible to override this in any override.ini or image.ini files?

Georg Franz

Wednesday 07 January 2004 6:16:15 am

Hi,

yep, it's possible. Use the image.ini.append.

--- example image.ini.append ---

[AliasSettings]
# Defines a list of aliases that are available to
# the template engine and other clients.
# The alias must be defined as a separate INI block.
AliasList[]
AliasList[]=reference
AliasList[]=small
AliasList[]=medium
AliasList[]=large
AliasList[]=rss

[small]
Filters[]=geometry/scaledownonly=150;150

# Define customized image size
[ImageSizes]
Height[small]=150
Width[small]=150
Height[medium]=100
Width[medium]=150
Height[large]=400
Width[large]=300
Height[reference]=600
Width[reference]=600

Kind regards,
Emil.

Best wishes,
Georg.

--
http://www.schicksal.com Horoskop website which uses eZ Publish since 2004

K259

Wednesday 07 January 2004 6:30:54 am

Hmm..I don't see where you make an Imagesize override to any node here..

I'll explain.
I have a class x, class z and class y. These uses all the Imagesize small(100 in width) for displaying uploaded pictures.

Everywhere in the structure these classes shall have Imagesize 100(small), but in node a, b, c and d the displayed images shall have Imagesize 150 pix.

Do I have to make an override file (full_node_a.tpl etc.) for every node I want to make this pict. larger, and in image.ini create another size, or is it possible in image.ini to set an small-imagesize override for these nodes?

Paul Borgermans

Wednesday 07 January 2004 6:58:08 am

No,

image.ini is not meant for overrides, it defines what image sizes/classes are available.

You will have to create an override template for these "special nodes". You may assign them all to a new section, that way you need only one template file/rule in override.ini.

Alternatively, you could add a flag "show image as smaller" to your class definition and use that in your template to determine the image size.

hth

-paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

K259

Wednesday 07 January 2004 7:12:35 am

Tnx. Think I go for the last one.

..or else I also have to change the role-permission if I assign this override-template to a new section for some nodes. It's only going to be a mess in the permission-system if I do so ;)

eZ debug

Timing: Jan 19 2025 00:29:58
Script start
Timing: Jan 19 2025 00:29:58
Module start 'content'
Timing: Jan 19 2025 00:29:58
Module end 'content'
Timing: Jan 19 2025 00:29:58
Script end

Main resources:

Total runtime0.1537 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.0071 587.7188180.8359
Module start 'content' 0.00710.0057 768.554797.8672
Module end 'content' 0.01280.1407 866.4219525.8984
Script end 0.1535  1,392.3203 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00352.2925200.0002
Check MTime0.00140.9200200.0001
Mysql Total
Database connection0.00171.091910.0017
Mysqli_queries0.104868.20611410.0007
Looping result0.00161.03981390.0000
Template Total0.140291.310.1402
Template load0.00100.623410.0010
Template processing0.139390.627110.1393
Override
Cache load0.00060.367110.0006
Sytem overhead
Fetch class attribute can translate value0.00090.581010.0009
XML
Image XML parsing0.00030.211610.0003
General
dbfile0.00281.7961200.0001
String conversion0.00000.003930.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.0002 secs