Hi,
I hope I haven't missed anything in the docs but I can't choose the fields I want to search on.
If I go to Options -> Search I can select a lot of fields, but when I click OK they're not selected anymore.
So noone is able to search in those fields nor does the search present results that come from those fields.
Some of the fields are "normal" fields like "country" or "location", others are EXIF/IPTC fields that are just not used.
The biggest problem is that the system is not recognizing the picture descritption - it's shown when I select a picture in the admin area, but no searches are done on it.
Any hints what I could miss or whatsoever?
Thanks!
KR,
Grimeton
(no, not the english hip hop stuff
http://en.wikipedia.org/wiki/Grimeton_VLF_transmitter )
Comments
then ZenPhoto version is: Zenphoto-Version 1.4.1.1 [7645] (Offizielle Version)
I checked a few things and figured out that Zenphoto is writing the localized data to the database.
E.g.:
When you set custom_data and click save and after that you do a:
select * from zp_options where name="search_fields";
You got this back:
`
+----+---------+---------------+-----------------------------------------------------------------------------------
----------------------------+-------+-----------------------------------------+
| id | ownerid | name | value
| theme | creator |+----+---------+---------------+-----------------------------------------------------------------------------------
----------------------------+-------+-----------------------------------------+| 47 | 0 | search_fields | Ausrichtung,Belichtungskorrektur,Benutzerdefinierte_-_Daten_--_3A,Copyright,Schlag
w_--_C3_--_B6rter_tag_match | NULL | zp-core/setup/setup-option-defaults.php |+----+---------+---------------+-----------------------------------------------------------------------------------
----------------------------+-------+-----------------------------------------+1 row in set (0.00 sec)
`
So the localized description has been stored to the database (the value instead of the key).
I went through the class-search.php and two other files and checked where the arrays have been flipped one time to much, changed it, and now the localized description is used together with the keys in the background.
So if you store "custom_data" now, you get this:
`
id | ownerid | name | value | theme | creator |
+----+---------+---------------+----------------------------------------------+-------+-----------------------------------------+
| 47 | 0 | search_fields | copyright,country,custom_data,tags_tag_match | NULL | zp-core/setup/setup-option-defaults.php |
+----+---------+---------------+----------------------------------------------+-------+-----------------------------------------+
1 row in set (0.01 sec)
`
And it works.
I also had to add a stringtolower() when the strings returned from the database and the ones from the $_zp_exifvars are compared so that the boxes are checked in the settings tab.
If you like I can create a diff against the original source and post it here/send it per mail/whatsoever ...
Thanks!
KR,
Grimeton
works now
Btw.: Is it normal that I can't see all posts in a thread after I posted a message?
I only get the empty textbox with the red writing above it and everything else is just gone.
Cu
I wrote this answer and all I see is the message that was written before my answer.
Nothing else.
This is weird, I'll take a screenshot if needed/wanted.
Thanks!
Grimeton
http://imageshack.us/photo/my-images/29/bildschirmfoto20110707u.png/
The way the spam plugin works is that if you are under a certain number of posts and you post a message ALL of your posts are placed back in moderation and do show in the forum until one of us approves them (again). [Not my design, and a bit of a pain for the moderators, but much better than the spam attacks we have had.]