• Resolved Ellsinore

    (@ellsinore)


    Hi, David — I added the below to the other post, but it didn’t “unresolve” it, so I’m putting it here. Hope I’m not messing things up!

    ———————————————————————————-

    Hi, David!

    I have a couple more questions:

    (1) Now that I’m using the correct “template” code (thanks!!) I can’t figure out how to get the parentheses to print. For the file size, I want it enclosed to set it apart: (163.757 KB). I’ve tried escaping a second set of parens, but that’s about it.

    (2) I’m getting the expected “404” error when trying to use the tags as links. They show up fine as tags, the links just don’t work. I found your previous post links about the WP limitations on Media stuff, and will be grinding through that soon enough.

    These I don’t know if you can help me with, but maybe you’ve come across them before:

    I’m using these entries for mapping:

    Category: template:([+pdf:Categories,array+]|[+exif:Keywords,array+])
    Tags: template:([+pdf:Keywords,array+]|[+exif:Artist,array+])

    and Priority: EXIF, Existing Text: Replace

    (2) In an attempt to make the process completely automated, I’m trying to process the keywords as tags on import. I *did* find the information to do this for both JPGES and PDFs (yay!).

    For the images, by default the tags are separated with semicolons (;). When I leave it this way, it doesn’t separate the array, the tag is imported as “Postcard;Private” literally. If I separate them with commas, they aren’t imported at all. Perhaps a limitation of using Windows Explorer to edit the metadata?

    (3) Since I didn’t have enough fields in the standard PDF metadata, I got tricky and created a custom field in the PDF: Categories. Unfortunately, not only doesn’t this get exported, it prevents the “Keywords” from being exported as well — pretty much messing up everything I’ve accomplished so far. 🙂

    Since it’s still early, and I’m working from just a few PDFs and JPEGs to edit the metadata and testing it, it’s a small matter to switch gears at this point.

    Perhaps just using tags or just using categories is the way to go? Any suggestions would be appreciated.

    Thanks!

    Kris

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

    (@dglingren)

    Thanks for the updates on your progress and for this new topic.

    You wrote “I can’t figure out how to get the parentheses to print.” Because of the way WordPress processes shortcode parameters you must use two backslash characters to escape parentheses. For example:

    
    [mla_gallery mla_caption="{+template:{+exif:ALL_EXIF+}<br /><br />{+title+}<br /><br />{+description+} (Tags: {+exif:Keywords+}) \\({+file_size,kbmb(m)+}\\)+}"]
    

    You wrote “I’m getting the expected “404” error when trying to use the tags as links.” I am not sure what this means and whether there is a question/problem I can help you with.

    You wrote “the tags are separated with semicolons (;).” You can process tag values delimited by semicolons by filling in the “Delimiters” entry for your IPTC/EXIF mapping rule. For example, try entering both a comma and a semicolon in this field, i.e. “,;”. I tried this on a few of your images and it is working for me.

    You wrote “Since I didn’t have enough fields in the standard PDF metadata …” I am not sure what PDF authoring tool you are using. The Adobe Acrobat program allows you to enter many fields, including Subject and Keywords. I’m not sure what you mean by a “custom field” in the PDF, but if you post a link to one or more of your PDF documents I can see what metadata they contain.

    Thread Starter Ellsinore

    (@ellsinore)

    Hi, David!

    “I can’t figure out how to get the parentheses to print.”

    I tried everything I could think of, but TWO backslash characters wasn’t one of them. Of course, it’s working. Thanks!

    “I’m getting the expected “404” error when trying to use the tags as links.”

    The tags and categories are showing up as links on the attachment page, as they should. But clicking on them results in a 404 page not found error. I found the discussion about it here:

    Problem with permalinks, which I think is related, but I haven’t had a chance to follow up on that yet. Looks like this is probably the last one I need to tackle.

    “the tags are separated with semicolons (;).”

    DOH! Working now, thanks! 🙂

    “Since I didn’t have enough fields in the standard PDF metadata”

    This is working now, too, but FYI here’s the PDF:

    John Page Marriages (1801-1802)

    When you pull up the Document Properties, under the Custom tab, you can see my custom entry to add Category metadata for the import. After many failed attempted, it’s working this morning. 🙂

    Thank you for all the help!

    Kris

    Plugin Author David Lingren

    (@dglingren)

    Thanks for your update with all the good news. I enjoyed the “John Page Marriages” document and the example of a custom PDF property – I’d never tried that before! It looks like your “Category” field ended up in the XMP metadata where is it easy to access in MLA. Thanks for educating me. By the way, don’t put spaces in your Property Name – they are encoded in a strange way and not properly decoded by MLA.

    Regarding your 404 errors, I now understand more of what you meant. The topic you found is a good place to start; here are a few more:

    Problem with drop down menu

    Is it possible to combine att tags dropdown + checkboxes?

    Search shortcode

    As you can see, it’s a rich area for application innovation.

    I am marking this topic resolved. If you have problems or further questions regarding the 404 errors, open up a new topic and we’ll work on it.

    Thread Starter Ellsinore

    (@ellsinore)

    Hi, David!

    (I know you been missin’ me! :-D)

    I’ve been working feverishly to get my page in good order before I have to go out this afternoon. So, I didn’t see your above comment until I logged in, and won’t get a chance to look at those links until I get back. THANK YOU for the clue about the spaces in the property names. I haven’t had any trouble with them that I know of, so far, but no sense in poking the tiger, yes? So I’ll take care of that when I get back.

    FYI for any other old people out there: I discovered (as you probably already knew) most of my troubles were the result of operator error and trying to read itty bitty tiny letters. At one point today, a field wouldn’t work. After I copied/pasted the code into my text editor, I could see that the problem was a fancy apostrophe that wasn’t supposed to be there, fancy or not. Trying to edit that in the “EXIF/Template Value” field, I thought it was dust on my monitor. 😀

    After I could actually *read* the stuff, I made a ton of progress all by my own self! 😀

    I think I only have one more thing, which is likely addressed in the above links you provided. Just in case —

    For testing purposes, I have two links for each Media Library item on the page. The icon link goes to the attachment page and the bold title links to the file.

    As you can see for the attachment page, and as expected, the category and tag links result in the “not found” error when clicked. I did check other possible solutions that I found in the forum for this problem, but I don’t *think* they will fix this? I will check on that more when I get back, though.

    Oh — yes — my server doesn’t have the required goodies for WP to generate thumbnails. For the PDFs, I’d be happy with just a generic PDF/Document kind of image, so it doesn’t look weird if I use thumbnails for the images, the but PDFs don’t have one. I’ve removed size-icon from my page so you can see what I mean. Setting the “featured image” for the PDF John Pace Marriages did the trick, but I can’t figure out how to automatically set that on import.

    I really appreciate all the hard work that went in to your plugin. This is going to reduce the time spent messing with my sources by a HUGE percentage! While working through this project, it’s also helped me to standardize my documentation — which was the whole point in the first place. 🙂

    Thanks, David!

    Plugin Author David Lingren

    (@dglingren)

    Thanks for your update with all the progress you’ve made and for the link to your site (great site!).

    You wrote “the category and tag links result in the “not found” error when clicked.“. It looks like the Tags and Category links in your page footer are generated by PHP code in your theme’s template file for the attachment page. If that’s right the material in the topics I referenced will be only indirectly helpful.

    Each link on your page goes to the “Blog” section of the site and is looking for posts assigned to the WordPress Tag or Category term you clicked on in the attachment page. That is a somewhat different problem than the “category archive” pages discussed in the other topics.

    In general terms the solution will be to create a standard WordPress page with an [mla_gellery] in the page content (you can add pagination controls if you need them, using additional [mla_gallery] shortcodes). On the attachment page each link should go to this new page and should pass the selected tag or category as one of the link arguments. Here are a couple of topics that outline PHP template modifications:

    MLA attachment page memory leak?

    Need help creating pagination for attachment page!

    The above topics are about navigation links, not tag/category links, but the overall logic is similar. If you’d like more specific assistance it would be best to open a new topic since this issue has nothing to do with image metadata.

    I am marking this topic resolved since the remaining question deserves its own topic.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Image Metadata’ is closed to new replies.