4images Forum & Community
4images Modifications / Modifikationen => Mods & Plugins (Requests & Discussions) => Topic started by: fotograf on October 04, 2002, 06:17:09 AM
-
I want, that after loading new the image on FTP, and start of command CHECK NEW IMAGES, there were new images and the information from IPTC info DISCRIPTIN was automatically transferred. If somebody knows as to make it inform me please.
-
Try this. Open "admin/checkimages.php" an replace
show_textarea_row($title, "image_description_".$i, "", $textarea_size);
with
$caption = "";
if ($imageinfo = @getimagesize($file_src, $info)) {
if (isset($info['APP13'])) {
$iptc = iptcparse($info['APP13']);
if (is_array($iptc)) {
$caption = (isset($iptc['2#120'][0])) ? $iptc['2#120'][0] : "";
}
}
}
show_textarea_row($title, "image_description_".$i, $caption, $textarea_size);
Jan
-
Great, just what i'm looking for, but i need also the keywords and the date created
Do i just have to copy the line of the caption and chance the line or can you place a example
again great, save a lot of work
-
Unfortunately. Has not helped. Mistakes any did not give out. But the information from IPTC automatically in a field of the description was not transferred :cry:
I am sorry for my bad English. It is machine translation..
-
Yes, it would be excellent if the information from IPTC would automatically be transferred to corresponding fields at performance of command CHECK NEW IMAGES. whether it has turned out at you with replacement of a code, at me is not present. If it only at me does not go, can you send to me the file modified by you. I shall be very grateful.
-
i think you made a mistake because with me it it was transferred fine
i'm trying to set the date alsop but this doesn't go well till now
-
I shall search where I have made a mistake. Thanks.
-
Jan or Nicky, can you help me out with the date part, i can't get this working
My experience with PHP is zero
-
And to me help too, please. When I allow command CHECK NEW IMAGES and I note DETAILED VERSION I see, THAT the INFORMATION is transferred from IPTC but after I press ADD button and I come into viewing gallery the field of the description is empty. I think to many users of your gallery it will be convenient if descriptions both key words and date will be automatically filled, at check of new images. Make, please, for us a new file checkimages.php. Let your script becomes even better.
-
See the first function get_iptc_insert_link() in "admin/admin_functions.php". There you will find the code how to handle the date and the keywords.
Jan
-
i tried but i'm getting a parse fault on line 342 or something like that.
please can you try to explain it for me again what i should do
regards
edwin
-
Replace
$caption = (isset($iptc['2#120'][0])) ? $iptc['2#120'][0] : "";
with
if (isset($iptc['2#055'][0])) {
$caption = $iptc['2#055'][0];
$caption = preg_replace("/([0-9]{4})([0-9]{2})([0-9]{2})/", "\\1-\\2-\\3", $caption);
}
for date
or
if (isset($iptc['2#025'])) {
$caption = "";
foreach ($iptc['2#025'] as $val) {
$caption .= (($caption != "" ) ? " " : "").$val;
}
}
for keywords
Jan
-
i'm very sorry Jan but this doesn't automaticly puts in the created date in the datefield but in the captionfield.
What do i have to change to get the setting right for the date field
i tought it hat to be changed in this part
$date = date("Y-m-d H:i:s", time());
$title = $lang['field_date'].$lang['date_desc'].$lang['date_format'].((isset($file_src)) ? get_iptc_insert_link($file_src, "date_created", "image_date_".$i, 0) : "");
show_input_row($title, "image_date_".$i, $date, $textinput_size);
Please, help me so this program wil be perfect for me
PS. i'm using 1.6 mayby 1.7 is different
-
Place
if ($imageinfo = @getimagesize($file_src, $info)) {
if (isset($info['APP13'])) {
$iptc = iptcparse($info['APP13']);
if (is_array($iptc)) {
if (isset($iptc['2#055'][0])) {
$date = $iptc['2#055'][0];
$date = preg_replace("/([0-9]{4})([0-9]{2})([0-9]{2})/", "\\1-\\2-\\3", $date);
}
}
}
}
after
$date = date("Y-m-d H:i:s", time());
Jan
-
YES YES YES YES YES YES YES YES YES YES :D :D :D :D :D
:)
:wink:
:P
YOU ARE THE MASTER
thank you, very well
regards edwin
-
See the first function get_iptc_insert_link() in "admin/admin_functions.php". There you will find the code how to handle the date and the keywords.
Jan
And, what in this file I need to correct? Help me please. :?:
-
Sorry this is I again. I get some good rezults, I have automate caption and date information, but I can't have good rezult with keywords. Explane me please !!!!!
-
I am beginner in this program, could any body explain?
What is IPTC system How to do that??? :o :o
-
Check out www.IPTC.org for more info.
IPTC is a standard of The International Press Telecommunications Council, and was designed to identify transmitted text and images.
This standard includes entries for captions, keywords, categories, credits, and origins. IPTC is supported by programs such as Adobe Photoshop, PhotoThumb, and most professional image database software.
IPTCExt is a free shell extension for Windows that adds shell support for viewing and editing IPTC info in JPEG image files.
Since this is FREEWARE, I'll post the link: http://photothumb.com/iptcext/
(http://photothumb.com/iptcext/iptcext_properties.gif)
-
If you use photoshop in FILE\FILE INFO you can discribe you photo. Also you can easy do it in FOTOSTATION/ Then you upload photos to your 4images site via FTP and check NEW IMAGES. near the fields for discription, date and keywords you will see buttons to move information from IPTC info. If you will click it , all that you wrote in FILE INFO will be copy in this field, it is very comfortable. And in this topic I try to understand how can I automate this without pressing buttons.
Sorry my english very bad. I have good rezult with discription and date but with keyword I have mistake.
-
I think this is the feature I want it ....
Jan could you fix the code please???
Is it ACDsee version 4 have IPTC ??
8) 8)
-
ACDSee 5 has IPTC but it not comfortable. I recomend you FOTOSTATION
http://www.fotoware.com/ or ThumbsPlus http://www.cerious.com/.
-
Jan could you fix the code please???
There is nothing broken in the code so what is there to fix? Please understand that what you're asking is for a feature enhancement to the product, not a bug fix. Jan is under no obligation here.
-
I dont have in my mind that code is broken. Jan explaned what to do and I resive some good rezults, but I dont understand all good, because I dont know PHP, I am not a programist. Thanks to Jan I change something in this file, but with keywords I made something wrong. I understand that EDWIN made this too and resive a good rezult, I dont understand something and I hope that somebody can help me. Sorry for my bad English.
-
I dont have in my mind that code is broken.
Sorry if there was some confusion. My reply was directed to mantra.
-
OK Chris, I thought the code doesn't work with the keyword.
I meant if somebody can help with this problem it will be good Mood.
8)
Because
most of people use this program not just show their images but need more word to explain the picture ,so adding the description each images is important, if this proces more quick or easily that will be good.
BTW : this program help me a lot Thanks to all developer .
:) :) [/b]
-
mantra If I understand you have good rezult with discription and date too ??
-
hi folks,
jan, please check out this actual code in my admin/checkimages.php if it is correct, 'cause it doesn't work for me :-(
i'm using V 1.7 and my prob is to be sure that i've done all correct cause the thread belongs to 1.6
in the admin_functions.php i didn't change anything ... should i ??
and what ?
if i'm right in my understanding of the MOD, after the upload and checking new images, the iptc infos should be shown in the keyword-column of the normal pic-description table ??!!
antwort gerne auch in deutsch ;-)
geänderter code: 19:18, 29. april 03
$title = $lang['field_description_ext'].((isset($file_src)) ? get_iptc_insert_link($file_src, "caption", "image_description_".$i) : "");
//old: show_textarea_row($title, "image_description_".$i, "", $textarea_size);
//new version
$caption = "";
if ($imageinfo = @getimagesize($file_src, $info)) {
if (isset($info['APP13'])) {
$iptc = iptcparse($info['APP13']);
if (is_array($iptc)) {
}
}
}
if (isset($iptc['2#055'][0])) {
$caption = $iptc['2#055'][0];
$caption = preg_replace("/([0-9]{4})([0-9]{2})([0-9]{2})/", "\\1-\\2-\\3", $caption);
}
if (isset($iptc['2#025'])) {
$caption = "";
foreach ($iptc['2#025'] as $val) {
$caption .= (($caption != "" ) ? " " : "").$val;
}
}
show_textarea_row($title, "image_description_".$i, $caption, $textarea_size);
//ende new version
// neue date version
$date = date("Y-m-d H:i:s", time());
if ($imageinfo = @getimagesize($file_src, $info)) {
if (isset($info['APP13'])) {
$iptc = iptcparse($info['APP13']);
if (is_array($iptc)) {
if (isset($iptc['2#055'][0])) {
$date = $iptc['2#055'][0];
$date = preg_replace("/([0-9]{4})([0-9]{2})([0-9]{2})/", "\\1-\\2-\\3", $date);
}
}
}
}
// ende neue date version
$title = $lang['field_date'].$lang['date_desc'].$lang['date_format'].((isset($file_src)) ? get_iptc_insert_link($file_src, "date_created", "image_date_".$i, 0) : "");
show_input_row($title, "image_date_".$i, $date, $textinput_size);
thnx for any help !!
Yogen
-
hi folks, again,
is there anybody who has version 1.7 with this MOD running ????
IF, THEN please send the changed files per mail or please post the changes here...
email: yogen@gmx.de
thx !!
Yogen
-
Jan - First of all - Excellent program :D . I am considering building a few new sites for my kids' sports teams. I would like to use 4images, but I typically shoot 100-150 pictures per sports event 4-5 times per week, and I use a batch IPTC editor to add captions, keywords, etc as part of my standard workflow.
I was able to understand and modify the code for date and caption per above, but I could not understand the final instructions for Keywords replacement, which is probably the most critical.
Could you repost the hack for automatic IPTC keyword replacement?
btw, the automatic function of IPTC replacement would make excellent addition to the codebase for your next release, since your audience would grow to include more professional photographers who, like me, tend to deal with large numbers of photographs. Batch functionality is a basic necessity in this business.
-
For keywords, replace
show_textarea_row($title, "image_keywords_".$i, "", $textarea_size);
with
$keywords = "";
if ($imageinfo = @getimagesize($file_src, $info)) {
if (isset($info['APP13'])) {
$iptc = iptcparse($info['APP13']);
if (is_array($iptc)) {
if (isset($iptc['2#025'])) {
foreach ($iptc['2#025'] as $val) {
$keywords .= (($value != "" ) ? " " : "").$val;
}
}
}
}
}
show_textarea_row($title, "image_keywords_".$i, $keywords, $textarea_size);
-
hallo jan,
erstmal danke für die anleitung!!
wegen der anderen user hier schreibe ich mal in englisch! ;-)
--------------
i replaced... and then i tested many times but nothing would imported into the description field :-(
as i wrote before, i use 1.7 and i don't know how to fix the problem. maybe the IPTC infos are not in a correct form?
i testet all, with comma, without, all i can do!!
do you have any suggestions about the form, or any other idea why it doesn't work ??
jan, did you tested your hack by yourself ?
greetz and thnx very much!
Yogen
PS: is there any other user now, whow uses the hack and it works ??
-
For keywords, replace
show_textarea_row($title, "image_keywords_".$i, "", $textarea_size);
with
$keywords = "";
if ($imageinfo = @getimagesize($file_src, $info)) {
if (isset($info['APP13'])) {
$iptc = iptcparse($info['APP13']);
if (is_array($iptc)) {
if (isset($iptc['2#025'])) {
foreach ($iptc['2#025'] as $val) {
$keywords .= (($value != "" ) ? " " : "").$val;
}
}
}
}
}
show_textarea_row($title, "image_keywords_".$i, $keywords, $textarea_size);
Jan - when I tested this mod, it does autopopulate the keywords field, but each IPTC keyword in my images is delimited by <CR>, and the autopopulate mod concatenates the fields together into a single string in 4images. When I use the built-in standard manual feature on the same images, it works perfectly and the fields are delimited by spaces, as they should be.
Can you review the code to verify my problem? It is possible that keywords may be delimited by different characters (<CR>, <,>, <tab>, etc.), depending on the system which was used to create them.
-
Bump
Jan - Any suggestions on how to fix this bug? Can't publish site without it.
thx much for your help.
-
Jan I have the same problem.
keywords entered and no space between keywords!
please help
-
bump!
-
Jan - First of all - Excellent program :D . I am considering building a few new sites for my kids' sports teams. I would like to use 4images, but I typically shoot 100-150 pictures per sports event 4-5 times per week, and I use a batch IPTC editor to add captions, keywords, etc as part of my standard workflow.
Hello,
which IPTC-Batch-Editor use You?
Greets
Chris
-
Jan I have the same problem.
keywords entered and no space between keywords!
please help
Hello,
replace
$keywords .= (($value != "" ) ? " " : "").$val;
with
$keywords .= (($value != "" ) ? " " : " ").$val;
You have now Space-separeted Keywords, but before the first Keyword you have an Space, but this is not a Problem. (Sorry for My Bad English).
Greets
Chris