Forums / Extensions / Extend EZ Publish to store XMP metadata into ezimage object

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

eZ debug

Timing: Jan 30 2025 22:23:36
Script start
Timing: Jan 30 2025 22:23:36
Module start 'content'
Timing: Jan 30 2025 22:23:36
Module end 'content'
Timing: Jan 30 2025 22:23:36
Script end

Main resources:

Total runtime0.1978 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.0080 589.3203370.2578
Module start 'content' 0.00800.0155 959.57811,009.6250
Module end 'content' 0.02340.1743 1,969.20313,898.8359
Script end 0.1977  5,868.0391 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00462.3248200.0002
Check MTime0.00140.7008200.0001
Mysql Total
Database connection0.00100.481310.0010
Mysqli_queries0.099150.12461410.0007
Looping result0.00140.69951390.0000
Template Total0.173787.810.1737
Template load0.00090.473310.0009
Template processing0.172787.328310.1727
Override
Cache load0.00060.321510.0006
Sytem overhead
Fetch class attribute can translate value0.00180.887910.0018
XML
Image XML parsing0.00020.111310.0002
General
dbfile0.00934.7152200.0005
String conversion0.00000.004030.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.0001 secs