Forums / Setup & design / Image preview in media tab

Image preview in media tab

Author Message

Pascal France

Thursday 08 November 2007 3:04:17 am

Hi,

When we create an Image object in the media tab, we can preview it selecting the "thumbnail" option in the "Sub items" frame.

But this preview doesn't work anymore if we use another Image classe (e.g: a copy of the default Image classe).

Is there a way that such a thing works whith a custom Image class ?

Pascal

PS: here is my custom Image class:

Name: Icônes listes articles
Identifier: icone_liste_article

Attributes:

Text line:
Name: Nom
ID: nom

Block XML:
Name: Caption
ID: caption

Image:
Name: Image
ID: image

Ce qui embellit le désert c'est qu'il cache un puits... quelque part... (A. de Saint-Exupéry) - http://luxpopuli.fr/eZ-Publish

Gunnar Birkeland

Thursday 08 November 2007 5:35:52 am

Hi Pascal

Have you tried to use the same .tpl override for the new class as for objects of image?

In short, find out which templates are used for listing the thumbnails and use the same/copy the templates for icone_liste_article. Turn on Debug Output -> Show Used templates.

Not sure, but this may work in your example:

(override.ini for your admin siteaccess)

[thumbnail_icone_liste_article]
Source=node/view/thumbnail.tpl
MatchFile=thumbnail/image.tpl
Subdir=templates
Match[class_identifier]=icone_liste_article

GL

</major>
----------------------------
ez-version: 3.9.3.
PHP: 4.4.2-1
MYSQL: 4.0.24

Pascal France

Thursday 08 November 2007 12:40:06 pm

Hi Gunnar,

You are absolutely right. Of course !
Think a lot.

Pascal

Ce qui embellit le désert c'est qu'il cache un puits... quelque part... (A. de Saint-Exupéry) - http://luxpopuli.fr/eZ-Publish

eZ debug

Timing: Jan 30 2025 21:39:16
Script start
Timing: Jan 30 2025 21:39:16
Module start 'content'
Timing: Jan 30 2025 21:39:16
Module end 'content'
Timing: Jan 30 2025 21:39:16
Script end

Main resources:

Total runtime0.2435 sec
Peak memory usage8,192.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0102 587.9375370.2969
Module start 'content' 0.01020.0176 958.23441,001.6406
Module end 'content' 0.02790.2155 1,959.87503,890.9375
Script end 0.2434  5,850.8125 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00451.8570200.0002
Check MTime0.00140.5576200.0001
Mysql Total
Database connection0.00120.478110.0012
Mysqli_queries0.145659.78971410.0010
Looping result0.00130.52831390.0000
Template Total0.215088.310.2150
Template load0.00100.414910.0010
Template processing0.214087.911010.2140
Override
Cache load0.00060.263310.0006
Sytem overhead
Fetch class attribute can translate value0.00190.780010.0019
XML
Image XML parsing0.00040.152410.0004
General
dbfile0.00843.4587200.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.0002 secs