Extend EZ Publish to store XMP metadata into ezimage object

Author Message

Christian BELLET

Tuesday 15 April 2008 1:01:25 am

Hello,
This is my first post on this forum. I could not find any topic regarding this problem.
I'm running EZ publish 4.0 on a debian server. I installed a PHP extension in order to get the XMP metadatas stored in media files ( http://www.alexander-block.net/eng/Business/eZ-Systems/XMP4PHP ).
I would like to extend the image class and add more fields so I can store the XMP metadata into these fields the first time I create an object (image, file...).
All I need to know is how to implement a kind of hook that would read the XMP metadatas from the original file (upload new file) and then have the normal way of storing the data in the EZ database. Do I have to create a new extension, a new datatype or extend the ezimage datatype ?
It's really important for me to store these XMP into the database because i'd like to use the EZ search engine to find the XMP metadata.

Thanks for your help,

Christian

Felix Laate

Tuesday 15 April 2008 1:37:14 am

Hi there,

I'm sure there a better ways to do this, but I would suggest that make your own file-datatype and file-class. You can copy much code from the file datatype comming with ezp, and add functionality to extract the XMP-data and add it to the object it vreates upon uploading.

Felix

Publlic Relations Manager
Greater Stavanger
www.greaterstavanger.com

Kristof Coomans

Tuesday 15 April 2008 7:42:50 am

Hi guys

There exists something like image analyzer extensions. However, I never used it before, so can't tell you more about it.

Take a look in image.ini and at lib/ezimage/classes/ez.*imageanalyzer.php

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Alexander Block

Tuesday 20 May 2008 2:17:32 am

Hi Christian,

as we are currently developing an eZ Publish based solution for dealing with XMP meta data I can tell you, that this is a very complex issue. We have created a new data type, a pretty huge extension and use a modified version of ezfind to query the XMP meta data stored in that datatype. If you need more information about this topic feel free to contact me. It would be nice to get some more detailed information from your side (e.g. where do you want to use this kind of solution - your private homepage or the website of a multi-national company?)

Kind regards,

Alex

Josh Bair

Tuesday 27 January 2009 12:51:20 pm

Any updates about this?

What about reading in the XMP fields and values and storing them in a matrix within an image object?

Alexander Block

Friday 08 May 2009 1:01:30 pm

Do I understand it correctly, you want to read the XMP meta data from an image and store it in an eZ Publish matrix datatype? This would not be required as the XMP datatype would make the XMP meta data available in a much better way.

Jean-Luc Nguyen

Tuesday 12 May 2009 6:20:36 am

Alors Christian, on fait du eZ ? =)

http://www.acidre.com

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

Main resources:

Total runtime0.5580 sec
Peak memory usage4,096.0000 KB
Database Queries77

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0057 588.1719152.6563
Module start 'layout' 0.00570.0024 740.828139.5078
Module start 'content' 0.00810.5486 780.3359742.7266
Module end 'content' 0.55680.0012 1,523.062516.0938
Script end 0.5580  1,539.1563 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.6142160.0002
Check MTime0.00140.2434160.0001
Mysql Total
Database connection0.00080.138910.0008
Mysqli_queries0.480986.1824770.0062
Looping result0.00100.1776750.0000
Template Total0.531695.320.2658
Template load0.00200.351620.0010
Template processing0.529694.905520.2648
Template load and register function0.00020.035110.0002
states
state_id_array0.00090.164010.0009
state_identifier_array0.00060.111320.0003
Override
Cache load0.00170.3062370.0000
Sytem overhead
Fetch class attribute can translate value0.00210.374360.0003
Fetch class attribute name0.00190.3451120.0002
XML
Image XML parsing0.00410.731160.0007
class_abstraction
Instantiating content class attribute0.00000.0044130.0000
General
dbfile0.00270.4920400.0001
String conversion0.00000.001440.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
7content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
7content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
6content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 23
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs