Hello, I'm new in PHP and Zenphoto and have a little problem. When I import pictures into Zenphoto EXIF data will be read and written into SQL. Search is configured to search also for EXIF data. When I now search e.g. for Filenames, part of filenames search will work and shows results. When I do the same and search for EXIF Data, e.g. exposure time or so - search will show no results. I think I missed a bit somewhere...
Can someone help?
Many thanks,
Roland
Comments
Is the data really in the field you selected in the database?
Is your "treat spaces" option causing the search to fail?
Also look at the `$_zp_exifvars` in functions.php to be sure you know the correspondence between the selection values and the DB field names.
$_zp_exifvars also checked, looks okay, below the first two EXIF-Lines:
'EXIFMake' => array('IFD0', 'Make', gettext('Camera Maker'), true, 52),
'EXIFModel' => array('IFD0', 'Model', gettext('Camera Model'), true, 52),
Camera is a Nikon D-Series.
When I search for 'D3s', search will nothing display, zero result.
When I search for 'D', results are aval.
You can give it a try under http://test.gotdns.com/zenphoto
EXIF's will be shown when you click on "Bild Info" - give it a try, too. This means, EXIF Data are properly written into SQL and 'exifvars' are also okay. Do not fully understand how this works but I think "Search" and "Show EXIF" will use the same field & database mapping.
Thx a lot!!
My only other suggestion is to try the nightly build--that is what I am running.
D200 as a search criteria works fine - but have you tried to search for Aperture/Fnumber/EXIFFNumber ( string 'f/5.6' or only '5.6' or only 'f/' - all these strings should work from my point of view )?
You have some pictures, taken with FNumber f/5.6 and Search result is Zero.
ISO does also not work. When I search for '100' Search brings no result. When I search for '200' search will have results - but from picture date year 2007.
This means - it does not work on your site - from my point of view. Sorry :-(
Thx!
[aside] you can always tell what fields are enabled by clicking on the little list icon between the field and the search icon. That way you will know if data from those fields is supposed to be found and not be embarased by saying the site does not work when it is doing exactly what it is supposed to do.
could it be related to the same problem i had couple days ago (i.e. EXIFDescription field being not searched). in the class-search.php file the EXIF field names are changed to lowercase preventing the search to be correctly done. here is what i did to fix the problem:
in the class-search.php file, in the searchFieldsAndTags function, i have replaced `$columns[] = strtolower($row['Field']);` by `$columns[] = $row['Field'];` on line 729. now the search engine works for EXIFDescription (or image title). maybe the same modification will get the other EXIF field to be search correctly.
cheers,
frank.
Thx
Roland
have edited class-search.php and removed 'strtolower', in my File-Version on Line 679.
Before: $columns[] = strtolower($row['Field']);
After: $columns[] = ($row['Field']);
Search is working properly now.
Many thanks!!
Roland