• Resolved ex19

    (@ex19)


    I am using this code [mla_gallery columns=1 post_mime_type=application/pdf post_parent=all size=thubmnail link=file mla_caption=”{+description}{+credit+} {+title+}”]

    I also have attachemnt meta with mmmw plugin that says things like this
    ‘credit’ => ‘Mr Author’,
    ‘caption’ => ‘stuff ‘,
    ‘title’ => ‘stuff for the title’,

    The description actually populates the media description field, but the other ones are in a field call attachment_meta.

    1. is there anyway to pull that into mla
    2. is there anyway to pull from a specific folder only (filter) or filenames that contain “1996” or a tag or something else.

    Can you please give me a link to the area of documentation that refers to any of these. The docs are overwhelming for me to sort through. I’m just looking to display things that are pdf metadata for specific files on a page. I wish I could just get a folder listing with the info present next to each item on the list.

    Thank you for your help, the plugin helps alot.

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

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

    (@dglingren)

    Thanks for your kind words and for your questions. I know it can be hard to find the right part of the MLA documentation to answer a question.

    First, you wrote about “attachemnt meta with mmmw plugin “. I believe the three examples you gave are actually generated by WordPress itself as images are added to the Media Library.

    You can access any of the values in the Attachment Metadata, and the specifics are in the “Field-level Substitution Parameters” section of the Documentation tab. Here is the information for the “meta” prefix value:

    WordPress attachment metadata, if any, embedded in the image/audio/video file. For this category, you can code any of the field names embedded in the _wp_attachment_metadata array. The “Attachment Metadata” display in the Media/Edit Media screen will show you the names and values of these fields. Note that the fields available differ among image, audio and video attachments.

    The “image_meta” portion of the attachment metadata is of particular interest. This array contains some “extended image metadata” drawn from IPTC and EXIF fields by WordPress and improved a bit. You can find more information in the Codex Function Reference/wp read image metadata. For example, to get the ISO speed rating for an image, code [+meta:image_meta.iso+].

    For your examples, the values are [+meta:image_meta.credit+], [+meta:image_meta.caption+] and [+meta:image_meta.title+]. You can use these substitution parameters in an [mla_gallery] shortcode or a mapping rule. If you had another meaning for “is there anyway to pull that into mla” let me know how you want to use the values and I can give you more help.

    You can use the “pdf” prefix to extract metadata from PDF documents in the same way. Have a look at the “Field-level metadata in PDF documents” section of the Documentation.

    I am not quite sure what you mean by “pull from a specific folder only” and “get a folder listing“. WordPress stores all of the interesting information about Media Library items in database tables; the file system folders and file names are not useful in most applications, although the item Title is sometimes taken from the file name.

    There are many ways to filter items for a given gallery display, including taxonomy terms and custom field values. MLA can map metadata into taxonomies and custom fields to make them available for filtering and sorting. Here is a link to an earlier topic with more details and examples of PDF listing techniques:

    List items

    I hope that gets you started on working with substitution parameters, prefix values and metadata. If you can give me more details on your application I can give you more specific guidance. Thanks for your interest in the plugin.

    Thread Starter ex19

    (@ex19)

    I have to take it a step at a time because it’s complicated. But the metadata does not auto populate when i load files unless I used the mmmw plugin and click on “reload metadata” and even then it would take hours.

    Otherwise it only show the filename.

    There is a “map mla” but it doesn’t seem to do anything when i click it, and I would have to click it for 3000 files. Is there a shortcut to get all files to auto load the data? Ideally I would put them by ftp into the directory and do this one time. Otherwise it would be a huge nightmare.

    I will take a look at your other answers after I figure out that part i guess because in the absence of that populating I’m sort of screwed. πŸ™‚

    Thread Starter ex19

    (@ex19)

    after working on this a bit, I have figured out how to get a list, and how to show the items needed, but i can not get the “caption” out of the underlying code and display it.

    ie

    this file name:description(linked)

    [mla_gallery columns=1 post_mime_type=application/pdf post_parent=all size=thumbmnail link=file mla_caption=”{+description+}{+credit+} {+title+}” ]

    it shows
    thumnail, linked with alt/caption

    I want name of file linked with description or beside the first section.

    Any way to do this using shortcode?

    Thread Starter ex19

    (@ex19)

    oops, got this, it was a theme issue. Thank you!

    Plugin Author David Lingren

    (@dglingren)

    Thanks for your updates and all the effort you are putting into this project. You wrote:

    I have to take it a step at a time because it’s complicated. But the metadata does not auto populate when i load files unless I used the mmmw plugin and click on “reload metadata” and even then it would take hours.

    Otherwise it only show the filename.

    There is a “map mla” but it doesn’t seem to do anything when i click it, and I would have to click it for 3000 files. Is there a shortcut to get all files to auto load the data? Ideally I would put them by ftp into the directory and do this one time. Otherwise it would be a huge nightmare.

    I am confident that MLA can perform the metadata mapping you need without requiring you to use the MMWW (Media Metadata Workflow Wizard) plugin. If you can post a link to some of your images and tell me the source and destination for your mapping rules I can give you more specific guidance.

    Although MLA can add values to the Attachment Metadata array you might find that taxonomies or custom fields are a better destination for many applications. They can be used for sorting and filtering, which is not possibly with values embedded in the Attachment Metadata array.

    You wrote “Ideally I would put them by ftp into the directory and do this one time.” It would be much better to use the WordPress Media/Add New admin screen. There is a lot of WordPress processing that would not be done with an FTP transfer.

    When I started using WordPress it took me a while to figure out the “WordPress way” of doing things, but I can tell you it is worth the effort. If you are trying to systematically load 3000 images it is a good idea to work things out with a small number of them before undertaking a mass upload.

    Thread Starter ex19

    (@ex19)

    ok, so I used some code from another post that worked out really well to give me a search.

    I got it that your plugin will help me easily populate what I need without needing others. =I understand things a bit better now.

    What I am stuck on is the folders where documents reside.
    I already have the files on the server.
    I have tried a bunch of things to get this to happen and yours is the best one *if* I can get a heirarchy to do it.

    so on the server I have folders, 1980, with 12 subfolders in it for jan, feb, march, etc. I have years of this heirarchy. I can easily move them to wordpress and make them show up there.
    But… I need a navigation without having to create a bunch of pages.
    I can tag them, or categorize them but I need a navigation.

    How can I get one using your system. I tried mla_tagcloud and mla_tag_cloud and nothing happens, it does not work, as if it is not turned on.

    You mentioned filtering – is there a shortcode so that I could have the tags or categories or customfields show up in a list? or even better I wish I could get a page query string such as http://www.domain.org/?=mla_gallery-2004docs-march because then I could feed it into an existing search mechanism.

    Thread Starter ex19

    (@ex19)

    ok I am reading this one now … working on it.

    Thread Starter ex19

    (@ex19)

    So I have found the right code to indeed do exactly what I need, however as I mentioned before now I need to either upload all the files into wp, or do a batch processing task. I know that I can map to custom fields using upload, ideally I want them in categories which would work best as i have the code written now, although i guess i could change my code a little to instead of options being attachment-category it was customfields.

    I’m not worried about those things. What I am wondering is what is the best way to scan and batch them all in. there are hundreds of them sorted in folders and I’d like to leave it that way. I could move those folders under wp-content/uploads or is there a way to set a base directory for MLA only and still have wp process all other images in /uploads? I was seeing this under the tab IPTC/EXIF
    If this would be too much processing, I test another plugin that did some of the work and then I was thinking I could move fields in mysql after it finished. What would you recommend. and again, thanks for all your help!

    Thread Starter ex19

    (@ex19)

    For the sake of prosperity, if anyone is looking for a way to do this.
    1. use media from ftp plugin that will get all them scanned into wordpress in bulk.
    2. figured out my data is xmp, mapped it fine.

    Another issue though with form search:
    this type of search form picks up both june and december because they are using if has june .or. if has 1980, I guess.
    Is there a way to be more restrictive on this?

    http://domain.com/mlagallery/?attachment_category=1980&tag2=june&submit=GO


    <form id=”attachment-tag-form” method=”get” action=””>
    <select name=”attachment_category” class=”postform”>
    <option value=””>– Select a Value –</option>
    <option value=”1980″>1980</option>
    <option value=”1981″>1981</option>
    </select>
    <select name=”tag2″ class=”postform”>
    <option value=””>– Select a Value –</option>
    <option value=”jun”>june</option>
    <option value=”jul”>july</option>
    </select>
    <input type=”submit” id=”submit” name=”submit” value=”GO”>
    </form>

    [mla_gallery columns=1 post_mime_type=application/pdf post_parent=all mla_link_text=”{+title+}” link=file mla_caption=”{+description+}{+credit+} {+title+}” size=thumbmnail attachment_category=”{+request:attachment_category+}” post_per_page=9]`

    Thank you

    Thread Starter ex19

    (@ex19)

    this type of string picks up june and dec. is there any way to change it so that it only picks up category 1944 .and. june-

    it should only give me 10 items but it gives me 20 (all things in 1944).

    /mlagallery/?attachment_category=1944&tag2=june&submit=GO

    And by the way the plugin for scanning bulk files in is called “media from ftp”

    Thank you!

    Thread Starter ex19

    (@ex19)

    RESOLVED. USING THIS POST

    fabulous! thank you!!!

    Plugin Author David Lingren

    (@dglingren)

    Thank you so much for all of the research and work you put in to create your Media library and gallery display application. Thanks especially for documenting your adventures here so others can benefit from them. The Media from FTP plugin is a good alternative for the WordPress Media/Add New admin screen in an application like yours.

    I am marking this topic resolved, but please update it if you have anything further to ask or say about the topic. Thanks again for your good work and for your interest in the plugin.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘filter and using attachment meta’ is closed to new replies.