[Module] Edit/Show IPTC-Data

mr.xy

Joined: 2011-09-20
Posts: 67
Posted: Fri, 2011-12-09 22:33

Missed the possibility to edit IPTC inside the gallery with no need to "reupload" the IPTC-modified image.
Have written one.

Characteristics:
- choose the IPTC-Tags you want to edit and show via admin->settings->IPTC edit
- you can also label them there as you like
- IPTC-Data is stored in thumb, resize and original file
- movies also get something like "virtual IPTC" -> they are stored in the thumb
- available via contex-menu and site-menu
- IPTC-Data shown in sidebar-block

ToDo's
- did not succeed in setting IPTC activated fields and IPTC-Labels -> User receive an info to go to admin->settings->IPTC edit to activate fields. Would like to activate all fields by default after install
- IPTC-Data-sidebar in album-overview is irritating, would like to hide it there

AttachmentSize
iptcedit.zip12.19 KB
 
mr.xy

Joined: 2011-09-20
Posts: 67
Posted: Sat, 2011-12-10 12:06

additional ToDo:
- mark edited item as - lets say - "EXIF dirty" to be rescanned with maintenance for modified IPTC

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sun, 2011-12-11 02:06

Great Job mr.xy!

<input type="submit" value="Speichern" id="iptcsubmit" onclick="reload()"/>
"Speichern" should be translate-able:
<input type="submit" value="<?= t("Save") ?>" id="iptcsubmit" onclick="reload()"/>

Module.info should have the additional parameters for credit and docs:

name = IPTC Edit
description = "Edit IPTC-Data"
version = 1
author_name = "mr.xy"
author_url = "http://codex.gallery2.org/User:Mr.xy"
info_url = "http://codex.gallery2.org/Gallery3:Modules:iptcedit"
discuss_url = "http://gallery.menalto.com/forum_module_iptcedit"

Then it will have the links active on the modules page.

Cheers! and thanks for your contributions.

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team

 
mr.xy

Joined: 2011-09-20
Posts: 67
Posted: Mon, 2011-12-12 22:02

Changed the translation-thing ...

Question: Translating in dialog-boxes seems to be impossible or am I doing something wrong?

Wanted to write some explanation here:
http://codex.gallery2.org/Gallery3:Modules:iptcedit

Unfortunately I can't find out how to edit this page :-(
No edit-button there.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Mon, 2011-12-12 22:41
Quote:
Unfortunately I can't find out how to edit this page
No edit-button there.

Just login using your forums username and password. Then you should see a edit button.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Mon, 2011-12-12 22:44
Quote:
Translating in dialog-boxes seems to be impossible or am I doing something wrong?

echo "<div style='color: darkRed; font-size: 1em; margin-bottom: 10px'>No IPTC-Tags are activated. Go to admin->settings->IPTC edit to activate and label.</div>";

is that the text you want to have translatable?

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
mr.xy

Joined: 2011-09-20
Posts: 67
Posted: Tue, 2011-12-13 12:15

Yes this is one of the things I would like to make translatable. How would you enable this?

And in my videothumb-module this is not working:
<?php if($rectangle_thumb_active == "active"){echo '<div id="info">' . t("Module \"RectangleThumbs\" active - Thumbs may be croped to defined aspect ratio.") . '</div>';} ?>

Codex:
Have no edit-button. Only these:
User page
Discussion
Watch

May be because of the dot in my username? -> mr.xy

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Tue, 2011-12-13 14:57

http://codex.gallery2.org/Gallery3:Modules:iptcedit
once logged it you should see:
page discussion edit history move watch

later for the translation stuff.

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Thu, 2011-12-15 00:07
 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2011-12-16 06:11
floridave wrote:
Quote:
Translating in dialog-boxes seems to be impossible or am I doing something wrong?

echo "<div style='color: darkRed; font-size: 1em; margin-bottom: 10px'>No IPTC-Tags are activated. Go to admin->settings->IPTC edit to activate and label.</div>";

is that the text you want to have translatable?

This is how I would do it.... see if this works:
echo "<div class='g-warning'>" . t('No IPTC-Tags are activated. Go to admin->settings->IPTC edit to activate and label.') . "</div>";
Try to use existing classes (class='g-warning') so that if the user has a different color schema for the page, hard coded colors might not work out.

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team

 
mr.xy

Joined: 2011-09-20
Posts: 67
Posted: Wed, 2011-12-21 13:37

Thanks floridave,

have changed the translatable text as you sugested. Text is shown but not accessable via translation panel. Do I have to remove and reinstall? Used the g-warning class.

Attachement in my first post is modified.

 
mr.xy

Joined: 2011-09-20
Posts: 67
Posted: Wed, 2011-12-21 13:40

by the way: why is this post moved to
Home » Forums » Gallery 2 Tech Zone » Module Development

It is not a G2-module :-|

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Wed, 2011-12-21 13:46

I swear I moved it the other day.... moved it again :-|

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Wed, 2011-12-21 18:07
Quote:
have changed the translatable text as you sugested. Text is shown but not accessable via translation panel. Do I have to remove and reinstall?

Not sure why it does not show. I have not played with the translation module much. The way I understood it was it scanned all the files and looked for the t() function and then used that text. Perhaps I don't understand it enough. Will see if anybody else has an idea.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
mr.xy

Joined: 2011-09-20
Posts: 67
Posted: Fri, 2011-12-23 21:39

Found the solution in bharats developer docs:
http://gallery.menalto.com/node/99826

Quote:
Any internationalized string you add to your module will be detected by Gallery 3 when the administrator browses to the Admin > Languages page and updates their translations. Localizers who install your module can localize your strings into their native language and upload those localizations to the Gallery website which will in turn make those localizations available to all users of the module.

