Announcement

#1 2013-08-19 00:37:08

wgreen
Guest

How to use extra IPTC fields?

Hi,
I just installed this photo gallery script and I would like to make use, for titles, descriptions etc, of some IPTC fields that piwigo currently does not use. How can I add that extra info from the fields that piwigo currently ignores? What are the steps?

 

#2 2013-08-19 01:29:48

flop25
Piwigo Team
2006-07-06
7037

Re: How to use extra IPTC fields?

Hi
check out http://piwigo.org/doc/doku.php?id=user_ … onf_locale and the iptc variable in


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#3 2013-08-19 13:12:28

wgreen
Guest

Re: How to use extra IPTC fields?

Hi,
thanks for the reply, but the page you link to only describes the local configuration (and the LocalFiles Editor which I guess I may not need if I edit files locally before uploading them myself) in rather general terms. There is no reference to IPTC there.

What I have done so far is to make a few changes to include/config_default.inc.php, and the relevant bit is here:


Code:

// show_iptc: Show IPTC metadata on picture.php if asked by user
            // CHANGED to true
$conf['show_iptc'] = true;

// show_iptc_mapping : is used for showing IPTC metadata on picture.php
// page. For each key of the array, you need to have the same key in the
// $lang array. For example, if my first key is 'iptc_keywords' (associated
// to '2#025') then you need to have $lang['iptc_keywords'] set in
// language/$user['language']/common.lang.php. If you don't have the lang
// var set, the key will be simply displayed
//
// To know how to associated iptc_field with their meaning, use
// tools/metadata.php
            // ADDED iptc_custom_field
$conf['show_iptc_mapping'] = array(
  'iptc_keywords'        => '2#025',
  'iptc_caption_writer'  => '2#122',
  'iptc_byline_title'    => '2#085',
  'iptc_custom_field'    => '2#254',
  'iptc_caption'         => '2#120'
  );

// use_iptc: Use IPTC data during database synchronization with files
// metadata
            // CHANGED to true
$conf['use_iptc'] = true;

// use_iptc_mapping : in which IPTC fields will Piwigo find image
// information ? This setting is used during metadata synchronisation. It
// associates a piwigo_images column name to a IPTC key
            // ADDED custom_field
$conf['use_iptc_mapping'] = array(
  'keywords'        => '2#025',
  'date_creation'   => '2#055',
  'author'          => '2#122',
  'name'            => '2#005',
  'custom_field'    => '2#254',
  'comment'         => '2#120'
  );

I'm not 100% sure what these changes do, so please advice if it seems odd. Anyway, this in itself is not enough. Do I need to add a column in the database manually? What other changes do I have to do?

 

#4 2013-08-19 13:13:59

flop25
Piwigo Team
2006-07-06
7037

Re: How to use extra IPTC fields?

http://piwigo.org/doc/doku.php?id=user_ … onf_locale

The default config file, which should be never modified, is include/config_default.inc.php


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#5 2013-08-19 14:06:59

wgreen
Guest

Re: How to use extra IPTC fields?

OK, now I know what not to modify. The problem is that I don't know what to modify instead. As mentioned, the link provided goes to a page that does not mention IPTC.

 

#6 2013-08-19 14:13:11

flop25
Piwigo Team
2006-07-06
7037

Re: How to use extra IPTC fields?

well you did well understand with $conf['show_iptc_mapping'] and $conf['use_iptc_mapping'] to change and setting to true the 'use' and 'show'
by default it should work
just synch
and if it doesn't work, you have to find the field name: check  metadata.php in the /tool folder


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#7 2013-08-19 15:07:27

Ann
Member
NC, USA
2013-08-10
40

Re: How to use extra IPTC fields?

wgreen wrote:

the page you link to only describes the local configuration (and the LocalFiles Editor which I guess I may not need if I edit files locally before uploading them myself)

Hi wgreen, the trick is you actually do need to use the LocalFiles Editor for this. It has a tab for "local config" where you enter the changes you want to make to the config file, such as showing more Exif or IPTC info.

Offline

 

#8 2013-08-21 00:25:38

wgreen
Guest

Re: How to use extra IPTC fields?

flop25 wrote:

well you did well understand with $conf['show_iptc_mapping'] and $conf['use_iptc_mapping'] to change and setting to true the 'use' and 'show'
by default it should work
just synch
and if it doesn't work, you have to find the field name: check  metadata.php in the /tool folder

So it should work as I have it setup? I have double-checked with metadata.php, and it gives me the field 2#254, just as I had. I also synced, once more. Still no change.

Is the script supposed to add an additional column in the database for this new field or will I have to add it manually?

 

#9 2013-08-21 00:28:30

wgreen
Guest

Re: How to use extra IPTC fields?

Ann wrote:

wgreen wrote:

the page you link to only describes the local configuration (and the LocalFiles Editor which I guess I may not need if I edit files locally before uploading them myself)

Hi wgreen, the trick is you actually do need to use the LocalFiles Editor for this. It has a tab for "local config" where you enter the changes you want to make to the config file, such as showing more Exif or IPTC info.

Thanks for the feedback. But what do I add into this LocalFiles Editor? If I reverse my previous changes mentioned earlier, so everything is like a fresh install, what will I have to enter into this LocalFiles Editor? A code example would be great if possible...

 

#10 2013-08-21 14:01:15

Ann
Member
NC, USA
2013-08-10
40

Re: How to use extra IPTC fields?

I think you just copy and paste your code above into the "local config" tab where is says:

/* The file does not exist until some information is entered below.
Once information is entered and saved, the file will be created. */

and save file.

Offline

 

#11 2013-08-23 23:39:49

wgreen
Guest

Re: How to use extra IPTC fields?

Ann wrote:

I think you just copy and paste your code above into the "local config" tab where is says:

/* The file does not exist until some information is entered below.
Once information is entered and saved, the file will be created. */

and save file.

Thanks. Got it to work after doing that and after manually adding an extra column to the database.

 

#12 2015-03-10 19:22:41

bocman
Member
2015-02-18
42

Re: How to use extra IPTC fields?

Hi!
Is it nessesary to adding an extra column to the database manually for current version Piwigo?

Offline

 

Board footer

Powered by FluxBB

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