Announcement

#1 2006-09-25 17:57:01

joi
Member
2006-09-24
81

Reading IPTC tags

Hi again

In a previous topic I asked some unrelated questions, but was asked to put just one topic in each thread, which I am very happy to comply with. 

My question is>  I am unable to let the program read the IPTC tags, I have done syncro but it does not seem to work.  And the tricks I have seen here don't work either.  Any ideas?  I have read everything on here which I have found and relates to this topic.

Offline

 

#2 2006-09-25 18:22:44

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13786

Re: Reading IPTC tags

You have to configure your $conf['use_iptc'] and $conf['use_iptc_mapping'] variables (in configuration file). But before doing this, you have to know how to configure it. Here comes the tools/metadata.php file. Copy your photo as tools/sample.jpg and open tools/metadata.php in your browser. You'll see in which fields your IPTC metadata are stored.

Then look in the include/config_default.inc.php file how is set $conf['use_iptc_mapping'] and create a file include/config_local.inc.php file with:

Code:

<?php
$conf['use_iptc'] = true;

$conf['use_iptc_mapping'] = array(
  'keywords'        => '2#025',
  'name'            => '2#005',
  );
?>

(for example)

Offline

 

#3 2006-09-25 18:57:12

joi
Member
2006-09-24
81

Re: Reading IPTC tags

OK, didn't realise you needed to use the tag#, not the names.  I will try this tonight.

Offline

 

#4 2006-09-26 08:57:27

joi
Member
2006-09-24
81

Re: Reading IPTC tags

OK, I warned you.. here goes:

I did as you suggested, but when I synchronize the web I get the following message:


Metadata synchronization results

    * 35 elements informations synchronized with files metadata
    * 35 images candidates for metadata synchronization
    * Used metadata : filesize, width, height


So it appears the only metadata being used is filesize, width and height.  I did create the config_local.inc.php with the following:


<?php
$conf['use_iptc'] = true;

$conf['use_iptc_mapping'] = array(
  'iptc_headline'        => '2#105',
  'iptc_caption'         => '2#120',
  'iptc_byline'          => '2#080',
  'iptc_copyright_notice => '2#116',
  );
?>


and edited the lang file as well.  Any clues what I did wrong??

Offline

 

#5 2006-09-26 10:09:07

VDigital
Former Piwigo Team
Paris (FR)
2005-05-04
17680

Re: Reading IPTC tags

joi wrote:

<?php
$conf['use_iptc'] = true;

$conf['use_iptc_mapping'] = array(
  'iptc_headline'        => '2#105',
  'iptc_caption'         => '2#120',
  'iptc_byline'          => '2#080',
  'iptc_copyright_notice => '2#116',
  );
?>

missing quote after 'iptc_copyright_notice

8-)


Piwigo.com: Start and run your own photo gallery. Signup and get 30 days to try for free, no commitment.
8-)

Offline

 

#6 2006-09-26 10:09:59

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13786

Re: Reading IPTC tags

joi wrote:

Any clues what I did wrong??

The keys you've been using for the $conf['use_iptc_mapping'] array are meaningless for PhpWebGallery. You have to use fieldnames of #images table or "keywords" (which will fill the #tags table).

Offline

 

#7 2006-09-26 11:12:07

VDigital
Former Piwigo Team
Paris (FR)
2005-05-04
17680

Re: Reading IPTC tags

Excellent, I missed that point. 8-)


Piwigo.com: Start and run your own photo gallery. Signup and get 30 days to try for free, no commitment.
8-)

Offline

 

#8 2006-09-26 18:43:32

joi
Member
2006-09-24
81

Re: Reading IPTC tags

Duh... thanks guys.

Offline

 

#9 2006-09-27 09:07:45

joi
Member
2006-09-24
81

Re: Reading IPTC tags

Turns out I just needed to change

$conf['show_iptc'] = false;  ->   $conf['show_iptc'] = true;

in include/default.inc.php


But the tags only appear after I click on the "show file metadata" button.  If I want it to appear right below the images without having to select the button, where do I do that? 


Sorry for all these stupid questions...

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact