• Hello.

    First of all I believe this is great tool, and I would like to make it work on my site. Actually this is 2nd or 3rd time that I am going back to this plugin. I found it several months ago, and I am still on beginning. I think it has big potential I would like to use it on my site very much.

    What I need?
    I am trying to move my site (image gallery with about 20.000 high res images) to WordPress CMS and I need some tool to display as many as I can get relevant informations about image on post page. I wish to make something like this:

    Every post will have only one image, and nothing else in its content box. I wish to pull all other info from post custom fields and MLA custom fields. I need tool to display image info: dimensions, size, image url, exif/itpc image data…

    I wish to use theme’s files to display that info. But I do not know how to do that?
    For example how to display value of some MLA custom field from single.php file, if it is possible?

    Also if it is possible to create post custom field from MLA custom field that would be great? In that case I can call some custom field value on post page wherever I wish using standard wp/php functions?

    In WordPress –> Settings –> Media Library Assistant –> Custom Fields
    I created multiple new mapping rules, and I can see them on media –> Media Library Assistant. But how to display some of that values on post page with image on it?

    If you have any suggestion, tip or question do not hesitate to ask.
    Best regards.

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

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

    (@dglingren)

    Thanks for the good words and for your question. I can give you more specific help when I return home on May 17, but in the interim you can look at the custom markup template “table based example” in the Documentation tab. There are also some earlier support topics along the lines you want and I will research those and give you a link to them when I’m back home. Thanks for your patience.

    Thread Starter Advanced SEO

    (@jole5)

    Thank you very much for your reply.

    I believed that this is great plugin and that is why I am thinking about it alot in last few months, that is why I am coming back to it again, and again. Nothing is even close enough to your plugin. I believe it is powerful enough to practically power my site, or to be its heart at least.

    I hope I was clear enough about what I wish to achieve, if you have any question or suggestion please do not hesitate to ask. I can provide you link to my site, it is currently on another CMS, so you can check what I wish to achieve.

    Also If you wish we can continue using e-mail if you are willing to assist. I hope we will manage to make this work and I assure you that your contribution and work, as well as your plugin, will not go unnoticed and unrewarded.

    I will expecting your reply.

    Plugin Author David Lingren

    (@dglingren)

    Thank you for your patience while I completed my travels. Now I have time to go back over your earlier posts and give you more detailed assistance.

    First, let me comment on your statement: “I wish to pull all other info from post custom fields and MLA custom fields.” The Settings/Media Library Assistant/Custom Fields tab lets you define rules that take information from many sources and copy the information into WordPress custom fields. There is no separate “MLA custom fields”; MLA uses the custom field features already built in to WordPress.

    Custom fields are useful because they are part of the SQL database structures in WordPress. You can display them in the Media/Assistant submenu table, sort on them and use them to filter your [mla_gallery] displays. You can also use the many functions built into WordPress to access and edit them, as you already know.

    You have described your goal as follows:

    Every post will have only one image, and nothing else in its content box. I wish to pull all other info from post custom fields and MLA custom fields. I need tool to display image info: dimensions, size, image url, exif/itpc image data…

    I wish to use theme’s files to display that info. But I do not know how to do that? For example how to display value of some MLA custom field from single.php file, if it is possible?

    It is certainly possible to add custom PHP template files to your theme to display an image and information about the image, but that approach is fairly complicated and requires programming skills. The [mla_gallery] shortcode and the MLA Gallery custom style and markup templates are designed to give you a simpler way to achieve the same results. You don’t say how you will specify “only one image” for your post, but you can use the ids= parameter to create a single-image “gallery”, e.g. [mla_gallery ids=123]. There are may other ways to select the image you want from the Media Library, and I can give you more specific help if you need it. Your post content could be just the shortcode; no other content.

    To add the information you want, I suggested something like the “Table-based Style and Markup Template Example” found in the Settings/Media Library Assistant tab. Here is the “Item” part of the template used in that example:

    <td class='gallery-icon'>
         [+link+]
     </td>
     <td class='wp-caption-text gallery-caption'>
         <strong>[+title+]</strong><br />
         [+description+]<br />
         [+date+]
         [+custom:client,single+]
         [+terms:category+]
         [+iptc:caption-or-abstract+]
         [+iptc:2#025,single+]
         [+exif:Artist+] </td>

    In this example, the [+link+] substitution parameter in the first table cell will be replaced by the image thumbnail and link. You can control the size of the image and the destination of the link by adding parameters to your shortcode. The second table cell contains several bits of information about the image, drawn from the “Attachment-specific substitution parameters for the markup template Item part” as well as IPTC, EXIF and custom fields assigned to the image. As this example shows, you can get most of the information you want by adding substitution parameters to your MLA Gallery template, without the need to create custom fields for the information ahead of time.

    Going back to your stated goal, I think you could use a custom markup template that looks something like this:

    Open part:
    <table id='[+selector+]' class='gallery galleryid-[+id+] gallery-columns-[+columns+] gallery-size-[+size_class+]'>

    Row Open part: (leave this empty)

    Item part:

    <tr class='gallery-row'>
      <td class='gallery-icon'>
        [+link+]
      </td>
    </tr>
    <tr class='gallery-row'>
      <td class='wp-caption-text gallery-caption'>
         <strong>[+title+]</strong><br />
         Width: [+width+], Height: [+height+]<br />
         File size: [+custom:File Size+]<br />
         URL: [+file_url+]<br />
         IPTC Caption: [+iptc:caption-or-abstract+]<br />
         IPTC Keyword: [+iptc:2#025,single+]<br />
         EXIF Artist: [+exif:Artist+]
      </td>
    </tr>

    Row Close part: (leave this empty)

    Close part:
    </table>

    That will give you a table with two rows, one for the image and one for the information. The “File Size” entry assumes you have created a custom field to hold the file size for each image. To use this template in a post, enter your shortcode as something like this:

    [mla_gallery ids=123 columns=1 size=full link=file mla_markup=table]

    For your reference, here is a recent topic with more details on how to create custom fields and custom markup templates:

    Replace MIME-type Icons in [mla_library] with Images

    I hope that gives you the information you need to create the posts and information you want without requiring you to add PHP code to your theme. I am marking this topic resolved, but please update it if you have problems with this approach or more questions about it. I will give you whatever help I can to get the results you want.

    Thread Starter Advanced SEO

    (@jole5)

    Hello.

    Thank you for you reply, I appreciate it.
    I am thinking to make site which will allow user image uploads, in future. In best scenario user will create new post and upload only one image in it, and that will be whole content. Of course I will provide option via custom fields for user to enter description, author, keywords…

    In that case it would be practically impossible for user to know what kind of shortcode to enter in post content.
    And for me also it would be easier if I could manage to create custom field rules to apply on image and extract info during upload to post, so I can use it later to display that info on page where I wish.

    I will need to call some image info just in source code of page, and even outside of WordPress loop, for example:

    <div about="http://www.mysite.com/folder/image-file.jpg" xmlns:dct="http://purl.org/dc/terms/">

    Also, I will need some image info in og tags and other meta tags in head section of page, as well as in html source code for rich snippets and structured data like microdata, microformats, RDFa…

    “It is certainly possible to add custom PHP template files to your theme to display an image and information about the image, but that approach is fairly complicated and requires programming skills.”

    Could you help me with this, that is above my PHP knowledge level? Of course we can arrange some reasonable price for all job, or just for making one template? If I could make rest of php code based on that template code. Your help/job would be crucial in making decision to switch to WordPress and make site using your plugin.

    If you have any other question or suggestion do not hesitate to tell.

    I will waiting for your response.
    Best regards.

    Plugin Author David Lingren

    (@dglingren)

    Thank you for taking the time to post a follow up message with more information about your application.

    In the /media-library-assistant/examples/twentytwelve-mla directory you can find several examples for using the [mla_gallery] shortcode and other MLA features from PHP templates. You can find more information about creating meta tags such as Facebook “og” tags in this earlier support topic:

    Pull Featured Image from MLA Gallery

    Thanks you as well for your generous offer to compensate me for working on your application. Based on your comment “making decision to switch to WordPress and make site” it sounds like you are new to WordPress and have quite a bit of work ahead of you. I regret that I do not have the time to devote to custom development of the kind you will need. If you can find another developer to work with I am happy to answer MLA-specific questions at any time.

    Thank you again for your kind words, your questions and for your interest in the plugin. I am marking this topic resolved, but please update it or start a new topic if you have additional questions regarding the use of MLA in template development.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to display MLA custom field value on post page?’ is closed to new replies.