Thursday, September 10, 2009

Media Finder - WordPress plugin for searching images and video

Do you like WordPress? I do. This engine probably doesn't have the best architecture, sometimes its code is just awful, but its agility and excellent user interface attract lots of users around the world. I decided to contribute to the development of WordPress community and wrote a plugin Media Finder.

This plugin helps you find images and video on Flickr and YouTube quickly and easily and insert them to your post with one click. A lot of readers find posts with illustrations more interesting in comparison to the text-only posts. But we often don't have necessary illustrations which fit the subject of our posts. Here Media Finder can help you. It lest you find mediafiles on the largest storages of video and images on the internet, and illustrate your posts with them.

Installation (will take no logner than a minute)

  1. Upload media_finder.php file to the /wp-content/plugins/ directory.
  2. Activate the plugin through the 'Plugins' menu in WordPress.

Usage

It's extremely easy to use Media Finder. Just start writing a new post, then, when you need to insert image or video, press Add an Image / Add Video button (above the text editor) and go to Search tab on the opened window. After that enter the search query and press Enter. You'll see search results pretty soon after that. If you've searched for images, then in addition to inserting to the post, you can view it's larger version. And if you've searched for video, you can view larger version of the preview image and watch the video. And that's it!

UPD: From the version 0.0.2 I have added 2 options for the images search. First, you can specify the order of the images - by relevance, publication date or interestingness. Second, you can choose the license, end Media Finder will search only for images that support the chosen license. Thanks to iCounsellor who suggested this feature. In addition, all images that you insert to your post are by default linked to the author's photostream, because Creative Commons license requires it, but you can change it easily, if you want.

Supported browsers

FF2+, IE6+, Opera 9+, Google Chrome.

Web hosting support

Media Finder requires curl PHP library to be installed on your server. As an alternative, allow_url_fopen flag in php.ini flag should be set to 1. Don't worry, most fo the servers have the required library installed. If not, contact your hosting provider support service.

Support of different WordPress versions

I have tested Media Finder using WordPress 2.8.4, but earlier versions can also work. You can install the plugin and check whether it's compatible with your version of WordPress. Media Finder doesn't use database and doesn't make any unalterable actions, so you won't have trouble even in case of incompatibility.

UPD: Media Finder works with WordPress 2.7 and higher.

How you can help

  1. Just use Media Finder.
  2. If you like it, tell your friends or write a little post about it.
  3. If you find a bug or have an idea that will help to improve the plugin, write about it here in the comments.
  4. If you think you can improve design or functionality of the plugin and you wish to do it, I'll be glad to collaborate with you. Write to Kadalashvili at Vladimir at gmail dot com.

What I am planning to do

Of cource, I am planning to fix bugs as soon as possible. In addition, I am going to test the plugin for compatibility with earlier versions of WordPress. I am also going to add some options for search, for example, sorting the results by date, relevance or popularity. If you have some ideas about adding new features, please share them.

Resources

Media Finder on WordPress plugin directory
Download
Happy blogging!

15 comments:

iCounsellor said...

Hello - good plugin, but may I make some suggestions?

We can't really use other people's images on our blogs - because the images don't belong to us. Flickr supports the Creative Commons license to deal with this ... meaning that some Flickr users have given permission for their images to be used - provided that they are given credit for the use.

See here: http://www.flickr.com/creativecommons/

I would suggest that Media Finder would be of great benefit if:-

o One could select what type of commons license is to be used.
o Media Finder only searches for photos that support the chosen of license.
o Media finder appends a credit to the owner of the chosen media when it's inserted into the blog, when the Flickr owner has requested that they be given credit.

Please!

Vladimir said...

Great suggestion! I will implement it in the next release.

johannes said...

dont work for me, when i click on search nothing happend

i have send you an mail with the problem

Vladimir said...

The problem probably is that you have no cURL PHP extension installed on your server, and allow_url_fopen PHP setting is set to false. Please contact your hosting provider.

iCounsellor.co.uk said...

Have found part of your problem.

On the lines where you have:-

include(WP_PLUGIN_DIR.'/media-finder/search-video-form.php');

and

include(WP_PLUGIN_DIR.'/media-finder/search-image-form.php');

These fail because you have placed your search forms in a sub-directory of media-finder.

So re-write these as;-

include(WP_PLUGIN_DIR.'/media-finder/media-finder/search-video-form.php');

and
include(WP_PLUGIN_DIR.'/media-finder/media-finder/search-image-form.php');

Unfortunately, when I make a search, the "Add an Image" window shows me a page of my own blog (probably a list of all posts) instead of a list of Flikr images.

Nothing is recorded in the error log.

iCounsellor.co.uk said...

Update -

alter line 13 of media-finder.php

return get_bloginfo('url').'/'.PLUGINDIR.'/media-finder/';

to

return get_bloginfo('url').'/'.PLUGINDIR.'/media-finder/media-finder/';

iCounsellor.co.uk said...

Suggestion - could you retrieve the owner of the Flickr photo when the licence is "Attribution" and include it in the "Image Caption" field. So that the Image Caption becomes (for example)

Image (c) Foodistablog

??? This is because when you choose a Flickr photo where you have to give attribution, you have to include something in the image's display that shows who owns the image.

You could do this as a "thank you" for me finding the problems with the plugin ;)

Thank you :D

Vladimir said...

Sorry, I have already fixed this issue, but there are some problems with WordPress SVN repository. I will try to commit a little bit later.

Vladimir said...

For now you can just move the contents of the top media-finder directory to /wp-content/plugins directory.

johannes said...

hey

i have checked the settings
curl is enabled and allow_url_fopen is false.

it ran it on my local pc with xampp, it start
searching but never did anything.

havent you got my mail with the url and the
data?

johannes said...

hello

i have just installed the modul on my productiv webserver and there it works perfectly.

but i have one problem, when i add a youtube video - i see it the editor but it wont save it. i think its because of the html tag your modul insert. would it be possible to use the wordpress standard youtube tag?

i have also inserted a flickr picture but when i click on the picture the picture is smaller than in the post

akullore said...

Thank you for what you've done
i don't want the pdf file appear in that way

i want the viewers to see a botton "clik here"and after that the pdf to open inside the site.

please help me.

broken images said...

doesnt work in wp 3.0, says json.match is not a function

iCounsellor.co.uk said...

Works fine on my 2.9.2 and 3.0.1 installations.

broken images said...

i tried installing on 2.9 works fine, but when i install 3.0.1 the error says json.match is not a function.

what changed in the wp? anyone know?