Shiba

Adventures in WordPress

  • — Home —
  • Dog
  • Art
  • Contact
  • WordPress Articles
    • WP Plugins
    • WP Programming
    • WP Admin Panels
    • WP Theme Design
    • WP How-To
    • WP Theme Images
You are here: Home / WordPress Plugin / Shiba Media Library / Shiba Media Library Plugin

Shiba Media Library Plugin

Tweet

by ShibaShake 303 Comments

The purpose of the Shiba Media Library Plugin is to facilitate the manipulation and grouping of images within the existing WordPress image library framework.

[Most recent Shiba Media Library updates]

December, 2015
Tested on WordPress 4.4. No changes needed.

September 13th 2015 – Release 3.9.1

  • Updated thumbnails column for WordPress 4.3.
  • Tested on WordPress 4.3.

How to Get Shiba Media Library.

When creating permalink structures, care must to taken to ensure that the new structure does not override existing post, page, category, and tag permalinks.

Key Features of the Shiba Media Library Plugin

  • Enables image tagging and allows you to group images into galleries by using their tags. Images can also to added manually using the regular media manager interface.
  • In addition to images/attachments, galleries may also contain posts and other galleries. In this way, you group not only images, but also posts, galleries, and any combination of these object types. Here are some fun things you can achieve with expanded galleries.
  • Easily search for posts, pages, galleries, and more in the expanded media manager interface, and include them directly into a gallery. The days of painfully hunting for IDs are over!
  • Freely order images, posts, and pages within a gallery.
  • Gallery objects get saved into your WordPress export files. This allows you to keep a backup of your gallery objects, as well as move them from blog to blog.
  • Expanded media manager image search that allows you to find images based on title and alt text.
  • Expanded search that allows you to find attachments and galleries based on titles, tags, and categories.
  • Show the number of posts an image containing an image in the Media >> Library screen.
  • View most-used tags for post, attachment, and gallery objects.
  • Quick Edit image attachments.
  • Adds a new drop-down menu to your existing WordPress Media Library. This menu will allow you to do bulk attachments to both attached and non-attached images.
  • Detach a set of images from their post so that they revert back to their unattached state.
Screen shot of expanded menu functions added to the Media >> Library screen by the Shiba Media Library plugin.
Shiba Media Library Plugin Menu.

The Power of Galleries and Tags

Gallery objects are stored in the regular WordPress post database. In this way, you get to leverage almost all existing functions that are available for WordPress post objects including displaying your galleries using the WordPress gallery shortcode.

Galleries created with the Shiba Media Library Plugin should also work with other plugins that support the WordPress gallery shortcode.


Masquerade_Image2

Masquerade_Image1

Masquerade_Image5


Example gallery that is rendered using the Shiba Gallery Plugin

This entire plugin operates within the current WordPress Media Library framework so any tag changes will automatically be reflected in your WordPress gallery shortcode results.

If you want to extract images with particular tags using PHP, just include the tags in your WordPress get_posts command.

$args = array(	'post_type' => 'attachment',
		'tag' => 'tag-a,tag-b,tag-c' );
$attachments = get_posts( $args );

Why Can’t I Use Tags in the Gallery Shortcode?

The Shiba Media Library addresses the media library back-end and sets up tag links in the WordPress database. I.e., there is a link in the database saying that a particular image is linked to a given tag.

For tags to work in the gallery shortcode, it must also be supported on the gallery front-end – i.e., by the plugin that renders your images. The Shiba Gallery plugin, for example, supports image tags.

However, most gallery rendering plugins do not yet support this extension because it is currently not part of the native WordPress gallery shortcode and is therefore not a standard.

How to Get Shiba Media Library.

Shiba Media Library Updates

Shiba Media Library 3.9

May 2nd 2015

  • Updated image search function (in the Media Manager interface) so that it works for attachment titles, alt text, as well as captions.
  • Tested plugin on WordPress 4.2.

Shiba Media Library 3.8.2

September 17th 2014

  • Updated the Add-Media templates and interface so that images can be properly selected and inserted.
  • Updated the media table in the Edit Gallery screen so that it renders properly in WP 4.0.
  • Updated some deprecated functions.
  • Tested plugin on WordPress 4.0.

Shiba Media Library 3.8

April 22nd 2014

  • Updated plugin directory and url paths to use standard functions instead of constants.
  • Updated the Galleries >> Options screen to use the new wordpress update settings system (add_settings_error).
  • Fixed a bug in the Media screen that occurs when expanded bulk operations are applied to an empty image set.
  • Tested plugin on WordPress 3.9.

Shiba Media Library 3.7.2

Dec 24th 2013

  • Fixed some warning messages and make sure post images show up when editing a gallery.

Shiba Media Library 3.7

Sept 26th 2013

  • Posts, pages, and supporting custom post types can now be included in galleries from within the media manager interface.
  • Expanded search for images to include title as well as alt text.
  • Show number of posts that an image is included in (i.e. included in post content). Gallery images are not counted.
  • New options page. You may now enable or disable the image quick edit, number of posts, and expanded media manager search functionalities.
  • Fixed URL too long bug.

Shiba Media Library 3.6

Jan 7th 2013

  • Updated for 3.5.
  • Plugin gallery objects now use the id list system introduced in WordPress 3.5. Use the new media manager interface to upload and attach images to gallery objects.
  • Fixed quick edit functions.
  • Updated deprecated media functions.
  • Encapsulated the plugin options page within an object class.
  • Fixed gallery and attachment tag links in tag-metabox.
  • Added an attachment_link filter so that %category% gallery-permalinks translate properly.
  • Properly redirect bulk operations and delete permanently operation in the Edit Gallery screen.

Shiba Media Library 3.4

August 20th 2012

  • Updated for WordPress 3.4.
  • Added Quick Edit functionality to images. Quick Edit capability is accessible in the Media Library and Edit Gallery screens.
  • Image ordering will now be saved in both draft and published modes.
  • Updated old javascript functions to use jQuery.

Shiba Media Library 3.3

August 31st 2011

  • Added ability to order images within Gallery objects.
  • By going into Galleries >> Options, you may now change the gallery shortcode used for viewing a Gallery object.
  • Gallery objects now have Shiba Widgets support.
  • The “Insert into Post” button should now appear on custom post types.
  • Removed image parallelization option. As outlined in Google Page Speed, new browsers now allow more than two concurrent connections per hostname. As such, the image parallelization option is no longer needed.

Shiba Media Library 3.2

February 16th, 2011

  • Updated for WordPress 3.1, RC4. Tested on WP 3.0 and WP 3.1,RC4.
  • Fixed bulk trash operation on Gallery screen.
  • Permalinks now work properly on network activation and deactivation in WordPress Multisite.
  • Columns from other plugins are now properly added in the Media Library screen.

Shiba Media Library 3.1

January 17th, 2011

  • Updated for WordPress 3.1. Tested in WP 3.0 and WP 3.1,RC2.
  • Fixed numerous bugs in the gallery query system. Gallery types should now work properly.
  • Cleaned up the plugin so that gallery objects are now always custom post types. As a result the plugin requires WP 3.0 and above. If you are using WP 2.9, then please download Shiba Media Library 3.0.

Shiba Media Library 3.0.3

November 25th, 2010

  • Fixed bulk operations in the Google Chrome browser. Shiba Media Library now has its own menu in the media screen.
  • Cleaned up the gallery tagging system so that tagged gallery images can now be properly ordered with order, orderby, numberposts, and offset arguments. This makes it much easier to enable gallery paging.

