Author Topic: No Search Results Problem...  (Read 21285 times)

0 Members and 1 Guest are viewing this topic.

Offline rsorbo

  • Newbie
  • *
  • Posts: 21
    • View Profile
    • http://sorboimages.com
No Search Results Problem...
« on: December 13, 2002, 02:58:59 AM »
Hello:

When trying some searches on known material in my database no results are coming up .
I've tried re-indexing but that didn't fix it.
The images in question and the IPTC meta data do show up in a catagory search.
The images were keyworded using IPTC in Photoshop and/or Fotostation if that makes a difference.
Any ideas?
Thanks in advance.

Rob

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
No Search Results Problem...
« Reply #1 on: December 13, 2002, 10:57:33 AM »
The search will not go through the IPTC data. Only the database fileds image name, description and keywords will be used.

Jan
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline rsorbo

  • Newbie
  • *
  • Posts: 21
    • View Profile
    • http://sorboimages.com
No Search Results Problem...
« Reply #2 on: December 13, 2002, 07:12:47 PM »
Is it possible to have this functionality?
Possibly copying or somehow linking the keywords and caption from the IPTC into the 4images description/keywords fields during uploading or checking for new images or somewhere else in the process?
I would like to not have to re-keyword 800+ images.
Thanks.

Rob

Offline rsorbo

  • Newbie
  • *
  • Posts: 21
    • View Profile
    • http://sorboimages.com
No Search Results Problem...
« Reply #3 on: December 14, 2002, 02:10:03 AM »
Hello Jan:

Is this what I'm looking for?

http://www.4homepages.de/forum/viewtopic.php?t=2100&highlight=iptc

Would I then just have to re-upload the images and "check new images?"
Thanks

Rob

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
No Search Results Problem...
« Reply #4 on: December 16, 2002, 10:56:21 AM »
Yes

Jan
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline rsorbo

  • Newbie
  • *
  • Posts: 21
    • View Profile
    • http://sorboimages.com
No Search Results Problem...
« Reply #5 on: December 16, 2002, 10:38:55 PM »
Hello Jan:

Okay...tried this first but got a parse error line 298:
I'm using 1.7. Can you help?
After getting this part working I would also like to add the IPTC keywords to the Description keywords field as well. What would I need to change for this to happen?

Open "admin/checkimages.php" an replace
Code:
show_textarea_row($title, "image_description_".$i, "", $textarea_size);
with
Code:
$caption = "";
if ($imageinfo = @getimagesize($file_src, $info)) {
  if (isset($info['APP13'])) {
    $iptc = iptcparse($info['APP13']);
    if (is_array($iptc)) {
      $caption = (isset($iptc['2#120'][0])) ? $iptc['2#120'][0] : "";
    }
  }
}
show_textarea_row($title, "image_description_".$i, $caption, $textarea_size);

Thanks again,

Rob

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
No Search Results Problem...
« Reply #6 on: December 17, 2002, 09:30:13 AM »
Add
Code: [Select]
foreach ($iptc['2#025'] as $val) {
  $caption .= (($caption != "" ) ? " " : "").$val;
}

after
Code: [Select]
$caption = (isset($iptc['2#120'][0])) ? $iptc['2#120'][0] : "";
Jan
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline rsorbo

  • Newbie
  • *
  • Posts: 21
    • View Profile
    • http://sorboimages.com
No Search Results Problem...
« Reply #7 on: December 17, 2002, 06:05:13 PM »
Hi Jan:

Thanks for your continued help, but I'm still getting the same error.
Here's what the code looks like after I paste everything in under admin/checkimages.php:

 $title = $lang['field_description_ext'].((isset($file_src)) ? get_iptc_insert_link($file_src, "caption", "image_description_".$i) : "");
     $caption = "";
if ($imageinfo = @getimagesize($file_src, $info)) {
  if (isset($info['APP13'])) {
    $iptc = iptcparse($info['APP13']);
    if (is_array($iptc)) {
      $caption = (isset($iptc['2#120'][0])) ? $iptc['2#120'][0] : "";
       foreach ($iptc['2#025'] as $val) {
  $caption .= (($caption != "" ) ? " " : "").$val;
      }
    }
  }
}
show_textarea_row($title, "image_description_".$i, $caption, $textarea_size);

Am I missing something?

Rob

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
No Search Results Problem...
« Reply #8 on: December 18, 2002, 09:18:15 AM »
In which line you get the error message?

Jan
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline rsorbo

  • Newbie
  • *
  • Posts: 21
    • View Profile
    • http://sorboimages.com
No Search Results Problem...
« Reply #9 on: December 18, 2002, 04:20:35 PM »
Parse line 298

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
No Search Results Problem...
« Reply #10 on: December 18, 2002, 04:38:14 PM »
What line in the code you posted above ;)

Jan
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline rsorbo

  • Newbie
  • *
  • Posts: 21
    • View Profile
    • http://sorboimages.com
No Search Results Problem...
« Reply #11 on: December 18, 2002, 05:53:02 PM »
Well...when using the goto line in Word it doesn't end up in that code but above it on:
elseif (file_exists(THUMB_PATH.$cat_path."/".$image_name.".gif")) {
      $thumb_file = $image_name.".gif";
So, I'm not sure how to help you on this...?
I only received the parse line 298 error after pasting in the code so I can't imagine the problem is somewhere else.
Any ideas?
Thanks agiain,

Rob

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
No Search Results Problem...
« Reply #12 on: December 19, 2002, 08:42:22 AM »
Do you use Word to edit the php files? I hope not! Please use a text editor like Ultra Edit...

Jan
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline rsorbo

  • Newbie
  • *
  • Posts: 21
    • View Profile
    • http://sorboimages.com
No Search Results Problem...
« Reply #13 on: December 19, 2002, 07:59:06 PM »
No, I use SimpleText on a Mac.
It just doesn't have the ability to goto a given line so I use Word for that.
Any further help you can provide is much appreciated.
Thanks Jan.

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
No Search Results Problem...
« Reply #14 on: December 20, 2002, 09:27:49 AM »
Send me the file by email: jan@4homepages.de

Jan
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search