Searchfields not usable

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

  • acrylian Administrator, Developer
    Zenphoto 1.4.1.1? If not please update.
  • Hi,

    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
  • Thanks for your analysis. Please try tonight's nightly build to see if everything is corrected.
  • Hi,

    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
  • acrylian Administrator, Developer
    Yes, that is normal and that "red writing" tells you exactly why...
  • Eh no - for example this thread:

    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
  • Still the same explaination--moderation of your posts. (But don't dispair, soon you will have passed the threashold and no longer be monitored.)

    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.]
  • acrylian Administrator, Developer
    [Not my design, and a bit of a pain for the moderators, but much better than the spam attacks we have had.]
    Indeed, a quick hack of mine of an existing bbpress plugin. bbpress is not that good documentated so I did not investigated yet if this could be done more effectively. Maybe I do sometime..
Sign In or Register to comment.