WordPress.org

Ready to get started?Download WordPress

Forums

Media Library Assistant
[resolved] how to show not attached images with mla_gallery? (8 posts)

  1. bhenselmann
    Member
    Posted 1 year ago #

    Hi David,

    I just playing around with your mla-plugin - seems to be really great! Thanks!

    I have two questions:

    mla is ignoring the "ids" parameter in the mla-gallery shortcode. "ids" is a relatively new WP gallery parameter, to show attachement, even if they are not attached to a post/page.
    Is it possible to include it in mla as well?

    In the "visuell" edit mode of post/page an author could include images in to a gallery with a wysiwyg-feeling and it´s easy to add a picture or remove it from the gallery or to sort the gallery.
    Is it possible to realize this with mla as well?

    Thanks a lot
    Bernhard

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

  2. David Lingren
    Member
    Plugin Author

    Posted 1 year ago #

    Thanks for your interest, for the kind words and for your question.

    [mla_gallery] supports the "ids" parameter, but the default behavior restricts display to those items attached to the post/page; that's what the WordPress [gallery] shortcode does. You can code post_parent=all to display anything in the Media Library, as explained in the documentation:

    For WordPress 3.5 and later, the "ids" parameter lets you specify a list of Post IDs. The attachment(s) matching the "ids" values will be displayed in the order specified by the list.

    You can use the "post_parent" to override the default behavior. If you set "post_parent" to a specific post ID, only the items attached to that post are displayed. If you set "post_parent" to "current", only the items attached to the current post are displayed. If you set "post_parent" to "all", the query will not have a post ID or post_parent parameter.

    I am working on adding MLA support to the WordPress 3.5 "Add Media" popup dialog, responding to these topics:

    Filter media when adding to post/page
    Clarifications needed
    Feature Request: Add Media Dialog: Search by Att. Category"
    Thank you and question about possible future feature

    What I plan to do is add a new tab to the WordPress (3.5) "Insert Media" popup dialog with all of the filtering options up see on the Media/Assistant screen (mime types, date ranges, categories/tags, enhanced search box, author). It's the right thing to do, but it's a significant piece of work; 3.5 is a big change adding the Backbone and Underscore JavaScript libraries and several thousand lines of new code to understand. I hope to add that to version 1.2.

    Your suggestion to also support the "visual" edit mode is a good one, and I will consider it for a future release. It's one element of a user interface that would support all of the [mla_gallery] parameters. That's a larger effort but a worthy goal.

    Thanks your question, the suggestion, your patience and for using the plugin.

  3. bhenselmann
    Member
    Posted 1 year ago #

    wow - great!
    Thank YOU!
    Bernhard

  4. Alexander S. Kunz
    Member
    Posted 1 year ago #

    I know this topic has been set to resolved, but I believe the "ids" parameter in WP 3.5+ is NOT restricted to only those media items that are attached to the post/page, see http://codex.wordpress.org/Gallery_Shortcode - quote: "Specifying IDs in your shortcode allows you to include images in your gallery that aren't necessarily 'attached' to your post [...]."

    While switching some standard [gallery] shortcode (that uses a list of items with ids="1,2,3", of items not attached to the post) to [mla_gallery], I ended up with empty galleries when using MLA, while the normal gallery shortcode produced the desired result.

    I believe "post_parent=all" should be the default to reflect the WP 3.5 behaviour when using "ids" lists.

  5. David Lingren
    Member
    Plugin Author

    Posted 1 year ago #

    You are absolutely right - [gallery] queries that use the "ids" parameter (or the "include" parameter, it turns out) do not add a post_parent restriction to their queries. I did my development before the Codex was updated, and I didn't read the souce code carefully enough. I just re-read the source and verified your claim. I also found a late addition to the 3.5 release that defeats the explicit ordering of posts specified in the "ids" list when an orderby parameter is present.

    I have corrected both of these defects for my next version. Thank you for calling my attention to them.

  6. Alexander S. Kunz
    Member
    Posted 1 year ago #

    Thank you David for being such a responsive plugin author, it's highly appreciated.

    And yes, one of the beautiful things is that it's possible to sort the gallery "chaotically" with drag & drop rearrangement in the gallery/media editing window.

  7. David Lingren
    Member
    Plugin Author

    Posted 1 year ago #

    I have released version 1.14, which corrects the ids/include post_parent restriction and the orderby with ids issue. Thanks again for bring these issues to my attention.

  8. David Lingren
    Member
    Plugin Author

    Posted 1 year ago #

    I have released MLA version 1.20, which includes Media Manager support for filtering the library by date, taxonomy term and additional MIME types. It also includes an enhanced search box that matches the box in the Media/Assistant submenu. The enhancements are available for the Add Media, Create Gallery, Add to Gallery and Set Featured Item functions in the Media Manager.

    Thanks for your interest and your patience. If you have any problems with or questions about the new release, let me know.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.