Shiba Media Library 3.0

August 13th 2010

  • Added ability to append image tags in bulk as requested by Peder.
  • Re-enabled Insert into Post button even for images that are already attached.

Shiba Media Library 2.9

  • Shiba Media Library is now updated for WordPress 3.0. It should work in 3.0 and 2.9+.
  • All your previous gallery objects should still work seamlessly in the new update.
  • Expanded image attachment and detachment functions are now better integrated into the standard WordPress Media Library interface.
  • You may set your gallery permalink structure by going into Settings >> Permalinks
  • Fixed PHP notices. Thanks to Writemcodeboy for alerting me to this issue.

Media Library Plugin 2.7

  • Added in the ability to parallelize your image links. This enables more images to be downloaded simultaneously, and improves page speed.
  • Also fixed some bugs associated with the permalink creation function. In particular, I refined the regular expression for gallery attachment images and added more rules for validating the gallery permalink structure.

Media Library Plugin 2.6

  • As requested by Keoshi, I have added in the ability to edit your entire gallery permalink structure.

Media Library Plugin 2.5

  • I just finished making some large changes to the permalink redirect code. If you are having permalink redirect issues, in particular with your feeds, then please download the latest version.

Media Library Plugin 2.4

  • Added most-used attachment and gallery tag views.
  • Permalink support and customization for gallery objects.
  • Expanded media and gallery search.
  • Plugin is cleaner and more secure.
  • Thanks to A.M. for making many of the great suggestions that went into this plugin update.

Media Library Plugin 2.3

  • Expanded gallery objects so that they may contain posts, pages, and other gallery objects; in addition to image attachments.
  • You may now assign thumbnails to galleries. This uses the Post Thumbnail system introduced in WordPress 2.9, so you will need at least version 2.9 and a gallery front-end that knows how to render posts to fully realize the power of this feature.
  • You can now navigate to gallery objects, just like you do with attachments. Gallery object pages are rendered using the gallery shortcode.
  • ** Thanks to Keoshi for making many of the great suggestions that went into this plugin update.

Media Library Plugin 2.2

  • Fixed a bug in Release 2.1 where Trash links for posts and pages no longer work properly. This is an important bug fix so please download the latest version of the plugin.

Media Library Plugin 2.1

  • Added bulk-actions, search, and date filter to the Manage Gallery screen. Now you can perform the same menu view operations on galleries as you can with posts and pages.
  • Integrated the Manage Gallery menu with the WordPress Trash system. Now you can move galleries to the trash, untrash, or delete them permanently.
  • Fixed various bugs with gallery links, trash links, as well as image tags. The gallery and tag system should now work a lot more smoothly.

Media Library Plugin 2.0

  • Allows you to tag your images. Through tagging, you can include the same image into multiple galleries.

Media Library Plugin 1.0

  • Allows you to re-attach multiple images to any post from the Media Library panel.
  • Enables bulk image detachments.
  • Works on WordPress 2.8

Related Articles

Shiba Media Library 3.7

The main addition to this release is an expansion on the media manager search interface- Posts, pages, and custom post types can now be searched for and added into galleries from the media manager interface. Image search is performed based on title as well as alt text. Shiba Media Library was tested on WordPress 3.5 and 3.6. [Full description of the Shiba Media Library] 1. Expanded Media Manager Search Below is a screen show of the expanded media manager gallery interface, showing [...]

Shiba Media Library 2.0

[Most recent Shiba Media Library description.] Add Tags to Images The true power of Media Library Plugin 2.0, comes from image tagging. It allows you to tag your WordPress images or attachments with the existing WordPress tag framework. Once tagged, you can group your images into galleries simply by specifying their tag names. In this way, you can add the same image to multiple image galleries. How to Add Tags First download your images into the WordPress Media Library. [...]

Shiba Media Library 2.9

