• Resolved scotisle

    (@scotisle)


    Hi,

    I’m moving from Drupal 7 to WordPress, because Drupal 10 is so complicated with requiring command line interfaces and I’m just a History Teacher, not a software engineer. So VERY new to both WordPress and MLA. I’m finding both a little overwhelming and I have just two months to master both and get my site back up in time for the Fall classes.

    I have these 925+ photos with IPTC/EXIF data I entered in Adobe Photoshop. I created custom fields in MLA. But when I import images, just the title and caption populate, not any of the custom fields (copyright, city, state, country, credit, source, etc.) show up in WordPress Media Library.

    I read the MLA documentation but it’s very complicated with all the options. What can I do to get the IPTC/EXIF data to show up in Media Library, and then over to a post with the image please? I *think* MLA can do this but I’m not sure how. Thanks so much!

    The page I need help with: [log in to see the link]

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author David Lingren

    (@dglingren)

    Welcome to WordPress (and MLA), and thanks for your question. I know that both of these new technologies can be a challenge at first.

    The sample image you posted has quite a bit of useful metadata accessible via MLA. You wrote “I created custom fields in MLA…” but you don’t say exactly how. I hope you found the Settings/Media Library Assistant IPTC/EXIF tab and the “Add New Custom Field Rule” area on the left. Also, remember to check the “Enable…” boxes in the upper left portion of the page and check “Save Changes”.

    You asked “What can I do to get the IPTC/EXIF data to show up in Media Library, and then over to a post with the image please?” If you haven’t found i already, the best place to start is by downloading and reading this document:

    Mapping File Metadata to WordPress Fields with Media Library Assistant

    The document will tell you how to find the best source of values like copyright and how to copy it to a custom field in a mapping rule. You can also use a mapping rule to populate WordPress fields like ALT Text and Description, and to assign taxonomy terms from keywords present in the image file metadata.

    Once the values are stored in custom fields you can use MLA’s [mla_gallery] shortcode in post/page content to display the information. You can add the?mla_caption=?parameter to your?[mla_gallery]?shortcode. More elaborate gallery composition can be done with custom style and markup templates, which allow you complete control over the gallery layout.

    I will leave this topic unresolved for now. Any additional information you can provide about what you’ve done so far will help me be more specific. Thanks for your interest in the plugin.

    Thread Starter scotisle

    (@scotisle)

    Thanks so much! I guess my question needs to be more specific. On my test server, I have successfully imported the attachment file metadata. However when I use the shortcode ?[mla_gallery] manually to create a post, nothing at all shows up.
    I’m using another plugin to automatically make a post for each image (unless MLA can do that?) when it is uploaded. The plugin doesn’t accept shortcode so I tried using the PHP from the shortcode editing and that didn’t work either, it just printed the code.

    So now that I have the IPTC/EXIF importing, I’m not sure how to format the template. I read the manual; I’d read it before but I’m not sure if I need markup or style, and how to format the template so that instead of the IPTC/EXIF codes there are actual descriptive words. Then I would not like to make close to 1000+ manual posts so I’m hoping to automate this whole thing.

    Thanks so much! Sorry I’m such a noob.

    post_id => 1694
    iptc:2#000 => 2
    iptc:2#120 => Japanese Prisoner of War is emotionally exhausted after his ordeal. This Japanese soldier, one of 306 who surrendered to the 6th Marine Division during the last few days of the Okinawa Campaign, joined more than 1,000 of his comrades in choosing capture over death as the last defenses were mopped up. Still, four times as many Japanese were killed in the closing days of the battle than were captured. The Prisoner of War compound at Yaka-Dake officially opened on June 23, 1945, already holding over 8,000 prisoners. The 51st Military Police Platoon operated Yaka, which had space for 15,000 prisoners. Civilian internees were screened for military personnel, as 2% of the 300,000 civilians eventually interned were actually soldiers. Eventually over 10,000 prisoners were taken on Okinawa, about a third of all the Japanese captured during the war.
    iptc:2#122 => Jason McDonald
    iptc:2#105 => Japanese Prisoner of War on Okinawa
    iptc:2#080 => Hager Jr.
    iptc:2#085 => United States Marine Corps
    iptc:2#110 => National Archives
    iptc:2#005 => Japanese Prisoner of War on Okinawa
    iptc:2#055 => 19450621
    iptc:2#090 => Yaka-Dake
    iptc:2#095 => Okinawa
    iptc:2#101 => Japan
    iptc:2#025.0 => Japanese Prisoner of War
    iptc:2#025.1 => Yaka
    iptc:2#025.2 => Yaka-Dake
    iptc:2#025.3 => Okinawa
    iptc:2#116 => Caption ?2007 MFA Productions LLC
    Image in the Public Domain
    exif:FileName => wwii1354.jpg
    exif:FileDateTime => 1687626805
    exif:FileSize => 1819733
    exif:FileType => 2
    exif:MimeType => image/jpeg
    exif:SectionsFound => ANY_TAG, IFD0, THUMBNAIL, EXIF
    exif:COMPUTED.html => width="2341" height="2932"
    exif:COMPUTED.Height => 2932
    exif:COMPUTED.Width => 2341
    exif:COMPUTED.IsColor => 0
    exif:COMPUTED.ByteOrderMotorola => 0
    exif:COMPUTED.Copyright => Caption ?2007 MFA Productions LLC
    Image in the Public Domain
    exif:COMPUTED.Thumbnail.FileType => 2
    exif:COMPUTED.Thumbnail.MimeType => image/jpeg
    exif:ImageWidth => 2341
    exif:ImageLength => 2932
    exif:BitsPerSample => 8
    exif:Compression => 1
    exif:PhotometricInterpretation => 1
    exif:ImageDescription => Japanese Prisoner of War is emotionally exhausted after his ordeal. This Japanese soldier, one of 306 who surrendered to the 6th Marine Division during the last few days of the Okinawa Campaign, joined more than 1,000 of his comrades in choosing capture over death as the last defenses were mopped up. Still, four times as many Japanese were killed in the closing days of the battle than were captured. The Prisoner of War compound at Yaka-Dake officially opened on June 23, 1945, already holding over 8,000 prisoners. The 51st Military Police Platoon operated Yaka, which had space for 15,000 prisoners. Civilian internees were screened for military personnel, as 2% of the 300,000 civilians eventually interned were actually soldiers. Eventually over 10,000 prisoners were taken on Okinawa, about a third of all the Japanese captured during the war.
    exif:Orientation => 1
    exif:SamplesPerPixel => 1
    exif:XResolution => 3000000/10000
    exif:YResolution => 3000000/10000
    exif:ResolutionUnit => 2
    exif:Software => Adobe Photoshop CS2 Macintosh
    exif:DateTime => 2008:01:02 13:35:48
    exif:Artist => Hager Jr.
    exif:Copyright => Caption ?2007 MFA Productions LLC
    Image in the Public Domain
    exif:Exif_IFD_Pointer => 1198
    exif:THUMBNAIL.Compression => 6
    exif:THUMBNAIL.XResolution => 72/1
    exif:THUMBNAIL.YResolution => 72/1
    exif:THUMBNAIL.ResolutionUnit => 2
    exif:THUMBNAIL.JPEGInterchangeFormat => 1366
    exif:THUMBNAIL.JPEGInterchangeFormatLength => 10221
    exif:DateTimeDigitized => 1945:06:21 00:00:00
    exif:ColorSpace => 65535
    exif:ExifImageWidth => 2341
    exif:ExifImageLength => 2932
    xmp:xmptk => 3.1.1-112
    xmp:DocumentID => uuid:D8266EF6BAC911DCBC82B41CF33EEA2E
    xmp:InstanceID => uuid:D8266EF7BAC911DCBC82B41CF33EEA2E
    xmp:DerivedFrom.instanceID => uuid:D8266EF2BAC911DCBC82B41CF33EEA2E
    xmp:DerivedFrom.documentID => uuid:5AAF5F5FB40111DCB570E3F9CD16D682
    xmp:CreateDate => 2008-01-02 13:35:48
    xmp:ModifyDate => 2008-01-02 13:35:48
    xmp:MetadataDate => 2008-01-02 13:35:48
    xmp:CreatorTool => Adobe Photoshop CS2 Macintosh
    xmp:format => image/jpeg
    xmp:description => Japanese Prisoner of War is emotionally exhausted after his ordeal. This Japanese soldier, one of 306 who surrendered to the 6th Marine Division during the last few days of the Okinawa Campaign, joined more than 1,000 of his comrades in choosing capture over death as the last defenses were mopped up. Still, four times as many Japanese were killed in the closing days of the battle than were captured. The Prisoner of War compound at Yaka-Dake officially opened on June 23, 1945, already holding over 8,000 prisoners. The 51st Military Police Platoon operated Yaka, which had space for 15,000 prisoners. Civilian internees were screened for military personnel, as 2% of the 300,000 civilians eventually interned were actually soldiers. Eventually over 10,000 prisoners were taken on Okinawa, about a third of all the Japanese captured during the war.
    xmp:creator.0 => Hager Jr.
    xmp:creator.1 => A. F.
    xmp:title => Japanese Prisoner of War on Okinawa
    xmp:subject.0 => Japanese Prisoner of War
    xmp:subject.1 => Yaka
    xmp:subject.2 => Yaka-Dake
    xmp:subject.3 => Okinawa
    xmp:rights => Caption ?2007 MFA Productions LLC
    Image in the Public Domain
    xmp:Title => Japanese Prisoner of War on Okinawa
    xmp:Author => Hager Jr.,A. F.
    xmp:Subject => Japanese Prisoner of War is emotionally exhausted after his ordeal. This Japanese soldier, one of 306 who surrendered to the 6th Marine Division during the last few days of the Okinawa Campaign, joined more than 1,000 of his comrades in choosing capture over death as the last defenses were mopped up. Still, four times as many Japanese were killed in the closing days of the battle than were captured. The Prisoner of War compound at Yaka-Dake officially opened on June 23, 1945, already holding over 8,000 prisoners. The 51st Military Police Platoon operated Yaka, which had space for 15,000 prisoners. Civilian internees were screened for military personnel, as 2% of the 300,000 civilians eventually interned were actually soldiers. Eventually over 10,000 prisoners were taken on Okinawa, about a third of all the Japanese captured during the war.
    xmp:Keywords.0 => Japanese Prisoner of War
    xmp:Keywords.1 => Yaka
    xmp:Keywords.2 => Yaka-Dake
    xmp:Keywords.3 => Okinawa
    xmp:Creator => Adobe Photoshop CS2 Macintosh
    xmp:CreationDate => 2008-01-02 13:35:48
    xmp:ModDate => 2008-01-02 13:35:48
    xmp:xmlns.x => adobe:ns:meta/
    xmp:xmlns.rdf => https://www.w3.org/1999/02/22-rdf-syntax-ns#
    xmp:xmlns.xapMM => https://ns.adobe.com/xap/1.0/mm/
    xmp:xmlns.stRef => https://ns.adobe.com/xap/1.0/sType/ResourceRef#
    xmp:xmlns.xap => https://ns.adobe.com/xap/1.0/
    xmp:xmlns.dc => https://purl.org/dc/elements/1.1/
    xmp:xmlns.photoshop => https://ns.adobe.com/photoshop/1.0/
    xmp:xmlns.tiff => https://ns.adobe.com/tiff/1.0/
    xmp:xmlns.exif => https://ns.adobe.com/exif/1.0/
    xmp:xmlns.xapRights => https://ns.adobe.com/xap/1.0/rights/
    xmp:xmlns.Iptc4xmpCore => https://iptc.org/std/Iptc4xmpCore/1.0/xmlns/
    xmp:xapMM.DocumentID => uuid:D8266EF6BAC911DCBC82B41CF33EEA2E
    xmp:xapMM.InstanceID => uuid:D8266EF7BAC911DCBC82B41CF33EEA2E
    xmp:xapMM.DerivedFrom.instanceID => uuid:D8266EF2BAC911DCBC82B41CF33EEA2E
    xmp:xapMM.DerivedFrom.documentID => uuid:5AAF5F5FB40111DCB570E3F9CD16D682
    xmp:xap.CreateDate => 2008-01-02 13:35:48
    xmp:xap.ModifyDate => 2008-01-02 13:35:48
    xmp:xap.MetadataDate => 2008-01-02 13:35:48
    xmp:xap.CreatorTool => Adobe Photoshop CS2 Macintosh
    xmp:dc.format => image/jpeg
    xmp:dc.description => Japanese Prisoner of War is emotionally exhausted after his ordeal. This Japanese soldier, one of 306 who surrendered to the 6th Marine Division during the last few days of the Okinawa Campaign, joined more than 1,000 of his comrades in choosing capture over death as the last defenses were mopped up. Still, four times as many Japanese were killed in the closing days of the battle than were captured. The Prisoner of War compound at Yaka-Dake officially opened on June 23, 1945, already holding over 8,000 prisoners. The 51st Military Police Platoon operated Yaka, which had space for 15,000 prisoners. Civilian internees were screened for military personnel, as 2% of the 300,000 civilians eventually interned were actually soldiers. Eventually over 10,000 prisoners were taken on Okinawa, about a third of all the Japanese captured during the war.
    xmp:dc.creator.0 => Hager Jr.
    xmp:dc.creator.1 => A. F.
    xmp:dc.title => Japanese Prisoner of War on Okinawa
    xmp:dc.subject.0 => Japanese Prisoner of War
    xmp:dc.subject.1 => Yaka
    xmp:dc.subject.2 => Yaka-Dake
    xmp:dc.subject.3 => Okinawa
    xmp:dc.rights => Caption ?2007 MFA Productions LLC
    Image in the Public Domain
    xmp:photoshop.CaptionWriter => Jason McDonald
    xmp:photoshop.Headline => Japanese Prisoner of War on Okinawa
    xmp:photoshop.Country => Japan
    xmp:photoshop.ColorMode => 1
    xmp:photoshop.ICCProfile => Grayscale - Gamma 2.2
    xmp:photoshop.DateCreated => 1945-06-21
    xmp:photoshop.AuthorsPosition => United States Marine Corps
    xmp:photoshop.City => Yaka-Dake
    xmp:photoshop.State => Okinawa
    xmp:photoshop.Credit => National Archives
    xmp:photoshop.History =>
    xmp:tiff.Orientation => 1
    xmp:tiff.XResolution => 3000000/10000
    xmp:tiff.YResolution => 3000000/10000
    xmp:tiff.ResolutionUnit => 2
    xmp:tiff.NativeDigest => 256,257,258,259,262,274,277,284,530,531,282,283,296,301,318,319,529,532,306,270,271,272,305,315,33432;911226DF4A0383478C6079A24E65022A
    xmp:exif.PixelXDimension => 2341
    xmp:exif.PixelYDimension => 2932
    xmp:exif.ColorSpace => -1
    xmp:exif.NativeDigest => 36864,40960,40961,37121,37122,40962,40963,37510,40964,36867,36868,33434,33437,34850,34852,34855,34856,37377,37378,37379,37380,37381,37382,37383,37384,37385,37386,37396,41483,41484,41486,41487,41488,41492,41493,41495,41728,41729,41730,41985,41986,41987,41988,41989,41990,41991,41992,41993,41994,41995,41996,42016,0,2,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,20,22,23,24,25,26,27,28,30;3D9C334D4F719219287F1940B0490E09
    xmp:xapRights.Marked => False
    xmp:Iptc4xmpCore.Location => Prisoner of War Camp
    xmp:Iptc4xmpCore.Scene => Portrait
    Plugin Author David Lingren

    (@dglingren)

    Thanks for your update with the additional information. Thanks as well for your donation in support of the plugin; much appreciated.

    You wrote “However when I use the shortcode  [mla_gallery] manually to create a post, nothing at all shows up.” By default, the shortcode only displays images “attached” to the current post/page (the “parent” of the attached items). You can set the parent manually on the Edit Media page for an item. Give that a try and see the results.

    You wrote “I’m using another plugin to automatically make a post for each image (unless MLA can do that?) when it is uploaded.” It looks like that plugin is not attaching the image to the post it creates. If you tell me the specific plugin you are using I can investigate further.

    You might be able to use the media page that WordPress creates for an image. Go to the Edit Media page for an image and click on the Permalink just below the image title. The default Permalink is rather ugly; you can go to the Settings/Permalinks admin page to set the Permalink structure to something better, e.g., Post name.

    You wrote ”?I’m not sure how to format the template.” There are two templates for a gallery. The style template allows you to customize the CSS styles applied to gallery elements. The markup template allows you to customize the actual HTML markup for each element of the gallery. Here is an earlier topic with an example (for PDF items, but the idea is the same):

    Pdfs in table with thumbnail, title, description, tags and Button to download | www.ads-software.com

    That topic has links to other examples. Of course, the “A Table-based Style and Markup Template Example” section of the Settings/Media Library Assistant Documentation tab is a great place to start. The style and markup there are fine, but the instructions on creating the templates is outdated (I’ll fix that). Follow the steps in the earlier support topics to create your template(s).

    Thread Starter scotisle

    (@scotisle)

    Thanks. Apologies for the delay in replying. My Dad has some health issues and I had to prioritize that.
    I have IPTC mapped and appearing in the Media Library, so the import is working. Exporting the metadata from the sample image helped me figure out how to make custom fields.

    I created a child theme (from Hitchcock) and I’m trying to edit the attachment.php to get the custom IPTC fields to appear there, as you suggested. I’m not great with PHP programming, but I can’t seem to get anything. The default code copied from Hitchcock’s singular.php either gives the image + caption without formatting, or formatting + caption without an image.

    I found this code; I put in the sample style template and markup template from the documentation and made it the default, just to see if it would work, but nothing shows up. Just a blank page. I’m sure I’m doing something wrong, and I’ve spent a couple of days trying to figure it out before posting, but I’m not good enough to figure it out.

    Thanks
    Jason

    <?php 
    get_header();echo do_shortcode('[mla_gallery]'); 
    ?>
    

    Plugin Author David Lingren

    (@dglingren)

    Thanks for your update with the details of your progress and the code snippet; very helpful.

    You mentioned “Hitchcock”, which I assume refers to the theme you are using; is that right? If so, is this the theme?

    Hitchcock – WordPress theme | www.ads-software.com

    By default, the [mla_gallery] shortcode only shows items “attached” to the current post/page. WordPress doesn’t attach the item to its Media Page, so the shortcode displays nothing. This is easily fixed; try something like this:

    <?php echo do_shortcode( sprintf( '[mla_gallery ids=%1$d]', $post->ID ) ); ?>

    The $post->ID argument uses the $post global variable, which should be set properly. If not, you can use a WordPress function like the_ID() to get the value you need.

    Let me know if that gives you the results you seek. If you confirm which theme you’re using I can have a look at it as needed. Thanks.

    Thread Starter scotisle

    (@scotisle)

    Thanks! Yes that’s the theme – Hitchcock – WordPress theme | www.ads-software.com

    I’m trying the code now.

    Thread Starter scotisle

    (@scotisle)

    I got it to mostly work! Thanks so much. Images are here with the current results.

    Some more questions; hopefully you don’t mind. I’m not great with this. This is really good software but I’m a History teacher, not an engineer.

    1.) The caption for some images is longer than the field allows. Is it possible to increase the field’s length to have more text in the entry?

    2.) “Date Photo Taken” is in the format 19451212. Is there a way to convert it to December 12, 1945? I don’t see a date field option.

    3.) The images have all the fields listed, but I’m not sure how to find the creation date of the image and post that? It’s blank no matter what I do.

    4.) “District” is blank in the Japanese POW photo. Is there a way to force empty fields to not display?

    5.) The “Keywords” are not active. Is there a way to make each one a live link?

    Thanks
    Jason

    Plugin Author David Lingren

    (@dglingren)

    Thanks for this update with the good news on your progress. The two screen shots you shared are looking very good.

    There are good answers to your five questions, but this thread is getting long and it would be easier to work out the details by email. I can post a summary here when we’re done. Please contact me at my web site and send your shortcodes and templates so I can investigate further. Thanks!

    Plugin Author David Lingren

    (@dglingren)

    Thanks for working with me by email to resolve your final questions.

    I am marking this topic resolved, but please let me know if you have any problems or further questions.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Adobe Photoshop and MLA’ is closed to new replies.