Piwigo.org

You are not logged in. (Register / Login)

Announcement

#1 2017-08-21 06:07:57

executive
Member
Registered: 2017-08-16
Posts: 47

extending metadata

Hey guys.

First of all, a big thank you to all involved in the development of this software suite. I REALLY like Piwigo. I tried a lot of different web software, and I think this is the best gallery. Even compared to many cms packages out there, this is very well designed and powerful enough. I find it very intuitive and easy to learn to use.  The code is easy is understand, too.

The metadata integration is still a bit limited, but I'm sure it will evolve. It needs to be more user friendly for people to adopt it. Let me share with you some optimizations I have made so far. Right now, I primarily use Lightroom to edit and manage my photos, which is the main influence.

To other users, if you haven't yet discovered, there is some metadata functionality built into Piwigo already.  Some is on by default (For example, Piwigo will automatically set the photo's creation time to what was recorded by your camera), some just needs to be turned on and adjusted, and some requires more drastic changes. I recommend installing the "LocalFiles Editor" plugin to do so.

1. Showing exposure parameters. There is a camera info button above each photo, which will show some basic info, but it can be extended. Add these lines to your local config with the localfiles plugin:

Code:

$conf['show_exif_fields'] = array(
  'DateTimeOriginal',
  'Make',
  'Model',
  'ExposureProgram',
  'FocalLengthIn35mmFilm',
  'FNumber',
  'ExposureTime',
  'ISOSpeedRatings',
  'Flash',
  'WhiteBalance',
  'UserComment'
  );

(Of course there is more. Check out the "Read Metadata" plugin to find out more parameters.)

2.  Lightroom metadata. You might use LR to add additional information to your photos, such as: title, description, author, and keywords. When you develop and export your photos from LR, all this data is stored into the image using so called IPTC markers. Here is how you can incorporate this data into Piwigo. Once again in your local files editor, add these lines:

Code:

$conf['use_iptc'] = true;
$conf['use_iptc_mapping'] = array(
  'author'          => '2#080',
  'name'            => '2#005',
  'comment'         => '2#120',
  'keywords'        => '2#025',
  );

3. *EXPERIMENTAL* As of Piwigo 2.9.1 you cannot browse/filter your photos by author (even though this is already a database item just like tags) or EXIF metadata. I really wanted to be able to sort my photos by who took them, and what camera was used. To solve this, I added code which created tags out of author and camera names:

   i) Camera model tag. Add to local files editor:

Code:

$conf['use_exif_mapping'] = array(
  'date_creation'        => 'DateTimeOriginal',
  'tags'                 => 'Model',
  );

ii) Author tags. WARNING. Create a backup copy of this file in case you break something:
[piwigo root]/admin/include/functions_metadata.php
Then, look for this line:

Code:

 if (isset($iptc['keywords']))

and insert this code BEFORE it:

Code:

  // If author is present in IPTC, then copy it to tags (for searching)
  if (isset($iptc['author']))
  {
      $iptc['keywords'] = $iptc['keywords'].','.$iptc['author'];
  }

I hope this helps somebody. Hopefully, in future versions we'll be able to add more searchable properties to our photos. LR also exports names you have attributed to autodetected faces. It would be nice to use those too.

Last edited by executive (2017-08-21 06:38:21)

Offline

 

#2 2017-08-22 21:25:29

flop25
Piwigo Team
Registered: 2006-07-06
Posts: 6566
Website

Re: extending metadata

Thanks for sharing
if Plg repair our wiki (because we can't administrate it since a whole) I would give you an access if you want ; the metadata page is quite old
whe you say "Hopefully, in future versions we'll be able to add more searchable properties to our photos" it's a wish or you found a commit in our Github?


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 2017-08-22 21:37:44

flop25
Piwigo Team
Registered: 2006-07-06
Posts: 6566
Website

Re: extending metadata

ho i found a way to bypass the issue with our wiki En
So are you interesting in publishing your tips (no core file change however) and enhance the Documentation for the english community?


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

 

#4 2017-08-22 23:36:54

executive
Member
Registered: 2017-08-16
Posts: 47

Re: extending metadata

Sure, I can add some tips to the wiki.

The photo properties is a big wish for me, and probably others. I can register it on Github if that would help. I would love to assist, but my understanding of Piwigo core is still limited, and my PHP/SQL is not super strong.

Offline

 

#5 2017-08-23 21:51:26

executive
Member
Registered: 2017-08-16
Posts: 47

Re: extending metadata

Au fait, je parle/ecris Francais aussi (Quebecois, malheureusement) Si vous avez besoin des traductions Fr->En , je peux vous aider avec ca.

Offline

 

#6 2017-08-23 22:04:34

flop25
Piwigo Team
Registered: 2006-07-06
Posts: 6566
Website

Re: extending metadata

Ha ! super Bienvenue cher cousin éloigné ^^
La Doc Fr étant bien plus complète je pense que ça peut déjà bien aider pour transposer et créer des pages. Ecrire la doc est rébarbatif et pas gratifiant (je le sais très bien car j'ai écrit et rangé une bonne partie de la Doc En) mais cela aiderait la communauté En qui grandit
D'ailleurs merci beaucoup de répondre sur el forum C’est très gentil et fort utile


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

 

Board footer

Powered by FluxBB

github twitter facebook google+ newsletter Donate Piwigo.org © 2002-2017 · Contact