Your doing some actually PHP in eZ Publish (in a module, class or whatever) and you need to find the image data for the Image Attribute of an object, here is what to do:
$node = eZContentObjectTreeNode::fetch( $node_id );
$dataMap = $node->dataMap();
$image_attribute = $dataMap['image'];
$image_array = $image_attribute->Content()->attribute('original');
$image_url = $image_array['url'];
- First get into the DataMap of your object or node.
- Change the ‘image’ of $dataMap['image'] to whatever the attribute_identifier of your image is.
- Change the ‘original’ of $image_pathobj->Content()->attribute(‘original‘); to whichever size of image you need to get. The image array contents all the good information of that image, i.e. height, width, filesize, etc.
- Use the ‘url’ to get a full path to your image. Slap a “/” on the front or use ezurl() to display.
If you want to see the available image sizes, you can check them by debugging this value:
$image_sizes = $image_attribute->Content()->attributes();
I was playing around at lunch the other day and came up with this little site: tallscreen.1915studios.com
It gives you a properly formatted iPhone TallScreen video player.
Upload your tallscreen video to YouTube and then put your YouTube URL in the bar at the top.
Send the link to your friends, rinse and repeat.
Have fun…
To use this tutorial I am assuming you know how to create an extension. If you do not please go over to this tutorial or Google ezPublish Extentions.
In this example we will be using an extension called orange. To start out we are going to create a function we can use in our templates to mimic the php function str_replace. We will call it ezstr_replace.
Read more »
Aviary – Creation on the fly / blog / Setting Aviary Free.
At Aviary, we believe that everyone in the world should have access to powerful creation tools. We therefore chose our company mission to be We make creation accessible to everyone. Our powerful set of tools helps fulfill this mission by enabling small businesses, students, artists & creators across different genres.
We have been broadcasting our service online at the Ville-Emard Church of Christ in Montreal since 2006. In that time we have worked out a lot of kinks that have taken place with the technology and equipment needed. I will now be showing you how you can broadcast your worship service online.
Read more »