Create Objects with ezimage datatype

Author Message

Håkan Bergman

Friday 06 May 2011 1:01:33 am

Hello,

I have been struggling to create a class (image) that have the ezimage datatype.

The rest of the values work fine.

$AttributesData['image'] = 'test.jpg';

$Params['storage_dir'] = $_SERVER['DOCUMENT_ROOT'].'/xml/';

I put the test.jpg in root-folder, xml-folder and extension folder just to see if it reads from root, xml or extension folder.

This wont work, I dont get an error and everything is created, but no image is added to the object.

Ive tried to read on numerous solutions on how this could be done, but adding the image into the attributesdata seem like the best and easiest solution. How do I make this work?

Best regards,

Håkan Bergman

Håkan Bergman

Friday 06 May 2011 5:43:32 am

Got it to work.

The relative path was wrong, but now it works perfectly.

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 04:58:36
Script start
Timing: Jan 18 2025 04:58:36
Module start 'layout'
Timing: Jan 18 2025 04:58:36
Module start 'content'
Timing: Jan 18 2025 04:58:36
Module end 'content'
Timing: Jan 18 2025 04:58:36
Script end

Main resources:

Total runtime0.6241 sec
Peak memory usage4,096.0000 KB
Database Queries52

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0048 589.0547152.6250
Module start 'layout' 0.00480.0024 741.679739.4531
Module start 'content' 0.00720.6153 781.1328422.2891
Module end 'content' 0.62250.0015 1,203.42198.1563
Script end 0.6240  1,211.5781 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.5291160.0002
Check MTime0.00130.2131160.0001
Mysql Total
Database connection0.00050.087510.0005
Mysqli_queries0.583393.4669520.0112
Looping result0.00050.0778500.0000
Template Total0.594395.220.2971
Template load0.00200.316020.0010
Template processing0.592394.911620.2962
Template load and register function0.00020.028010.0002
states
state_id_array0.00090.146910.0009
state_identifier_array0.00080.134920.0004
Override
Cache load0.00150.2482160.0001
Sytem overhead
Fetch class attribute can translate value0.00060.098910.0006
Fetch class attribute name0.00140.222920.0007
XML
Image XML parsing0.00010.017510.0001
class_abstraction
Instantiating content class attribute0.00000.001620.0000
General
dbfile0.00140.2243100.0001
String conversion0.00000.001140.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
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
2content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 6
 Number of unique templates used: 4

Time used to render debug report: 0.0002 secs