Shiba Media Library is now updated for 3.0. It was tested on WordPress 3.0 and 2.9+. If you are using WordPress 3.0, the plugin will now use the new custom post type feature to create and manage gallery objects. In particular, you will get a new Gallery menu to view and modify gallery objects. All your previous gallery objects should still work seamlessly in the new update, but you will now have the option to set gallery status to draft, in-review, or published. [Full description of the [...]

Comments

1 2 3 Next »
  1. Jason says

    October 7, 2010 at 1:41 pm

    Hi!!!

    I thought it already had the folder setup function… so I guess we will need to wait! πŸ™‚ Looking forward to it!!!

    Jason

    Reply
  2. Shelly says

    September 28, 2010 at 1:28 pm

    Just curious – does this gallery only work for administrator-level users? I’ve tried everything I can to get this to work for an editor-level user, and I cannot. It only seems to work if I set them as an admin.

    I’ve also tried changing the “10,” (in stuff like the add_filter section for admin) to an “8” in the shiba-media-library.php file, but still no go.

    From what I can tell, you’re using current_user_can and they have either delete_posts or edit_posts capabilities (which editors have both of) but I still cannot get my editors to see the menu items to manage and add galleries.

    Reply
    • Shelly says

      September 28, 2010 at 1:37 pm

      Nevermind! I found it. In shiba_media_library.php, around line 217 (in function add_pages() ) there’s “administrator” settings for the three menu items. I changed that to “editor” and they showed up.

      Would it be possible to include this in a future release?

      Reply
      • ShibaShake says

        September 30, 2010 at 8:18 am

        Thanks for letting me know Shelly. I can definitely make those changes and include it in the next release.

        Reply
        • Shelly says

          October 1, 2010 at 5:24 am

          Actually, I was wrong. If I change it to ‘editor” then it shows the gallery options ONLY for the editor – the administrator is locked out. Which is the weirdest thing I’ve ever seen. I’ve been trying for the last two days to figure out why it’s doing that, to no avail. Usually, if you set someone to have access at Editor level, then the admin will also have access – but with this – nope. So weird.

          Reply
          • Shelly says

            October 1, 2010 at 7:15 am

            Okay, well, I found a workaround. It doesn’t *seem* to be messing with how the plugin works, so hopefully there’s no adverse effects that I should be aware pf. Anyway, basically, I replaced the add_page() function (in shiba-media-library.php) with this:

            function add_pages() {

            // Add a new submenu under Options:
            $this->add_gallery = add_media_page(‘Add Gallery’, ‘Add Gallery’, ‘editor’, ‘shiba_add_gallery’, array(&$this,’add_gallery_page’) );
            $this->add_gallery = add_media_page(‘Add Gallery’, ‘Add Gallery’, ‘administrator’, ‘shiba_add_gallery’, array(&$this,’add_gallery_page’) );
            $this->manage_gallery = add_media_page(‘Manage Gallery’, ‘Manage Gallery’, ‘editor’, ‘shiba_manage_gallery’, array(&$this,’manage_gallery_page’) );
            $this->manage_gallery = add_media_page(‘Manage Gallery’, ‘Manage Gallery’, ‘administrator’, ‘shiba_manage_gallery’, array(&$this,’manage_gallery_page’) );
            $this->media_tools = add_media_page(‘Media Tools’, ‘Media Tools’, ‘administrator’, ‘shiba_media_tools’, array(&$this,’media_tools_page’) );
            add_action(“admin_print_styles-$this->add_gallery”, array(&$this,’add_gallery_admin_styles’) );
            add_action(“admin_print_scripts-$this->add_gallery”, array(&$this,’add_gallery_admin_scripts’) );
            add_action(“load-$this->add_gallery”, array(&$this, ‘add_gallery_on_load’));
            }

            Now the code has the menus on both the editor and admin accounts, and the Media Tools is set for admin only (per your next comment)

            Hopefully that helps someone else πŸ™‚

            Now, if I could just get the captions to show up in the Gallery – man I love puzzles πŸ˜‰

          • ShibaShake says

            October 1, 2010 at 8:11 am

            Hi Shelly,
            What version of WP is your client using? It sounds like you may not have the latest version of the plugin that uses custom post types. I think that may fix the add_page issues.

      • ShibaShake says

        September 30, 2010 at 2:26 pm

        Now that I think about it some more, perhaps Media Options should be an administrator menu. It does blog wide settings which I don’t imagine an editor should have access to. What do you think?

        Reply
        • Shelly says

          October 1, 2010 at 5:26 am

          Well, I can say this: I am the web developer (I’m the one creating the theme) and I’m subbing for the actual design house. WE want admin-level access, because the client – even though they own the site, does NOT need to be mucking around in the plugin and theme files. SO we have them set as “Editor” so they can do galleries, images, uploads, write posts, add users – all that stuff that an editor can do.

          I do think you’re right though – the “Media Tools” should be reserved for Admins (I don’t see how it would be helpful to them when all they are doing is managing content) but the rest, they should have access to.

          Thanks! πŸ™‚

          Reply
  3. aziwaan says

    September 26, 2010 at 1:29 am

    Hi There,

    Im trying to use the gallery plugin but when I paste your shortcode in a post [media-library-gallery] it just renders as text.

    Any ideas what mught be causing this, im running WP locally out of the box.

    Thanks in advance

    Reply
    • ShibaShake says

      September 28, 2010 at 12:15 pm

      Hello aziwaan,
      The plugin works with the standard WP gallery shortcode, [gallery].

      Reply
  4. Rus Miller says

    September 9, 2010 at 1:09 pm

    I believe there is a small bug in shiba-media-library.php, which destroys any existing content while simultaneously preventing us from displaying gallery objects programmatically in templates by defining our own gallery shortcode, i.e., ID).'" link="file" columns="4"]')); ?>

    —————————–

    Around Line 440: $content = "[gallery]";

    I believe should be: if($content != '') $content = "[gallery]";

    —————————–

    I’m not sure if $content is empty in the default case but this works for me in my template.

    Also, this is a powerful plugin, thanks for your contribution, but the documentation leaves a lot to be desired. I’m still not sure how it could be used as intended, and some usage examples/tutorials would be very welcome. I’ve only used it up to now in order to detach images from posts (that functionality alone is great!). I know it does other things but trying to figure out what and how is very frustrating. Anyway, I know you’ve put a lot of time into it and I’m grateful, but it would be nice if we could actually do all the things you intended. πŸ™‚

    Reply
    • Rus Miller says

      September 9, 2010 at 1:10 pm

      rrrrrrrrrrrr. My code is being stripped out. If you want my fix, please email me.

      Reply
    • ShibaShake says

      September 10, 2010 at 12:50 pm

      In addition to the bulk attach and bulk detach capabilities, the plugin addresses three other key areas –
      1. Creation of gallery objects. Gallery objects allow you to group images together without cluttering up your post space. You can set your own gallery object permalink (Settings >> Permalink).
      2. Tag images. Image tagging can be very powerful and will allow you to attach the same image to multiple galleries.
      3. Parallelize image links. This allows you to spread your image links over multiple domains and sub-domains so that more images can be loaded simultaneously and thus enhance page speed.

      Let me know which of these areas needs more explanation and which areas are unclear and I will add that on my to-do list. Thanks.

      Reply
  5. Angela says

    September 8, 2010 at 12:27 pm

    Plugin works great with 3.0 for detaching images. Thank you!

    Reply
  6. iMenn says

    September 7, 2010 at 12:50 pm

    Dear Shiba,

    Thank you so much for this great plugin. It’s the solution I was dreaming for.

    Let me ask one question. How can I set amount of picture in the gallery (create pagination of pictures)? Or I should write query_post myself?

    I create the catalog from Page in http://www.dkcurtain.com/portfolio/
    and create Tag Gallery in sidebar, such as http://www.dkcurtain.com/gallery/pleat-curtain/

    Thank so much in advance πŸ™‚

    Reply
    • ShibaShake says

      September 7, 2010 at 6:45 pm

      That would depend on the gallery plugin you are using to render the images. If you are rendering the images yourself, then yes, you would include the number of images you want to show within the get_posts or query_posts function call.

      Reply
      • iMenn says

        September 7, 2010 at 10:23 pm

        Thank so much πŸ™‚

        I’ve never rendered the images myself. Could you please suggest some links that have example code?

        Reply
        • ShibaShake says

          September 10, 2010 at 12:34 pm

          If you are not familiar with image rendering, it will be easier to just use a gallery plugin and then extend the plugin to deal with pagination. Just look for the call to get_posts or query_posts with post_type = attachment. That is where the images are retrieved. Then you can use paginate_links to paginate the image results.
          http://shibashake.com/wordpress-theme/wordpress-query_posts-and-get_posts#paginate

          Reply
          • iMenn says

            September 10, 2010 at 8:07 pm

            Thank you so much πŸ™‚ I’ll try πŸ˜€

  7. Bolekz says

    September 6, 2010 at 5:58 pm

    hi,
    i am trying your plugin on a wp-multisite and running in 1 issue.
    i am trying to have the same gallery for all the blogs, so i can use the same images on every blog, mainly because i have one blog that fetches the all the posts from the others.
    my problem is, that i can create galleries per blog, but then i can not see them on the main blog.
    is it possible to have one gallery path for all the blogs?

    thanks and keep the good work up, your plugins are amazing.

    Reply
    • ShibaShake says

      September 7, 2010 at 6:50 pm

      In the same way that you can fetch posts from the different blog tables you can also fetch galleries from the different blog tables. The gallery objects are stored as a custom post type so they reside in the same tables as posts (i.e. wp*_posts). The gallery objects have post_type = gallery.

      Reply
  8. vache says

    August 30, 2010 at 2:51 pm

    hello, firstly great plugin
    i have a small issue
    with the addition of custom post types a small problem arises with WordPress Media Library Plugin
    this function “add_insert_into_post_button($form_fields, $post)”
    only has post and page as a post type, if you can please add a way to have other post types as well, meaning all the post types that are being used,
    or you can use a setting page
    idk whats best, for now i have manually added the other post types i am using that need the insert into post button
    thanks vache

    Reply
    • ShibaShake says

      August 31, 2010 at 9:55 am

      I can probably add in a hook to allow the addition of more post types. I’ll put that on my to-do list.

      Reply
      • Dewey Bushaw says

        April 16, 2011 at 7:10 am

        Hey Shiba,

        It looks like line 18 in shiba-mlib-helper.php is breaking in 3.1.1

        add_filter(‘attachment_fields_to_edit’, array(&$this, ‘add_insert_into_post_button’), 10, 2);

        The “Insert into Post” is not showing up unless you comment this line out.

        Thanks

        Reply
        • ShibaShake says

          April 17, 2011 at 11:53 am

          Is it not showing up for custom post types? If so, here is the fix –
          http://shibashake.com/wordpress-theme/media-library-plus-plugin/comment-page-2#comment-3480

          I will fix this in the next release.

          Reply
  9. Shelly says

    August 30, 2010 at 2:28 pm

    I’m curious – I’m having an issue getting Editor-level users to Add and Manage galleries. Apparently only administrators can do this – which is weird, because in your files, I see references to allow anyone who can edit/delete posts to have access to this stuff, which my editors *do* have access to. Am I missing something? Because I really need my editors to be able to add to and manage the galleries.

    Reply
    • ShibaShake says

      August 31, 2010 at 9:54 am

      Hmmm, there may be some condition somewhere that requires admin privileges. I will look into it.

      Reply
    • ShibaShake says

      August 31, 2010 at 6:01 pm

      Hello Shelly,
      I just tested the plugin with Editor permissions, and I was able to create and update galleries. What error messages are you getting in Editor mode? What operations cause the error? What theme and plugins are you using? The more detail you can provide, the better, so that I can duplicate the bug.

      If you can, try testing things out using TwentyTen with no plugins and see if you get the same errors.

      Reply
      • Shelly says

        December 22, 2010 at 8:56 am

        So sorry I haven’t responded – it’s been crazy down here! I just came back to check to see if you have updates (and you do), and I saw this πŸ™‚

        I have no issues seeing it with Editor level permissions – it’s having Editor level and *above* accessing it. For some reason, I can make Editors access the Galleries just fine, but it won’t allow admins. (And yes, I did attempt it with Twenty Ten – as well as Default – with all plugins shut off). I just upgraded to your newest versions though (Media Library 3.0.3 and Gallery 3.3.7 on WordPress 3.0.3) and now everyone’s accessing everything as they should. But now we have a fun new issue: The tagged images aren’t showing up in the Galleries. They are not becoming associated with the Galleries we’ve set up in the Shiba Gallery section. For example we have images tagged with “dogs”, and set up a Gallery titled “Dog Images”, set to pull in “Any” with the tag of “dogs”, and although the galleries are being created, nothing is being associated with them, and therefore not showing up on the site.

        I’m getting ready to troll through and see if something is conflicting, but as it stands right now, that’s what going on.

        Reply
        • Shelly says

          December 22, 2010 at 9:24 am

          Okay – quick update. Using TwentyTen, and no other plugins activated save Shiba Gallery and Shiba Media Library – and the attachments still aren’t being associated with the Galleries. Very odd. There’s no messages or anything – everything appears to be working as it should, but when I go to the “Galleries > Galleries” page in the admin area, under the “Images” column, everything says “0” – so nothing is being associated with the galleries, even though it’s set to pick up tagged images. (Spelling and case have been checked.)

          Reply
          • Shelly says

            December 22, 2010 at 9:54 am

            Okay, I think I’ve found the issue. You’re assuming my table prefix is the default (wp_). It is not. The error in my logs pointed to this – it reads like so:

            [22-Dec-2010 16:35:48] WordPress database error Table ‘mytable.wp_term_relationships’ doesn’t exist for query SELECT DISTINCT myprefix_posts.* FROM myprefix_posts INNER JOIN wp_term_relationships ON (wp_posts.ID = wp_term_relationships.object_id) INNER JOIN wp_term_taxonomy ON (wp_term_relationships.term_taxonomy_id = wp_term_taxonomy.term_taxonomy_id) INNER JOIN wp_terms ON (wp_term_taxonomy.term_id = wp_terms.term_id) WHERE 1=1 AND myprefix_posts.post_parent = 1053 AND myprefix_posts.post_type IN (‘post’, ‘page’, ‘attachment’, ‘gallery’) AND (myprefix_posts.post_status ‘trash’ AND myprefix_posts.post_status ‘auto-draft’) ORDER BY menu_order,dtc_posts.ID ASC made by require, require_once, include, the_content, apply_filters, call_user_func_array, do_shortcode, preg_replace_callback, do_shortcode_tag, call_user_func, gallery_shortcode, apply_filters, call_user_func_array, Shiba_Gallery->parse_gallery_shortcode, Shiba_Gallery->parse_shiba_gallery, get_children, get_posts, WP_Query->query, WP_Query->get_posts

            so it looks like there might be a couple of “oopsies” in leaving the default prefix assumed in the code somewhere. So far, I’ve only found one instance on line 466 of shiba-media-library.php, but I’m still trolling through to see if I can find more, since fixing that one didn’t fix the issue yet.

          • ShibaShake says

            December 22, 2010 at 9:55 pm

            Opps, my bad. I will work on fixing it. I think this is the only spot because it is the only thing I changed recently, but please let me know if you find more. Thanks!

            Merry Christmas and Happy Holidays!

          • ShibaShake says

            December 22, 2010 at 10:16 pm

            Ok I fixed all the instances in shiba-media-library.php. Please test out the new zip (3.0.5) and let me know how it goes. Thanks.

          • Shelly says

            December 28, 2010 at 7:20 am

            Thanks! I’ll give it a go now.

            And since I have you here, I thought you should know that replacing the Lytebox option (in the Gallery plugin, I know this isn’t the “Gallery” plugin section, sorry!) with the SlimBox probably wasn’t a terrific idea. Turns out Slimbox will not resize images if they are larger than the browser window screen. I even looked at SlimBox’s documentation, and they specifically spell out that it won’t do this. I *must* have it do that, since the images we’re using are minimum sized 3200 pixels in width. Lytebox *would* resize.

            I appreciate that Slimbox is a lighter script, but I still think Lytebox should be an option, since it will resize images. Just thought I’d mention it.

            But thanks for the fix! And hope you had a great Christmas πŸ™‚

          • ShibaShake says

            January 1, 2011 at 8:30 am

            Thanks for letting me know Shelly. I will put it back in on the next update.

  10. Peder says

    August 11, 2010 at 3:13 pm

    Hey! Awesome plugin.
    One question though: is there a way to batch add tags to images after they’ve already gotten tagged previously, without the system removing previous tags? I.e. could I batch add tags also and not just “Set/Replace Tags”?

    Thanks in advance, and please if you can e-mail me your reply. I couldn’t find your contact details anywhere on your website.

    Best Regards and thanks again for a life-saving plugin!

    Reply
    • ShibaShake says

      August 12, 2010 at 9:52 am

      I.e. could I batch add tags also and not just β€œSet/Replace Tags”?

      This is definitely on my to-do list. I will include it in the next update.

      Reply
    • ShibaShake says

      August 13, 2010 at 5:18 pm

      Ok – I have added in the ability to append tags in bulk to images. There should not be an ‘Add Tags’ option in the Media Library drop down menu.

      Let me know if you run into any bugs.

      Reply
  11. chinola says

    June 25, 2010 at 1:13 pm

    is your plugin listed in wordpress plugins? i haven’t been able to find it there.

    Reply
    • ShibaShake says

      June 25, 2010 at 1:20 pm

      Unfortunately no. My site was too commercial for wordpress.org.

      Reply
  12. writemcodeboy says

    June 25, 2010 at 6:30 am

    This is exactly what I am looking for.

    FYI, I have a high volume of Notices produced by the PHP from this plug-in.
    Yes, I can suppress those (but would rather not).

    You may want to check your display_errors and register_global settings.

    I am using WP 3.0

    I think you have done a great job here and if I end up to modify the script I’ll let you know!

    Thank you for sharing!

    Reply
    • ShibaShake says

      June 25, 2010 at 10:15 am

      Thanks for letting me know. I am working on fixing the notices – will post something when I am done.

      Reply
  13. Notable Design says

    June 2, 2010 at 8:25 am

    Hi,

    Great plugin. I am currently using wp-prettyphoto with the regular WP gallery, however it does not seem to play nice with your plugin. Any thoughts on how I might be able to achieve the equivalent of [gallery link="file"] with this?

    Thanks!

    Reply
    • ShibaShake says

      June 3, 2010 at 1:26 pm

      I checked out wp-prettyphoto briefly. It does its own specialized handling of images and galleries, so it will not work with the WordPress core gallery system which is what is supported by Media Library Plugin.

      Changing the links to file links will probably involve identifying where in the plugin file the links are assigned, and changing a small amount of code so that file links are used instead of attachment links. The plugin author is the best person to point you to the right location.

      Otherwise, it may be simpler to switch to some other Lightbox plugin that supports the core WordPress gallery shortcode structure. There are a variety of them.

      Using a plugin that supports the WordPress gallery shortcode will give you greater flexibility later on because you can plug and play with a large variety of plugins without having to change any of your shortcodes.

      Reply
  14. phil says

    May 6, 2010 at 1:10 am

    Hi

    I moved from Blogger FTP to WordPress.

    All the images for my imported into WP posts show up (since the original directory/filename didn’t change).

    However, in order to have the images in posts show up in category pages, etc., it looks like I need to manually insert the first photo in a post to the media library and re-insert it in order for the image to show up in WP category pages for a keyword, etc.

    Is there a way around this? Is there a way to have WP _or a plugin_ identify the first photo (or any photo) in a post, add it to the media library and reinsert it in a post so that it shows up in search results rather than no image at all?

    Thanks! please send responses to me at indierockcafe at gmail (dot) com

    Reply
    • ShibaShake says

      May 7, 2010 at 7:59 am

      Hi Phil,
      I have a thumbnail plugin that does something like this –
      http://www.shibashake.com/wordpress-theme/shiba-thumbnail-plugin

      Let me know if you run into any bugs or issues.

      Reply
  15. ShibaShake says

    April 30, 2010 at 9:39 pm

    Phew – ok I believe I fixed it. I have uploaded the latest zip – version 2.8. It is difficult to test out all the cases, so please let me know if you run into more issues.

    Thanks for helping me find and fix this bug.

    Reply
    • Willian says

      May 1, 2010 at 8:27 pm

      It’s working!

      Thanks, Shiba! πŸ™‚

      Reply
  16. ShibaShake says

    April 30, 2010 at 12:08 pm

    Can you check something out for me? If you turn off the redirection plugin but leave the media library plugin on – do you get the same error? Thanks.

    Reply
    • Willian says

      April 30, 2010 at 2:28 pm

      Shiba,

      I did it but I’ve got the same error with Redirection off and Media Library on.

      Reply
  17. ShibaShake says

    April 30, 2010 at 8:52 am

    Thanks for all the information. It seems like it could be a plugin conflict.

    Are you using a plugin to generate the richer 10-dias-para-o-fim-do-suspense directory structure before %postname%? Or is that a page hierarchy?
    htt://www.corridadeformula1.com/10-dias-para-o-fim-do-suspense/temporada-2010/

    If you are using a redirect plugin, there may also be conflicts because they are all making modifications to the permalink structures.

    If you let me know the plugins you are using I could check it out and see if I can duplicate the issue you describe – but some plugin conflicts may be difficult to resolve.

    Reply
    • Willian says

      April 30, 2010 at 9:47 am

      I’m using “Redirection” (http://wordpress.org/extend/plugins/redirection/) for 303 redirects.

      That URL is of image attached to that post. Attachments URL are /post name/file name.

      Reply
  18. Willian says

    April 29, 2010 at 1:40 pm

    Hi Shiba.
    I had some problems with Media Library plugin. It has caused a conflict with some pages.
    E.g. I have a post “temporada-2010” with no images. But page shows an image and no content wich I wrote there. Moreover, page’s title is from another post.
    It’s very crazy. o_O
    When I disable your plugin the page works again.

    Reply
    • ShibaShake says

      April 29, 2010 at 5:19 pm

      That is probably related to the permalink code. What do you have as your blog permalink and gallery permalink structure? Also is temporada-2010 a post or a page and what is its URL?

      Some things to try –
      1. Make sure to get the latest media-library zip [It should be version 2.7]. There were some permalink bugs with previous versions.
      2. Set the gallery permalink structure to blank – this will default galleries to your post permalink.

      Let me know what results you get so I can fix the issue. Thanks!

      Reply
      • Willian says

        April 30, 2010 at 7:10 am

        Well, plugin version is 2.7. Permalink gallery was /gallery/%gallery%/ I set it blank but no works.

        Blog permalink structure is /%postname%/

        It’s a post. URL is http://www.corridadeformula1.com/temporada-2010/ but shows this post: http://www.corridadeformula1.com/10-dias-para-o-fim-do-suspense/temporada-2010/

        Reply
  19. ShibaShake says

    April 26, 2010 at 8:25 am

    Thanks for letting me know. I have fixed it and uploaded the new zip. Please let me know if there are further bugs so I can improve the plugin.

    Thanks!

    Reply
    • Willian says

      April 26, 2010 at 9:18 am

      Shiba, I have to thank you.
      It’s perfectly OK now. Great job really.

      Thanks!

      Reply
  20. ShibaShake says

    April 25, 2010 at 8:13 pm

    If it’s easy add AND-tag capability so I can install him.

    I have put it in. For example you can do –

    [gallery tag_and="tag-a,tag-b"]
    

    where tag-a and tag-b are tag slugs. Let me know if you run into any problems with the gallery plugin.
    http://www.shibashake.com/wordpress-theme/shiba-gallery.zip

    About actual gallery, I use native as I said. So, I don’t know where I could modify it. I’m not very good with codes.

    In WordPress the relevant function is called gallery_shortcode and it is contained in wp-includes/media.php.

    The shiba gallery plugin also renders WordPress native galleries so you can also look at the code to see an example of how I modified the WordPress native code. Look at the shiba-gallery.php file.

    You will probably need some PHP knowledge though to properly change the gallery shortcode.

    Reply
    • Willian says

      April 26, 2010 at 4:25 am

      Shiba, it works but there is a problem.

      When I put the shortcode with post_type=”attachment” the function doesn’t work.
      Without this everything is OK but shows posts too.

      Reply
  21. ShibaShake says

    April 23, 2010 at 7:42 pm

    Great question. Being able to create more complex queries was something I struggled with while creating the plugin.

    There are two options –
    1. Do it in the gallery backend and create a ui to allow combinations of various query operators.
    2. Do it in the frontend and have it be part of the gallery shortcode.

    Ultimately, I decided that querying operations fit much better on the front-end (within the gallery shortcode). For example, check out the Shiba Gallery plugin’s expanded set of shortcodes. Adding in an AND-tag query will not be too difficult in this case.

    In fact, I think that the media library’s current limited OR-tag queries should also reside with the gallery shortcode system. However, at the current time, it is necessary to add some ability to use tags in the back-end because there are no front-end expanded shortcode standards yet. But it does make the back-end a lot more messy.

    Let me know if you want me to add AND-tag capability into the Shiba Gallery plugin as that would be fairly easy. Alternatively, you can expand the shortcode options used by your current gallery plugin. You probably just need to locate where the get_posts call is made, and add in a new AND-tag query condition.

    Reply
    • Willian says

      April 24, 2010 at 6:58 am

      Hi Shiba, thanks for reply.

      I’m using native gallery now. I had NextGEN before but their scripts were a trouble on Google PageSpeed.

      I don’t have Shiba Gallery installed but it looks being soft. Maybe be a solution.
      If it’s easy add AND-tag capability so I can install him.

      About actual gallery, I use native as I said. So, I don’t know where I could modify it. I’m not very good with codes.

      Reply
  22. Willian says

    April 23, 2010 at 8:22 am

    Hi,

    How I can alter “tags syntax”? By default, galleries show arguments “x” or “y”. But would be very useful change it to show just tags with “x” AND “y”, for example.

    I had a F1 blog. I tagged photos with “Chinese Grand Prix” and “2010 Season”. However, Gallery with Chinese Grand Prix will show all seasons who contain that tag. I’d like to show only images who contain both tags.

    btw, great job! πŸ˜€

    Reply
  23. ShibaShake says

    April 12, 2010 at 11:19 pm

    Hello Pescadito,

    3) another nice option to add is the ability to deattach the attached file instead delete the attached file (i mean both options are needed)

    Hmmm, the plugin should have a detach option. If you go to Media >> Library, the plugin adds a new drop-down menu at the very top and there should be a detach option there that allows you to detach in bulk.

    Note – this is an added drop-down menu at the very top of the screen directly under the Shiba Media Library heading.

    There are other drop-down menus below – which are the standard ones added by WordPress Core.

    Let me know if you can’t find the option or can’t detach. Thanks!

    Reply
    • Pescadito says

      April 19, 2010 at 6:37 pm

      and….
      you have rigth! the option to detach is there and work very well!

      but i mean to have this option inside the popup panel that appear when you edit a post and try to ad a media file:

      add a image file
      from pc / from url /gallery (x) / multimedia library / add from server
      multimedia order action
      image 1 hide/show
      …..
      insert image / use as miniature / delete
      ->> only attach image / only deattach image <<–

      image 2
      … etc

      but your way is ease to work to, so…

      best regard, pescadito

      Reply
  24. ShibaShake says

    April 9, 2010 at 2:59 pm

    Heya Keoshi,

    I have added in the ability to edit the entire gallery permalink structure.

    Please let me know if you run into any problems and have new feature suggestions.

    Reply
    • keoshi says

      April 14, 2010 at 2:35 pm

      I will test and implement new features, I’ll notice you soon

      thank you!

      Reply
  25. ShibaShake says

    April 5, 2010 at 9:58 pm

    Hi Keoshi,
    Always good to see you.

    Currently, the plugin replaces %postname% in your permalink structure with {gallery base}/%galleryname%. Therefore galleries should show up as –

    htt://mysite.com/noticias/galleries/gallery-name

    Please let me know if that is not the case.

    If you want the gallery permalink to have a different structure, I can insert a filter into the function so that you may alter the gallery permalink structure itself.

    What do you want the gallery permalink to look like?

    Reply
    • keoshi says

      April 6, 2010 at 11:10 am

      Thanks for the quick reply!
      In my site, the news are under with the following structure
      /noticias/%postname%
      resulting:
      http://mysite.com/noticias/{post-title-example}

      if apply the word: “galerias” as ‘gallerybase’ for galleries, it results:

      http://mysite.com/noticias/galerias/{album-title-example}

      I like to have the ‘galleries’ under only ‘/galerias/’ suffix. wich is better to SEO and avoid confusions with the news (noticias)
      ie.
      http://mysite.com/galerias/%postname%

      here is my current permalink structure if it helps
      http://img522.imageshack.us/img522/18/permalinks.png

      one more time, thanks for support

      Reply
  26. keoshi says

    April 5, 2010 at 1:21 pm

    hello again!

    I updated your plugin to test the permalinks option and I’ve noticed that the url is the same in my site, even if I add “galleries” into gallery base
    I think this happens because my index page is a page called “noticias” the galleries now is located at htt://mysite.com/noticias/galleries/gallery-name

    my custom permalink estructure is “/noticias/%postname%”

    any sugestions?

    Reply
  27. pescadito says

    March 31, 2010 at 5:39 am

    nice plugin shiva!

    in multimedia library, i try to search multimedia by tag but nothing happening?, may be there is a bug.

    i think a NICE feature to add is searh multimedia by post name, so in this way the neet to use a image tag is less important.

    and another HUGH feature may be to import images directly from a url folder!

    that’s all, best regard, pescadito

    Reply
    • ShibaShake says

      April 7, 2010 at 7:25 pm

      Thanks for reporting the bug Pescadito. I have fixed it in the latest release.

      i think a NICE feature to add is searh multimedia by post name, so in this way the neet to use a image tag is less important.

      Hmmm, I am not sure what you mean. Do you mean search by the post name slug rather than the post title?

      and another HUGH feature may be to import images directly from a url folder!

      Yeah that was something I considered really early on, but I really wanted a plugin that would work together with the current WordPress media library which assumes that all the images are in the upload folder.

      There may be many places in the system that make that assumption, so changing something so fundamental to the core may destabilize many other parts in the system.

      Add – after thinking about this some more, I think it will be very possible to do this through the use of rewrite/redirect rules. I will put it on the list for future additions.

      Reply
      • pescadito says

        April 12, 2010 at 8:12 pm

        hello shibashake, and thank for thinking in this points!

        actually i change a bit my point of view:

        1) you are rigth: in library multimedia page, i wish to search multimedia library by post title name! so in this way i haven’t really need of ‘tag’ because i find old pictures by post title and reattach or manage it in any way.

        2) for the hugh import fro url directory, i finally found http://wordpress.org/extend/plugins/add-from-server/ that make a good work and is enough to me.

        3) another nice option to add is the ability to deattach the attached file instead delete the attached file (i mean both options are needed)
        so for the meantime i use http://wordpress.org/extend/plugins/change-attachment-parent/ to delete one attachment if i needed

        that’s all, the rest work very well to me and i prefer shiba to others media libraries because i have a more standard access to attached files.

        thank again, pescadito

        Reply
  28. ShibaShake says

    March 23, 2010 at 10:26 pm

    The place to hook into is the ‘restrict_manage_posts’ action hook. You should be able to do what you describe by replacing the global $wp_query which is later used to render the list of attachments.

    It seems that hooking into ‘restrict_manage_posts’ and then calling query_posts or wp($q) with your own query arguments should do what you want.

    The original list of attachments are generated using the wp_edit_attachments_query() function so you can also use that as a starting point.

    This is the same mechanism used within the general WordPress Loop.

    Reply
  29. Separatista says

    March 22, 2010 at 1:17 pm

    Hi, thank you for this really great plugin (and also explanation article about its creation – it was very helpfull). Is there any chance to simply limit users (subscribers) to see only their files in Media library? And what about showing only files with specified media tag to specified user? I tried to find any hook or filter, but wit no success πŸ™ Thank you very much for your help…

    Reply
  30. ShibaShake says

    March 8, 2010 at 12:20 pm

    Hi Alex,

    I was wondering how i can get the images with a certain tag???

    I would use get_posts and just include in the tag argument.

       $args = array( 'post_type' => 'attachment', 
    		  'tag' => $tag,
    		  'numberposts' => $numberposts );
       $attachments = get_posts( $args );			 
    

    $tag is a comma separated tag slug list.
    http://codex.wordpress.org/Template_Tags/get_posts

    oh, and is it possible to add an external link for each image??

    Do you want to add the external link only at the front-end? or do you also want to add it on the back-end? If you want to add it to be back-end, I would look into using add_post_meta which will allow you to add new attributes to post objects (i.e. image attachments)

    http://codex.wordpress.org/Function_Reference/add_post_meta

    If you just want to add it to the front-end, then that would depend on the front-end gallery plugin you are using.

    Reply
  31. alex says

    March 8, 2010 at 4:09 am

    oh, and is it possible to add an external link for each image??

    kind regards,

    Reply
  32. alex says

    March 8, 2010 at 3:19 am

    Hi Shibashake,

    first off, tx for the plugin. I have just downloaded and i am testing with it.

    I do have a question, as i am designing a simple gallery view (just x rows with 4 images) and i still like to use your plugin. I was wondering how i can get the images with a certain tag???

    I like to use a loop function.
    Any tips, suggestions ?

    regards,

    Reply
  33. keoshi says

    February 20, 2010 at 11:44 am

    Hello again
    I’ve updated the plugin, and I see you have supported the post thumbnail option.

    I implemented your plugin in a website that I’m working (with a little tweaks in my theme), this is my website www. salesianos.pe (look at “Galeria’s section”) , and I have a question: How I can create a page (archives page) and display into them the galleries or albums?
    another question is:
    is posible to modify or personalize the url to handle this?
    i.e. mydomain.com/galleries (for gallery’s archives)
    mydomain/galleries/[gallery_postname] (for the overview of the gallery)
    mydomain/galleries/[gallery_postname]/[current_photo_postname] (single photo)

    If you have noticed in my site, the galleries always are in /noticias/ directory, this is because I’ve configured to display a page in home and the post below “noticias” ulr
    I wish have all galeries below “galeries” directory, same as above explained

    I hope you can help me with this, and again sorry for my english and so thank you for the plugin!

    Reply
    • ShibaShake says

      February 20, 2010 at 4:52 pm

      Keoshi,
      Good to see you again.

      How I can create a page (archives page) and display into them the galleries or albums?

      The most elegant way to do this, would be to create a category for all the galleries you want to group together and then render the whole category. This would however require a gallery front-end that knows how to deal with categories. I have updated the Shiba Gallery Plugin to render categories, so you may just use that. Or feel free to check out the code and see how to include that in your own gallery front-end.

      Another way to do this would be through the back-end – but it is not as elegent and a bit more messy. You could assign the same tag to all the galleries you want to group together, and then create a meta-gallery with the same tag to include all of those galleries. Check the “Only galleries” option on the meta-gallery. This will group all the galleries together – then you can just render the meta-gallery.

      In this case, your gallery front-end would need to know how to render gallery type objects. You can also check out the Shiba Gallery Plugin code for an example of how to do this.

      is posible to modify or personalize the url to handle this?

      Currently, galleries use the same permalink system as posts. You can probably change the permalink structure by writing a hook into the post get permalink function – get_post_permalink. This is the relevant filter call –
      apply_filters(‘post_type_link’, $post_link, $id, $leavename);

      I will add it to the list for a future release although I may not get to it for a while because I am working on another plugin.

      Reply
  34. ShibaShake says

    February 18, 2010 at 8:33 am

    A.M., Thanks for your very good suggestions.

    You bring up a really good general point which is that tags can be really powerful if it gets greater support in the WordPress backend.

    1. Attachment Tags window on Media part shows tagcloud taken only from posts, not from attachments tags.

    2. i would like to have posibility to edit tags like is in Posts part, but included tags assigned to attachments.

    Yeah – this is something that I have been thinking about. In the latest release of the plugin I have expanded galleries so that it can also include posts, and other galleries. This makes it more natural to have the same tagging system propagate to all the objects.

    However, you bring up a good point which is that most of the time, gallery grouping tags will be different from non-gallery grouping tags.

    I will look into generating a tag cloud that just contains tags associated with attachments and galleries.

    3. Can Search media search also in tags?

    That would be a very good functionality to have.

    I will also look into expanding Search Media so that it operates both on the title and on tags.

    I am currently working on another plugin, but will get back to Media Library once I am done with it. Thanks for your great feedback!

    Reply
  35. ShibaShake says

    February 18, 2010 at 8:24 am

    Hello V8,
    It has to do with some of the new features I put in to the new version of the plugin.

    If you are using WP 2.8, it may be best to download Media Library Plugin version 2.2.

    Let me know if you run into anymore problems. I will also update the article above to include this information. Thanks!

    Reply
    • V8 says

      February 18, 2010 at 12:49 pm

      Cool mate!
      Version 2.2 runs great!
      Thanks for your prompt help!

      Reply
  36. V8 says

    February 18, 2010 at 2:18 am

    Hi,

    I’m having trouble activating your plugin.
    I get the following error:
    Fatal error: Call to undefined function register_post_type() in /public_html/wordpress/wp-content/plugins/media-library-plus/media-library-plus.php on line 264

    I’m using NextGen Gallery and Autofocus theme.
    What to do? Thanks.

    Reply
    • V8 says

      February 18, 2010 at 2:22 am

      By the way, I’m using WP 2.8.4 and I’m also using your plugin on another website of mine with the same version and that works great! Just not this one πŸ™

      Reply
  37. A.M. says

    February 17, 2010 at 4:21 am

    I would like to mention some disadvantages of this super plugin.

    1. Attachment Tags window on Media part shows tagcloud taken only from posts, not from attachments tags.

    2. i would like to have posibility to edit tags like is in Posts part, but included tags assigned to attachments.

    3. Can Search media search also in tags?

    My tags assigned to attachments are mostly different from those assigned to posts.

    I hope i know what i am talking about,
    Kind regards!
    A. Majewski.

    Reply
  38. ShibaShake says

    February 3, 2010 at 7:59 pm

    Hi Keoshi,

    How I can get directly from my template, the latest galleries created?
    and then make a loop and display in list with a thumbnail ?

    Yeah you are right the get_posts command is the way to go. Here is some information on the get_posts and query_posts commands. They can be a bit confusing initially.
    http://www.shibashake.com/wordpress-theme/wordpress-query_posts-and-get_posts

    How are you creating your galleries? If you are just creating them as posts, then doing the gallery category thing that you describe sounds like it will work well.

    If you are creating galleries with the Media Library Plugin, then just specify ‘post_type’ as ‘gallery’ in your get_posts call.

    $args = array(
    	'post_type' => 'gallery',
    	'numberposts' => -1,
    	'post_status' => null,
    	'post_parent' => null, // any parent
    	); 
    
    $galleries = get_posts($args);
    if ($galleries) {
    	foreach ($galleries as $gallery) {
               ...
            }
    }
    
    Reply
  39. ShibaShake says

    January 27, 2010 at 9:36 am

    Hello Mike,

    That is indeed a strange error. I tried duplicating it on 2.9.1 but was unable to do so.

    If you deactivate the plugin, does the regular Media Library attachment function work? If so, it may be some kind of conflict with another plugin.

    To fix it (only if attachment works when you deactivate the plugin), edit the Media Library Plugin. In particular go into the media-library-plus.php file. Search for –

    < ?php find_galleries_div(); ?>
    

    Replace it with –

    < ?php find_posts_div(); ?>
    

    This will limit attachments to just regular posts and pages, but it should work.

    Meanwhile – if you can let me know what other plugins you are using, I will look into the conflict issue in greater detail. Thanks!

    Reply
  40. Mike says

    January 26, 2010 at 5:52 pm

    Hi,

    There seems to be a bug in the “Attach” feature. I was able to detach an image from a page but when I go to re-attach it I’m only able to search for posts to attach it to. Regardless of what radio button is checked the search feature continues to display “No Matches found” for names and post ids that are not actual blog posts. I’m using WP 2.9 if that’s any help.

    Reply
    • Mike says

      January 26, 2010 at 5:54 pm

      Sorry, I’m using WP 2.9.1

      Reply
  41. keoshi says

    January 25, 2010 at 12:47 pm

    I think this is what I was a looking for
    I can to do this? http://i47.tinypic.com/1zzs1u0.jpg

    best explained: (http://wordpress.org/support/topic/356333)

    First, sorry for my english. however I need some help

    I need to put in my homepage something like this http://i47.tinypic.com/1zzs1u0.jpg
    I’ve tried with nggallery plugin, but it isn’t adjust to my needs.

    I need something simple, using if posible Internal WordPress functions or API.
    with a widget is posible to do this?, with only wordpress gallery integration?

    If the gallery is attached to a entry isn’t problem, so I could modify to display only the gallery attached to post.

    I don’t need to teach to me the coding this, only a clue.
    I am versed with PHP but I’m a really newbie with wordpress.

    Thanks in advance!

    Reply
    • ShibaShake says

      January 25, 2010 at 1:10 pm

      Hello Keoshi,

      The approach I would take is to write a gallery plugin that displays WordPress galleries in the way that you describe above. Then you can link your new gallery display function to the WordPress gallery shortcode.

      If you look at the code of my WordPress Gallery Plugin (which links a variety of javascript galleries to WordPress) – you can see examples of how I did this.
      http://www.shibashake.com/wordpress-theme/super-wordpress-gallery-plugin

      Reply
    • ShibaShake says

      January 26, 2010 at 5:06 pm

      I just wrote a tutorial on this that may help –
      http://www.shibashake.com/wordpress-theme/how-to-render-your-own-wordpress-photo-gallery

      Reply
      • keoshi says

        February 3, 2010 at 10:08 am

        hi, thanks so much for the help,
        How I can get directly from my template, the latest galleries created?
        and then make a loop and display in list with a thumbnail ?

        I though doing it with a ‘query’ to get all posts with category “gallery”.

        What is the best way?
        thanks! (I’m reading the fully wordpress documentation πŸ™‚ )
        *sorry for my english

        Reply
    • keoshi says

      February 4, 2010 at 4:09 pm

      i just playing with your code, and the result is almost what I want, thank you!

       'gallery',
      	'numberposts' => 5,
      	'post_status' => 'any',
      	'post_parent' => null
      	); 
         
      $galleries = get_posts($args);
      if ($galleries) {
      	foreach ($galleries as $post) {
      		setup_postdata($post);
      			the_title('', '');
      			the_content();
      			$args = array(
      				'post_type' => 'attachment',
      				'numberposts' => -1,
      				'post_status' => null,
      				'post_parent' => $post->ID
      				); 
      			$attachments = get_posts($args);
      			if ($attachments) {
      				foreach ($attachments as $attachment) {
      					//echo apply_filters('the_title', $attachment->post_title);
      					the_attachment_link($attachment->ID, false);
      				}
      			}		
              }
      }
      ?>
      

      Your plugin is a quite simple and so powerful at the same time, in fact it would be for me the best gallery for wordpress available out there.

      I’m wondering if You have plans to make a extend your plugin.
      It will be amazing if you make a gallery page (http://www.engadget.com/galleries/) and widget like engadget (see Galerias Destacadas section: http://es.engadget.com/)

      I’ve been thinking to modify your plugin to get something like that. (custom page for galleries, get by categories, tags, etc, and custom page for single albums)

      well, I’ll be waiting for updates.
      Thanks

      PS.
      I think just found a bug, when clicked “set thumbnail”: nothing happens.

      Reply
    • ShibaShake says

      February 4, 2010 at 8:04 pm

      Glad everything worked out well and thanks for your great suggestions!

      I’ve been thinking to modify your plugin to get something like that. (custom page for galleries, get by categories, tags, etc, and custom page for single albums)

      I will definitely have to code something up that does that and it will fit in really well with making the thumbnail system work on gallery objects.

      I think what will work well is to create a new gallery type that will contain posts instead of attachments. Then you can display the gallery of posts/attachment-galleries using the same front-end gallery system. However, with the post_gallery you will be linking to posts instead of to an attachment.

      It will be very cool! That is a very awesome idea! πŸ˜€

      If you want to extend the plugin please feel free to do so.

      Thanks Keoshi!

      Btw. send me a link of your new gallery when it is up. Would love to check it out.

      Reply
  42. mmtrav says

    January 23, 2010 at 9:02 pm

    Is this plugin on the WordPress plugin database?

    Reply
    • ShibaShake says

      January 24, 2010 at 9:29 am

      Unfortunately no. I did not have a good early experience and have not tried since.

      Reply
  43. Alexander says

    January 20, 2010 at 8:07 am

    DO a clearly visible Download Link, be human!

    Reply
    • ShibaShake says

      January 20, 2010 at 8:54 am

      Sorry for your troubles.

      Hope it is better now and thanks for letting me know.

      Reply
1 2 3 Next »

Leave a Reply to chinola Cancel reply

Your email address will not be published.

Recent Posts

  • Screen-shot of mobile responsive Poll Daddy object, where text floats properly to the right of radio buttons.How to Make Poll Daddy Objects Mobile Responsive
  • Screen-shot of blog post with no page border (flowing design).Genesis Skins 1.5
  • Screen-shot of the media manager Create-Gallery screen, while doing a post search.Shiba Media Library 3.7
  • Screenshot of the Edit Gallery screen after we hit the Create Gallery button.How to Expand the WordPress Media Manager Interface
  • Blonde girl looking through and holding a circular picture frame.Shiba Gallery 4.3
  • Close-up of beautiful blonde holding a square picture frame.Google Authorship - Good or Bad for Search Traffic?
  • Shiba Widgets 2.0
  • Media Temple screenshot of editing my sub-domain DNS entry.Using CDN Cnames with w3tc and MultiSite
  • Shiba Skins WordPress ThemeShiba Skins WordPress Theme
  • How to add the Media Manager Menu to the Theme Preview InterfaceHow to Add the Media Manager Menu to the Theme Preview Interface

Recent Comments

  • WordPress Search Widget – How to Style It (56)
    • Nelson
      - Tanks master - Fine
    • TelFiRE
      - How do you style the "X" that shows up when you start typing?
  • Update custom inputs with the proper data using Javascript.Expand the WordPress Quick Edit Menu (58)
    • Mike G
      - This is exactly what is happening to me. It is updating the value in the database and in the column, but I have to refresh ...
    • PhoenixJP
      - Thanks for this tutorial. Does someone knows if this still work with wordpress 5.03 and 5.1.
    • Francine Carrel
      - This is a very long time away from your original comment, but did you ever work it out? I am stuck on the exact same thing ...
  • Custom meta-box with a set of radio-buttons.Add a Metabox to Your Custom Post Type Screen (27)
    • mike
      - Hi Shiba am a newbie to wordpress, I just installed a plugin with a custom post type, but has no option for discussion and ...
  • Write a Plugin for WordPress Multi-Site (45)
    • Andrew
      - Hi,action 'wpmu_new_blog' has been deprecated. Use β€˜wp_insert_site’ instead.
  • Populate our Edit Gallery menu using a gallery shortcode.How to Add the WordPress 3.5 Media Manager Interface – Part 2 (29)
    • Janine
      - Still relevant in 2019.
  • WordPress Excerpt – How to Style It (36)
    • James
      - Great post. I really need some help. I have set border lines around my excerpts on my blog page/post page. The problem is ...
  • Add Custom Taxonomy Tags to Your WordPress Permalinks (123)
    • Darshan Saroya
      - Update permalinks. Go to settings > permalink and just save it.

Copyright © 2021 · Genesis Skins by ShibaShake · Terms of Service · Privacy Policy ·