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

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 31 2025 00:40:59
Script start
Timing: Jan 31 2025 00:40:59
Module start 'layout'
Timing: Jan 31 2025 00:40:59
Module start 'content'
Timing: Jan 31 2025 00:40:59
Module end 'content'
Timing: Jan 31 2025 00:40:59
Script end

Main resources:

Total runtime0.0202 sec
Peak memory usage6,144.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0040 588.1328151.2109
Module start 'layout' 0.00400.0034 739.3438220.6875
Module start 'content' 0.00740.0113 960.0313997.9141
Module end 'content' 0.01870.0015 1,957.945333.9922
Script end 0.0202  1,991.9375 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002612.6522140.0002
Check MTime0.00115.4413140.0001
Mysql Total
Database connection0.00063.166010.0006
Mysqli_queries0.002110.589630.0007
Looping result0.00000.054310.0000
Template Total0.00115.210.0011
Template load0.00084.118210.0008
Template processing0.00021.109310.0002
Override
Cache load0.00062.973510.0006
General
dbfile0.00021.071580.0000
String conversion0.00000.028440.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_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