Member
Member
timo   2010-10-13, 06:31
#1

I've been doing lot's of hard-core theme development and think this would be a nice addition just below getImageMetaData()in template-functions.php. It would add nice bit of abstraction for printImageMetadata() and would easily allow custom EXIF display that doesn't rely on tables (that's my aim anyway).

If one of the regular developers thinks it's a good idea and worth a commit then just say the word an I'll update printImageMetadata() to use it.

`
/**

  • Returns the Metadata infromation from the current image,

  • but only the fields enabled under admin->options->image->EXIF display

  • @param $image optional image object

  • @return array

  • @author timo
    */
    function getDisplayEXIF($image=NULL) {
    global $_zp_exifvars, $_zp_current_image;
    if (is_null($image)) $image = $_zp_current_image;
    if (is_null($image) || !$image->get('hasMetadata')) return false;
    $exif = $image->getMetaData();

    $displayEXIF = array();
    foreach ($exif as $field => $value) {
    if ($_zp_exifvars[$field][3]) //the enable field
    $displayEXIF[ $_zp_exifvars[$field][2] ] = $value;
    }
    return $displayEXIF;
    }
    `

Administrator
Administrator
acrylian   2010-10-13, 08:22
#2

Well, tables are not necessarily bad if they are used as tables (as they are used on the exif display), just layout tables are..;-)

You can always make a plugin or theme function. I don't use exif data myself a lot but sounds like a good idea. Please create a ticket and attach the modified code. We then take a look later.

Member
Member
sbillard   2010-10-13, 16:18
#3

Does seem like the proper way to go. Please do update the code and attach to a ticket.

Member
Member
timo   2010-10-16, 08:10
#4

I've created two tickets:
http://www.zenphoto.org/trac/ticket/1685
That includes the afore mentioned code.

and

http://www.zenphoto.org/trac/ticket/1686
which makes it possible to get a thumbnail of custom size.

I've tested each extensively, they should be ready to go. Each is at the same level of abstraction as existing comparable functions and are as compatible as can be.

Administrator
Administrator
acrylian   2010-10-16, 09:32
#5

About the first we did talk but about the 2nd see my ticket comment. Sbillard will have the last word though.

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.