I suppose the language maintenancs task does the same.

 
mr.xy

Joined: 2011-09-20
Posts: 67
Posted: Fri, 2011-12-23 21:49

Had a look at http://www.gallerymodules.com/ for the module. It is there but with a broken download link and no description - supposedly because I underestimated the importance of a well filled module.info.

Is this all automatic: the generation of a module-page and the entry at gallerymodules.com? This would be cool.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2011-12-23 23:25

Gallery modules.com is a volenteer effort as well. It scans the codex for modules and if there is a .zip file in the download section it grabs that . Not sure if it does that once a day or more frequently. It also scans the gallery-contrib git repository and uses the module.info file to create a list. It is all automatic and the git repository takes precedence, I think,

Updating the module.info file would help. I would have to look at other modules to see how the description is pulled and what is wrong with this one.

Dave
____________________________________________
Blog & G2 || floridave - Gallery Team

 
mr.xy

Joined: 2011-09-20
Posts: 67
Posted: Wed, 2012-06-20 13:55

I have tried to implement a jquery datepicker on the IPTC_CREATED_DATE-field with no luck.

The integrated jquery-ui.js doesn't seem to have the datepicker. Using another jquery-ui.js died yield some unstable results. I guess I am fighting against the js and css combined-cache and do not see the current result of my experimenting steps.

Is there any jquery-expert out there, who can help me out here.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Wed, 2012-06-20 18:08

G3's jquery is ancient.
You could use an iframe to load your datepicker in an external page loading modern jquery/UI in the external page.
And as long as the iframe is from the same domain, passing results via js is no problem.

-s

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Wed, 2012-06-20 19:23

Here is a demo of the concept http://www.flashyourweb.com/gallery2/embed_samples/datepicker.php

I'm loading moldy old jquery 1.3.2 into the host and jquery 1.7.2 in the iframe src

-s

 
mr.xy

Joined: 2011-09-20
Posts: 67
Posted: Sun, 2012-07-01 13:16

Hi supersidr. Thanks for your hint and your live-model. I will try it as soon as possible in a quiet moment :-)

 
mr.xy

Joined: 2011-09-20
Posts: 67
Posted: Thu, 2012-09-06 08:23

@suprsidr: Marvellous! Works from Scratch. (Hope this is understandable.) The only thing left is date-format. Can't get it to work, giving me another date-format. This for instance isn't working:

$(function() {
$("#datepicker").datepicker({dateFormat: 'yy-mm-dd'});
});

Isn't working means. No value is transported to the date-field.

IPTC_CREATED_DATE seems to need this format: CCYYMMDD

Thanks a lot for help.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Thu, 2012-09-06 11:58

you'll have to take that up w/ the jQueryUI team, I've never used datepicker beyond that demo.

-s
All New jQuery Minislideshow for G2/G3

 
mr.xy

Joined: 2011-09-20
Posts: 67
Posted: Sun, 2012-09-16 15:44

Finally found it out myself - thanks patience :-)

 
deanshavit

Joined: 2012-09-28
Posts: 23
Posted: Fri, 2012-11-09 02:19

I've got many photos with multiple tags (IPTC keywords) as a comma-separated array, but the IPTC Edit module only displays the first in the list - is there a delimiter that can be defined for array items?

 
undagiga

Joined: 2010-11-26
Posts: 693
Posted: Fri, 2012-11-09 06:46

Import of multiple keywords works for me. As I understand it, the keywords field is a multiple entry field. Software that will show you the keywords will often separate them by commas, but this is not how they are stored inside the image. It sounds like you have one long entry in the IPTC keyword field, containing all the real keywords comma separated. This is not the same thing as multiple keywords. It is possible that you could edit the EXIF module, where these things are extracted, and split them up. But some of this is just a guess.

 
deanshavit

Joined: 2012-09-28
Posts: 23
Posted: Fri, 2012-11-09 16:23

The import is working just fine - the keywords were created in Aperture and display correctly as a comma-separated list in the image info and are treated as multiple keywords. What I am trying to do is find a way to give users the ability to remove keywords/tags without giving them full read / write privileges to the album or photo (I've used the remove items module to do that). Adding keywords is not a problem, since that's built in.

While I appreciate the feedback, it's clear you've misunderstood my request a bit and assumed another cause. They fault is within the module, not the metadata - here's my issue, illustrated with screen snaps.

I've imported a photo into Gallery with three keyword/tags as display properly in screenshot below:

[img]http://downloads.macworkshops.com/iptcedit/1.jpg[/img]

With IPTC Edit, the keyword field display only the first keyword/tag, like in this screenshot:

[img]http://downloads.macworkshops.com/iptcedit/2.jpg[/img]

And when editing the keywords, again only the first keyword/tag is available like so:

[img]http://downloads.macworkshops.com/iptcedit/3.jpg[/img]

Gallery doesn't give individual permissions to only edit tags - so I've used the "Remove Items" module to hide the main photo editing tools but would like users to be able to add/remove tags and captions using IPTC edit - but it doesn't read the whole list of keywords.

Is this a bug? Can it be fixed or tweaked, so that all items in the array of embedded keywords are available to edit, much like the core Gallery module reads them into the DB?

That's my issue, illustrated.

 
mr.xy

Joined: 2011-09-20
Posts: 67
Posted: Wed, 2012-11-14 08:09

Hi deansshavit,

I've tested it and see that you are right. The IPTC-keywords are not - as I asumed - a however-seperated string. It's an array. I will fix that soon.

 
mr.xy

Joined: 2011-09-20
Posts: 67
Posted: Wed, 2012-11-14 11:05

Fixed.

minor Changes:
- better internationalization
- datepicker