This site has been archived. To learn more about our current products Ibexa Content, Ibexa Experience, Ibexa Commerce head over to the Ibexa Developer Portal

eZ Community » Forums » Developer » all2einfoexport with...

all2einfoexport with enhancedezbinaryfile datatype

all2einfoexport with enhancedezbinaryfile datatype

Friday 10 June 2011 3:38:53 pm - 4 replies

I have installed the extensions enhancedezbinaryfile (to send images with collection forms) and all2einfoexport (to export to a XML file the information collections). All is ok but the datataype collected in enhancedezbinaryfiles input from the form, is not showed in XML file. I added a "case" in /classes/all2einfoexportclass.php for date datatype (there were a bug) and I added too a "case" for the enhancedezbinaryfile, but I am not able to write the right code to show the FilePath uploaded with theenhancedbezbinaryfile datataype of the form.


case 'ezdate':
$content[$collection->attribute('id')][$key] = date( "d.m.Y", $attribute->attribute('data_int') ); break;

/////////////////// Afegit per bug a Datatype ENHANCEDEZBINARYFILE ////////////////

case 'enhancedezbinaryfile':
$content[$collection->attribute('id')][$key] = $attribute->content();

//$content[$collection->attribute('id')][$key] = '<a href=http://{ezini( "SiteSettings", "SiteURL" )}{$attribute.data_text|parsexml("Filename"blunk.gif Emoticon|wash|ezroot(no)}>{$attribute.data_text|parsexml("OriginalFilename"blunk.gif Emoticon}</a>'; break;


Some idea of what I must do?

Friday 10 June 2011 6:12:34 pm


What version of ezpublish are you using and what version of the enhancedbinaryfiletype are you using?  Do you see the path in the collectedinfo page?

There is a problem that I haven't been able to reproduce:

Friday 10 June 2011 6:30:55 pm

Hi Steven,
thank you for your fast response.

I'm using eZpublish 4.2.0 and enhancedbinaryfiletype release 4.0.0.
Yes, I see all the information of the image and image path in collectedinfo page, and in sendmail also.
The problem is that when I export the collected form with all2einfoexport extension, the XML file I get, there is no path or name of the image uploaded with enhancedezbinaryfile datatype.

Friday 10 June 2011 11:21:39 pm

O.k. then you'll want to do something like this for the enhancedbinaryfile case in all2einfoexportclass.php 

 case 'enhancedezbinaryfile':
        $dom = new DOMDocument( '1.0', 'utf-8' );
        if ($dom->loadXML( $attribute->attribute( 'data_text' )))
                $content[$collection->attribute('id')][$key] = $dom->getElementsByTagName( "Filename" )->item(0)->textContent;

Change the element in the getElementsByTagName to whatever you want to store and add multiple fields if you want multiple fields to be stored.  What is returned by the attribute( 'data_text') is the binaryfile_info xml with the elements: OriginalFilename, Type, MimeCategory, MimePart, Filename, Size

Friday 17 June 2011 8:06:15 pm

Hi Steven,I apologise for not to respond earlier...
I've been working on the export of all de data from the website. Sorry...

It works perfectly, I'm really glad to be able to export all the information collection in the forms with enhancedezbinaryfile.
I really apreciate your help. Thanks a lot.



You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from