Gallery 3.0.8 Is it possible to add description during upload?

MikeLFD

Joined: 2013-03-22
Posts: 79
Posted: Mon, 2013-06-03 20:57

What I'd like to do is be able to add a description when I pick the file to upload instead of editing it after it's uploaded to add the description.
Ideally it would be nice to be able to type in a title and description when uploading
But I really just want to be able to give my upload a description as it's being uploaded.
Thanks in advance for any assistance

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Tue, 2013-06-04 02:42

Not that I know.
You can for tags.
I use the captionator module after upload.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
MarkRH

Joined: 2007-05-25
Posts: 241
Posted: Tue, 2013-06-04 03:34

I just add IPTC Caption(description) to the photo before I upload. If the Exif Module is activated (comes with Gallery), it will read this and create the Item's description in the Gallery from it. I use Irfanview to add the IPTC Caption(description). In any case you have to either add it to the photo itself before uploading or add it after uploading.

- Mark H.

Using Gallery 3.0.7 - gallery.markheadrick.com

 
MikeLFD

Joined: 2013-03-22
Posts: 79
Posted: Tue, 2013-06-04 12:48

Had a feeling it would be a no go but was worth asking.
Maybe someone will write a module in the future for it.
Thanks guys.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Tue, 2013-06-04 13:46

Item Description will be populated from IPTC: Caption if it exists
Item Title will be populated from IPTC: ObjectName if it exists
http://galleryproject.org/node/111548#comment-404118

Dave

____________________________________________
Blog & G2 || floridave - Gallery Team

 
MarkRH

Joined: 2007-05-25
Posts: 241
Posted: Tue, 2013-06-04 22:01

Hmmm, I'll have to experiment with Irfanview to see what corresponds with IPTC: ObjectName. My guess would be Document Title. As long as it creates the internet slug based off the filename and not the title. Just have to do a couple experiments.

- Mark H.

Using Gallery 3.0.8 - gallery.markheadrick.com

 
MarkRH

Joined: 2007-05-25
Posts: 241
Posted: Tue, 2013-06-04 23:15

Tried creating an image with an IPTC: ObjectName and it doesn't seem to work. The Object name shows in Exifer in the IPTC tab but Gallery is still using the filename to generate the title. It does get the IPTC description properly. Guess I should make a new thread.

- Mark H.

Using Gallery 3.0.8 - gallery.markheadrick.com

 
jnash
jnash's picture

Joined: 2004-08-02
Posts: 814
Posted: Wed, 2013-06-05 01:11

Did you install the stadfed module?

 
MikeLFD

Joined: 2013-03-22
Posts: 79
Posted: Wed, 2013-06-05 02:42

Tried Dave's suggestion.
Activated exif and stadfed module.
Edited photo in iPhoto, Worked perfectly for pictures.
Now just need to find similar options for mp4 uploads.
Thanks Dave

 
jnash
jnash's picture

Joined: 2004-08-02
Posts: 814
Posted: Wed, 2013-06-05 04:10

@mikelfd if you can post up the results (or pm me better yet) the output of the following for one of your mp4's, I'll write up a quick module to do the same as stadfed...

ffmpeg -i yourvideo.mp4 -f ffmetadata

All I need is the part following Metadata:

 
MarkRH

Joined: 2007-05-25
Posts: 241
Posted: Wed, 2013-06-05 05:59
jnash wrote:
Did you install the stadfed module?

Ahh, missed that part. After installing that it does pull out the Document Title (as labeled in Irfanview). Doesn't show up in the View More Information dialog though which I guess is handled by the Exif module which doesn't look at that field.

- Mark H.

Using Gallery 3.0.8 - gallery.markheadrick.com

 
MikeLFD

Joined: 2013-03-22
Posts: 79
Posted: Wed, 2013-06-05 13:14

jnash,
Not sure exactly what info you need. I use MetaZ to add the title and description before I upload the mp4
I just PM'd you a link to one of the mp4's on my site.

 
jnash
jnash's picture

Joined: 2004-08-02
Posts: 814
Posted: Thu, 2013-06-06 03:11

Got your PM's. Unfortunately, I'm on travel for business at the moment, and am tied up on getting you a 'fix' I'll get to it though. Hang tight.

 
MikeLFD

Joined: 2013-03-22
Posts: 79
Posted: Thu, 2013-06-13 23:30

jnash, Hope the business trip is going well.

 
jnash
jnash's picture

Joined: 2004-08-02
Posts: 814
Posted: Thu, 2013-06-13 23:42

@mikelfd - thanks, and I'm back, but sorry, your request slipped off my radar.

I'll have a look shortly to see what I can whip up for you.

 
MikeLFD

Joined: 2013-03-22
Posts: 79
Posted: Fri, 2013-06-14 03:29

Tnx Jnash.
OK lets start racking our brains.
was going to start a new thread on this because I've been trying to get it to work without physically adding the MYDOMAIN part.

Using meta tags

This works:<meta property="og:image" content="http://MYDOMAIN<?= $theme->item()->thumb_url() ?>" />

This doesn't:<meta property="og:image" content="<?= $theme->item()->thumb_url() ?>" />

