hi,
i have some problems getting the search function to search the image titles. all my images have the image title field populated. i have tick the image title box in the search option panel and yet the search engine do not return pictures that as the keyword in the image title field. am i missing something else ?
thanks for your help,
frank.
Comments
all my images have a title which is correctly searched. but they also all have a metadata title which is not searched. yet in the search panel both "Title" and "Image Title" are ticked. I thought they were corresponding to the image title and the metadata title, respectively and therefore should both be searched, but maybe that is where i am wrong.
basically i have a gallery of photos from new york city. they all have "new york" in the metadata image title. 2 images also have it in the title. when i search on "new york" i end up with the 2 pictures that have "new york" in the title. all other pictures are skipped.
thanks for your help,
frank.
i have refreshed the metadata in the admin panel. i even checked using myphpadmin that the fields in the database were populated. and for sure the "title" field as well as the "EXIFDescription" field (the metadata image title shown when we expand the image data in the admin panel) is also populated. and still the search only returns photos that have the keyword in their title, omitting the ones with the keywords in the EXIFDescription (or metadata title).
i have also try to refresh the database from the admin panel but to no avail.
frank.
- Description
- Image Title
- Tags
- Title
that is all that is ticked. i have a drop down menu in my search form on the webpage which shows these fileds as being selected.
frank.
Please remember that these fields are literal. If you are searching the title field that is the only field that gets looked at. Not some other field which might have the string 'title' in it.
@sbillard, when you talk about enabling the EXIFDescription, is there a box to tick in the search field list, because i don't see any.
@bdragonfly, what i call the metadata title is the one i get with this short bit of code
$mymeta = getImageMetadata();
echo $mymeta['EXIFDescription'];
and it seems to correspond to what is called "image title" when we look at the image metadata in the "images" tab of the admin panel (after "showing more fields").
again thanks for your help.
francois.
- Description
- Image Title
- Tags
- Title
i might just reinstall zenphoto, maybe i messed up something in the process. i will download the latest night build and try again. thanks for your help.
frank.
well without any intention to hack the code because i am far from being a php coder or developer, i took a look at the class-search.php file.
what i found is that the query `$fieldsql` doesn't include `EXIFDescription` in it. the thing is the fieldname must be in the `$columns` array and so far in the `$columns` array everything is written in lowercase (must be due to the strtolower instruction). any way because the actual fieldname is `EXIFDescription`, it doesn't match the `exifdescription` label in the `$column` array and therefore doesn't make it through the `if ($fieldname && in_array($fieldname, $columns))` instruction.
could my problem be coming from that ??
i am using zenphoto version 1.2.9 [5374].
frank.
ps: i forgot all of this is in the `searchFieldsAndTags` function somewhere around line 700 or so.
in the `searchFieldsAndTags` function, i have replaced `$columns[] = strtolower($row['Field']);` by `$columns[] = $row['Field'];` on line 729 and now the search engine returns all the images correctly even those with the keywords in their EXIFDescription (or image title).
thanks all for your help. i hope my problem helps to fine tune the code.
frank.