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

0 Members and 1 Guest are viewing this topic.

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
No Search Results Problem...
« Reply #15 on: December 20, 2002, 08:42:35 PM »
I see some strange characters in the part you edited. Try another text editor, ie BBEdit.

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

Offline bernd

  • Full Member
  • ***
  • Posts: 214
    • View Profile
No Search Results Problem...
« Reply #16 on: December 20, 2002, 11:24:13 PM »
Jan is right. If you are on a mac there is no better editor than BBEdit. They have a demo available - or if you can live without code coloring and other gimmicks they have a Lite version that is free - see here for more info. With BBEdit you can just open the file and let it display the line numbers for you.

cheers,
Bernd

Offline rsorbo

  • Newbie
  • *
  • Posts: 21
    • View Profile
    • http://sorboimages.com
No Search Results Problem...
« Reply #17 on: December 21, 2002, 12:06:29 AM »
Same error even using BBEdit... :cry:

Offline rsorbo

  • Newbie
  • *
  • Posts: 21
    • View Profile
    • http://sorboimages.com
No Search Results Problem...
« Reply #18 on: December 29, 2002, 07:48:18 PM »
Hello Jan:

Thanks for the file.
I tried it out and didn't get the error but it didn't work as a couple of other issues arose.
It's still not adding the IPTC info from the images into the Description field.
And when I check new images it's not showing the thumbnails I've uploaded along with the media files. I FTP'd directly into their respected folders like always, but no thumbs.
I tried it twice just to make sure it wasn't something I was doing.
Any ideas?
Thanks

Rob

Offline rsorbo

  • Newbie
  • *
  • Posts: 21
    • View Profile
    • http://sorboimages.com
Auto IPTC Import
« Reply #19 on: January 04, 2003, 08:09:11 PM »
Does anyone else on this forum use IPTC (Photoshop "File Info") for adding
caption/keywords to their images?
I've tried Jan's code but it still doesn't copy the caption field into the description field.
I figured out why the thumbs weren't showing up, but still would like to nail down this other issue. It would make things so much easier to have this data automatically copy over.
I'd like to do the same for the IPTC keywords to Description keywords but for now, I'd settle just the caption info.
I'm using 1.7.
I understand others have gotten it to work in 1.6 but I'd really like to know if it's possible under 1.7 before having to downgrade.
Here is the new checkimages.php code that Jan sent me. If anyone can test this or has gotten it to work, please let me know.
Thanks
Rob

File: checkimages.php
Replace (line309):

$title = $lang['field_description_ext'].((isset($file_src)) ? get_iptc_insert_link($file_src, "caption", "image_description_".$i) : "");
      show_textarea_row($title, "image_description_".$i, "", $textarea_size);

With:

$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);

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
No Search Results Problem...
« Reply #20 on: January 05, 2003, 10:58:36 AM »
Did you used the "detailed version" while adding new images? The description field must be visible.

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 #21 on: January 05, 2003, 07:49:44 PM »
Jan:

It worked!
Thanks for your patience on this.
Now can I get the keywords and date created fields to automatically populate by using the same code, but replacing the IPTC code numbers with #025 and #055 in checkimages.php file under their respected lines of code? It does work manually using the IPTC button. I just have to reload 800 images and need it done automatically.
Thanks again!

Rob  :D

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
No Search Results Problem...
« Reply #22 on: January 05, 2003, 07:52:45 PM »
Yes, this should work.

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 #23 on: January 05, 2003, 07:54:30 PM »
Thanks!

Offline rsorbo

  • Newbie
  • *
  • Posts: 21
    • View Profile
    • http://sorboimages.com
No Search Results Problem...
« Reply #24 on: January 06, 2003, 07:04:43 PM »
Hello again:

Two questions:

I've got the keywords importing fine.
The "date created", however, copies over twice into the "Description" date field.
What part of the code below do I have to remove so only one date imports?
Also to get all this updated information into the catagory databases do I have to delete all the images and categories and start over or is there another way?
When I delete the thumbs/previews, reload them and checkimages they don't show up. They're still show as already in the database. I tried re-indexing after deleting but that didn't help.

Date created code (checkimages.php):

$date = "";
      if ($imageinfo = @getimagesize($file_src, $info)) {
        if (isset($info['APP13'])) {
          $iptc = iptcparse($info['APP13']);
          if (is_array($iptc)) {
            $date = (isset($iptc['2#055'][0])) ? $iptc['2#055'][0] : "";
            foreach ($iptc['2#055'] as $val) {
              $date .= (($date != "" ) ? " " : "").$val;
            }  
          }
        }
      }
      show_input_row($title, "image_date_".$i, $date, $textinput_size);

Thanks

Rob

Offline rsorbo

  • Newbie
  • *
  • Posts: 21
    • View Profile
    • http://sorboimages.com
No Search Results Problem...
« Reply #25 on: January 06, 2003, 08:18:11 PM »
I figured out the date duplication issue.
Still don't know about the second one...

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
No Search Results Problem...
« Reply #26 on: January 07, 2003, 09:37:40 AM »
Quote from: rsorbo
Also to get all this updated information into the catagory databases do I have to delete all the images and categories and start over or is there another way

No, sorry.
Quote
When I delete the thumbs/previews, reload them and checkimages they don't show up. They're still show as already in the database. I tried re-indexing after deleting but that didn't help.

"Check new images" only checks for really new images (main file and thumbnail). You have to remove the whole image entry first.

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