Any ideas?

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2013-06-14 04:20

<meta property="og:image" content="<?= $theme->item()->thumb_url(true) ?>" />

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
MikeLFD

Joined: 2013-03-22
Posts: 79
Posted: Fri, 2013-06-14 05:04

THANK YOU Dave.
That was the last piece of the puzzle to get Gallery to be completely compatible with the FaceBook debugger. You may remember I was trying to get the video thumbs show up on FB with the link just like the picture thumbs did. I managed to get it working but I needed to add the http://MYDOMAIN part to the og:image tag.

You decide if it needs it's own thread.

To have gallery completely compatible with the FaceBook debugger which allows your picture links and video links to have their proper thumbnail when sharing on your FaceBook timeline:
1. open (your gallery directory) /themes/(your theme)/views/page.html.php
2. at the top of the file find this: <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
3. directly under it add this:

<meta property="og:image" content="<?= $theme->item->thumb_url(true)?>"/ >    
  <meta property="og:title" content="<?=  $theme->item()->title ?>" />
  <meta property="og:description"content="<?= $theme->item()->description ?> " />
  <meta property="og:url" content="<?= $theme->item->abs_url() ?>" />

4. save the file.
from this point on any video or picture you upload to your gallery installation will be compliant with FaceBook's protocol for sharing.
For those that are timid editing code I have attached a copy of my edited page.html.php file. Just download it and upload it to (your gallery directory) /themes/(your theme)/views/ folder.
Remember before editing any file make a backup of the original.

 
jnash
jnash's picture

Joined: 2004-08-02
Posts: 814
Posted: Fri, 2013-06-14 13:49

Meh, without third party libraries, pulling the output for metadata directly from the video file is proving to be a challenge. ffmpeg is just not cooperative with php and capturing the output appropriately.

I don't think I'll be able to continue on the process.

 
MikeLFD

Joined: 2013-03-22
Posts: 79
Posted: Fri, 2013-06-14 13:55

OK Thanks for the attempt jnash.
Maybe in future releases this will be incorporated.
I appreciate the try.

 
jnash
jnash's picture

Joined: 2004-08-02
Posts: 814
Posted: Fri, 2013-06-14 15:02

I tried harder :-)

Give this a shot:

STADFED Module

It will set the description if description or synopsis metadata is set
It will set title if objectname metadata is set
It will set name if objectname metadata is set

Relies on ffmpeg being installed of course...

 
MikeLFD

Joined: 2013-03-22
Posts: 79
Posted: Fri, 2013-06-14 16:22

jnash-
YOU ARE MASTER JEDI. This works perfectly!
Not only is it picking up the data from pictures but it's also picking the data up from videos.
I can't thank you enough.
It also fits perfectly with the changes I made to the meta data in page.html.php. I just examined an upload in the FB debugger and it is seeing all the data as well. Gallery can not get any better now.
Quick suggestion please. These changes (your (new) staffed plus exif and my metadata additions) should be included by default in any update or upgrade to Gallery.
I can't thank you enough.
Thank you also Dave for your input on that meta img code help.

 
jnash
jnash's picture

Joined: 2004-08-02
Posts: 814
Posted: Fri, 2013-06-14 16:30

Glad to hear it worked out! Keep me posted if you see any issues, or shortcomings.

 
MarkRH

Joined: 2007-05-25
Posts: 241
Posted: Sun, 2013-06-30 11:21

Those meta-property tags, you'll probably want to wrap those like this:

<? if ($theme->item()) { ?>
  <meta property="og:image" content="<?= $theme->item->thumb_url(true)?>" />    
  <meta property="og:title" content="<?=  $theme->item()->title ?>" />
  <meta property="og:description" content="<?= $theme->item()->description ?>" />
  <meta property="og:url" content="<?= $theme->item->abs_url() ?>" />
<? } ?>

If not, it tries to at least execute them on the admin reauthenticate page to login in as admin causing it to error out and produce a white window in the browser. The last piece of source code was:

  <meta property="og:image" content=

I guess that's because the admin reauthenticate page is still using the normal gallery theme and not the admin theme at that point.

- Mark H.

Using Gallery 3.0.9 - gallery.markheadrick.com

 
omardesko

Joined: 2013-06-30
Posts: 5
Posted: Sun, 2013-06-30 21:00

Hi, i have a problem, i istalled stadfed module, activate exif in modules, modify my IPTC on images in Titles and Description, but when i made upload in gallery the modules take only the description but not title.
I use Gallery 3.0.8

 
jnash
jnash's picture

Joined: 2004-08-02
Posts: 814
Posted: Mon, 2013-07-01 17:07

attach a sample image that isn't working, and I'll take a look.

 
omardesko

Joined: 2013-06-30
Posts: 5
Posted: Mon, 2013-07-01 17:26

thanks jnash, attach here a image.
I use Adobe Bridge to modify IPTC.

 
jnash
jnash's picture

Joined: 2004-08-02
Posts: 814
Posted: Mon, 2013-07-01 20:29

fixed in v5...

 
omardesko

Joined: 2013-06-30
Posts: 5
Posted: Tue, 2013-07-02 01:13

Thats ok Jnash, now is ok. thanks