• Resolved emma_m

    (@emma_m)


    Hi
    thank you for this powerful plugin.
    I’d like to map the iptc fields with the wp fields not on the whole content of a given field.

    Example 1 : is it possible to select only the 150 first characters of the 2#120 iptc (abstract) ?

    Example 2 : I’v got an iptc fied with two string separated by a semi colon (;), let’s say : “string 1 ; string 2”. Can I just select string 1 with the field mappings, term mappings and custom fields mappings ?

    Other things I could do in the same perspective ?

    What I’d like to be able to do :
    – as my iptc title is empty, copy just the firt part of an 2#120 in the title (before the “;” or the first 150 characters
    – if my keywords field contains 3 keywords preceded by a distinctive character +, *, or % (+kw1, *kw2, %kw3), I’d like to map just %kw3 to the term field “category”…

    Is it possible at all ?

    thanks for the help !

    best

    emma

    http://wordpress.org/plugins/media-library-assistant/

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

    (@dglingren)

    Thank you for the positive feedback and for these stimulating questions.

    I regret that there is nothing in the current MLA version that will let you perform these selective mappings. The Content Template feature makes it easy to add elements together, but there is no current way to pick elements apart as your examples require.

    After giving the matter some thought, I think the best way to satisfy these requirements is to add filters to the mapping rules along the lines of the filters already in place for the [mla_gallery] and [mla_tag_cloud] shortcodes. The filters would let you write short pieces of PHP code using the full power of PHP to process the elements in any way you want.

    I believe I can add the filters to my next release, which should happen in the next few weeks (I am in the middle of localizing the plugin to support foreign languages; a non-trivial amount of work).

    I will leave this topic unresolved until I can complete that work, and I will post an update when it’s ready. Thank you for your support, for your understanding and for your patience.

    Plugin Author David Lingren

    (@dglingren)

    I have released version 1.70, which contains all of the hooks you need to edit the IPTC values as you map them to standard fields, taxonomy terms and custom fields. Have a look at the “MLA Custom Field and IPTC/EXIF Mapping Actions and Filters (Hooks)” section in the Settings/Media Library Assistant Documentation tab. It contains an outline of the hooks I’ve added and a link to the mla-mapping-hooks-example.php.txt file; a simple stand-alone plugin you can use to hold any custom code you need.

    You can define IPTC/EXIF mapping rules for the fields and terms you want to update. Then you can use the mla_mapping_iptc_value filter to edit the IPTC value and pass it back to MLA for the mapping.

    I am marking this issue resolved, but I am happy to give you as much help as you need to accomplish your task. If you need more specific help with the code or any other aspect of the work, update this topic and let me know. Thanks for a great question and for your interest in the plugin.

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

The topic ‘IPTC & EXIF Processing Options : tests and regex’ is closed to new replies.