WordPress.org

Ready to get started?Download WordPress

Forums

Media Library Assistant
[resolved] Text and EXIF to title? (5 posts)

  1. Seppelicous
    Member
    Posted 12 months ago #

    Hi,
    I am loking for a way to create a text like
    "Taken with Nikon d800 with ISO xyz and 1/200 ..."

    Is it possible to set this text as "EXIF Value"?

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

  2. David Lingren
    Member
    Plugin Author

    Posted 12 months ago #

    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.

  3. Seppelicous
    Member
    Posted 11 months ago #

    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.

  4. David Lingren
    Member
    Plugin Author

    Posted 11 months ago #

    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.

  5. David Lingren
    Member
    Plugin Author

    Posted 6 months ago #

    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.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.