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

    (@dglingren)

    This is a great question and it’s an area of the plugin I’m working on now.

    The current version of MLA supports mapping individual IPTC/EXIF fields to standard fields like the Title, to taxonomy terms and to custom fields. Right now, there is no way to compose a value drawing information from multiple metadata fields and assign it to the Title or other fields. I’m working on that for a future version.

    However, you can do something like this for display purposes. You can use the mla_caption parameter or define a custom markup template and use the [mla_gallery] shortcode to display any of the information available in your images. The “Table-based Template Example” in the “Other Notes” section of the plugin listing or the Documentation tab on the plugin Settings page gives an example of this.

    You can quickly see the data available in your images by coding something like:

    [mla_gallery ids=272 mla_caption="{+exif:ALL_IPTC+}" columns=1]
    [mla_gallery ids=272 mla_caption="{+exif:ALL_EXIF+}" columns=1]

    The ALL_IPTC and ALL_EXIF pseudo values will dump all of the information in the image so you can see what’s in there. In this example, ids=272 is a quick way to select a specific attachment for the gallery; you can use any data selection parameters that you like.

    I know that’s only a partial answer, but if it works for you and you need more help with it, let me know. I’m going to leave this issue unresolved and I will post an update when I have a new version with a more complete approach to this requirement.

    Thanks for your interest and for this question/suggestion.

    Thread Starter Seppelicous

    (@seppelicous)

    Thank you David!! That sounds awesome!
    Your plugin is really powerful, its the swiss army knife for wordpress media!

    Before I can try it, can you please tell me, how I link the thumbs to the files? I am using fancy box (lightbox) to show the images.

    Plugin Author David Lingren

    (@dglingren)

    Well, I must confess I could not get Fancy Box to work on my test system. I tried both the WordPress plugin (v1.0.7) and the native version (v2.1.4) and neither one would run without JavaScript errors.

    However, if you can get it to work then here is an approach I think you can use. You can define a custom markup template (call it “fancybox”), copy the default template parts into it and then change the “Item:” part to something like:

    <[+itemtag+] class='gallery-item'>
    	<[+icontag+] class='gallery-icon'>
    		<a title="[+title+]" class="fancybox" href="[+link_url+]"><img width="[+thumbnail_width+]" height="[+thumbnail_height+]" class="attachment-thumbnail" alt="[+title+]" src="[+thumbnail_url+]" /></a>
    	</[+icontag+]>
    	<[+captiontag+] class='wp-caption-text gallery-caption'>
    		[+caption+]
    	</[+captiontag+]>
    </[+itemtag+]>

    The only change is to replace the default template line that has [+link+] with a line that breaks the value down into all its component parts:

    <a title="[+title+]" class="fancybox" href="[+link_url+]"><img width="[+thumbnail_width+]" height="[+thumbnail_height+]" class="attachment-thumbnail" alt="[+title+]" src="[+thumbnail_url+]" /></a>

    I’ve added the class="fancybox" attribute to the link, which should be all that’s required to activate the fancy box when you click on a gallery item. Once the template is defined, you can code an [mla_gallery] shortcode in your post/page along these lines:

    [mla_gallery ids="293,264,265,351" link=file mla_markup=fancybox]

    Replace the ids="293,264,265,351" parameter with whatever you need to select the images you want in your gallery. You might also find some helpful tips in this recent support topic:

    single image short code

    I hope that gives you enough information to get started, and that Fancy Box works for you. If you have problems or further questions, let me know.

    Plugin Author David Lingren

    (@dglingren)

    I have released version 1.50, which adds “Content Templates” to MLA.
    Content Templates let you compose a value from multiple substitution parameters, combine text and data values, test for empty values and choose among two or more alternatives or suppress output entirely.

    Please let me know if you have any problems with or further questions about this new feature. Thanks again for your interest and for your suggestion.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Text and EXIF to title?’ is closed to new replies.