• WordPress Media Library Plugin
    by ShibaShake
    [   See Full Article   ]
    179 Comments
    1. 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.

      2:59 pm on April 9th, 2010 Reply
      • keoshi

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

        thank you!

        2:35 pm on April 14th, 2010 Reply
    2. 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?

      9:58 pm on April 5th, 2010 Reply
    3. keoshi

      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?

      1:21 pm on April 5th, 2010 Reply
    4. 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

      5:39 am on March 31st, 2010 Reply
      • 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.

        7:25 pm on April 7th, 2010 Reply
        • pescadito

          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://dd32.id.au/wordpress-plugins/add-from-server/ or 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

          8:12 pm on April 12th, 2010 Reply
    5. 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.

      10:26 pm on March 23rd, 2010 Reply
    6. 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…

      1:17 pm on March 22nd, 2010 Reply
    7. 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.

      12:20 pm on March 8th, 2010 Reply
    8. alex

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

      kind regards,

      4:09 am on March 8th, 2010 Reply
    9. alex

      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,

      3:19 am on March 8th, 2010 Reply
    10. keoshi

      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!

      11:44 am on February 20th, 2010 Reply
      • 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.

        4:52 pm on February 20th, 2010 Reply
    11. 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!

      8:33 am on February 18th, 2010 Reply
    12. 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!

      8:24 am on February 18th, 2010 Reply
      • V8

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

        12:49 pm on February 18th, 2010 Reply
    13. V8

      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.

      2:18 am on February 18th, 2010 Reply
      • V8

        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 :(

        2:22 am on February 18th, 2010 Reply
    14. 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.

      4:21 am on February 17th, 2010 Reply
    15. 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) {
                 ...
              }
      }
      
      7:59 pm on February 3rd, 2010 Reply
    16. 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!

      9:36 am on January 27th, 2010 Reply
    17. 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.

      5:52 pm on January 26th, 2010 Reply
      • Mike

        Sorry, I’m using WP 2.9.1

        5:54 pm on January 26th, 2010 Reply
    18. keoshi

      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!

      12:47 pm on January 25th, 2010 Reply
      • 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

        1:10 pm on January 25th, 2010 Reply
      • 5:06 pm on January 26th, 2010 Reply
        • keoshi

          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

          10:08 am on February 3rd, 2010 Reply
      • keoshi

        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.

        4:09 pm on February 4th, 2010 Reply
      • 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! :D

        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.

        8:04 pm on February 4th, 2010 Reply
    19. mmtrav

      Is this plugin on the WordPress plugin database?

      9:02 pm on January 23rd, 2010 Reply
      • Unfortunately no. My site was ‘too commercial’ :)

        9:29 am on January 24th, 2010 Reply
    20. Alexander

      DO a clearly visible Download Link, be human!

      8:07 am on January 20th, 2010 Reply
      • Sorry for your troubles.

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

        8:54 am on January 20th, 2010 Reply

    Leave a Reply

    Your email address will not be published.

    You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">

    search button search button
    rss