I have created an album and enabled the Exif data. I also enabled the Photo information block, butw henever I select a photo in the album I do not see exif data. When I try to load an image in (http://theorichel.nl/photos/image/13#image-load ) I get a message: Fatal error: Call to undefined method SelectQuery::limit() in /home/theorich/public_html/sites/all/modules/photos/photos.module on line 1325.

Any help would be very much appreciated.

Comments

TheoRichel created an issue. See original summary.

Nathaniel’s picture

Hi, please try the latest dev release. The limit() error should be fixed there.

There should be a link in the Photo information block to view the exif data. The block will appear on the photos/image/13 page.

TheoRichel’s picture

First: thanks for the quick reply!
I have tried it and it works. The block appears and there is a link to the exif data.

But: can I change this exif-data selection? All the photos I have are tagged with people information, whereas 'your' tags only show technical details about the photo.

Should that be possible then my next question would be whether these tags are searchable?

Nathaniel’s picture

Category: Support request » Feature request

The exif data is currently handled in inc/photos.down.inc. You will probably be most interested in these functions: _photos_down_exif and _photos_exif_tag.

The exif data is themed in the tpl/photos_exif.tpl.php.

We could work on a patch for everyone. It might be nice to have a hook to modify what exif tags are added to the variable (or left out) without hacking the module.

A quick workaround would be to add a preprocess hook in a custom module or theme. Something like this:

<?php
function custom_module_preprocess_photos_exif(&$variables) {
  // Load file from URL.
  $fid = arg(2);
  $file = file_load($fid);
  // Check for exif data.
  if ($exif = @exif_read_data($file->uri, 0, TRUE)) {
    // Update exif variables to be displayed.
    $variables['exif'] = $exif;
  }
}
?>

Currently the exif data is not indexed and therefor not searchable. It is being cached as an array, if the cache option is selected, or generated on the fly similar to the workaround above every time the exif link is clicked.

TheoRichel’s picture

Your enthusiasm is inspiring, but I am not a coder, so I can somewhat follow your reasoning, but not help in any way. Of course it would be very useful to be able to chose the tags, but let me also point you to the Exif-module which claims to have an interchange of Taxonomy-terms and Exif tags.

Nathaniel’s picture

Title: Where is exif-data? » Modify exif tags. Index exif data for searching.
Component: Miscellaneous » Code
Status: Active » Postponed
Nathaniel’s picture

Status: Postponed » Closed (outdated)

Cleaning up issue queue. If this feature is still needed in D9 version 6.0.x+ please open a new issue. I don't think new features will be added to the 7.x version unless someone can provide a patch.