Friday 18 August 2006 2:01:42 pm
Hello Norman, If you fetch the content of the contenobjectattribute of type ezimage you get an object of type eximagealiashandler. If you call the method aliasList() on this object you get some information about at least the original image, here an example:
Array
(
[original] => Array
(
[name] => original
[width] => 768
[height] => 1024
[mime_type] => image/jpeg
[filename] => adapteur_k7.jpg
[suffix] => jpg
[dirpath] => var/shop_site/storage/images/products/adapteur_k7__1/1637-2-eng-GB
[basename] => adapteur_k7
[alternative_text] =>
[text] =>
[original_filename] => adapteur.jpg
[url] => var/shop_site/storage/images/products/adapteur_k7__1/1637-2-eng-GB/adapteur_k7.jpg
[alias_key] => 1293033771
[timestamp] => 1155930595
[full_path] => var/shop_site/storage/images/products/adapteur_k7__1/1637-2-eng-GB/adapteur_k7.jpg
[is_valid] => 1
[is_new] =>
[filesize] => 93279
[info] =>
)
)
Unfortunately you will not always get all other aliases (this seems to depend on what aliases have been called up already, I am not sure). But as you only need the urls of the different variations I think it should be enough to fetch all possible aliasnames form the image.ini file and change the filename accordingly. For example the name of the small variation of the above pic is adapteur_k7_small.jpg. There are most likely easier ways to do what you need but the above works for me. If you need other information have a look at the class \kernel\classes\datatypes\ezimage\ezimagealiashandler.php Also please note that I tried this with ez 3.8.3 and I have no idea whether this works with other versions. Greetings from Luxembourg Claudia
|