Skip to content Skip to tags Skip to twitter news Skip to blog roll Skip to categories Skip to archives Skip to recent posts

June 16, 2008


Announcing the WordPress Image Browser Extender Plugin

by in Wordpress,Wordpress plugin on June 16, 2008 @ 3:49 pm

I am pleased to another WordPress plugin geared toward improving the functionality and usability of WordPress’ admin area. This plugin will extend the functionality of the richtext editor to include the ability to browse thru all your images that have been uploaded to your WordPress install.

Feel free to check it out at Image Browser Extenders page and download it from the WordPress extend site.

Some screen shots to hold you over:

back to beginning of this post back to skip to links
Tags: ,

If you liked this article why don't you share it:

Stumble it delicious Digg it Reddit it DZone it Bump it Mixx it! Buzz up! E-mail

5 Responses to “Announcing the WordPress Image Browser Extender Plugin”


Is there any chance to make this great plugin working without the richtext editor?

I saw your comment over here:

The main problem you’re talking about here is the necessity to include wp-config and how that keeps changing and breaking plugins.

Here’s the problem with that: It’s really never necessary to include wp-config.php. Ever. Why? Because it’s also never necessary to link to your plugin directly. Just code the plugin to have an alternate output path.

Think of it like this. You’re calling your plugin directly for some purpose, possibly to output an image or something. Great. Instead of doing that, have it link to the main blog URL and pass a new parameter on the command line.

Then, the magic: you hook your plugin to template_redirect.

At that point, you can check for that parameter, do whatever it needs to do, and then exit the script, to prevent WordPress from creating any output.

Voila, done. No need to include config or load or anything else. All you need is to create a special GET parameter.

In fact, you can even make your own query_var, if you don’t want to look at the GET superglobal.

Example code:

  1. //create the "test" var
  2. function test-var($public_query_vars) {
  3. $public_query_vars[] = 'test';
  4. return $public_query_vars;
  5. }
  6. add_filter('query_vars', 'test-vars');
  8. // check for it and do our own output instead of WP's
  9. function test-output() {
  10. if (get_query_var('mytest')) {
  11. echo "hahah!";
  12. exit;
  13. }
  14. }
  15. add_action('template_redirect', 'test-output');

See how simple that is? Now a hit to will output “hahah!” and then exit.

You never, ever, need to include wp-config.php. It’s just not necessary. There’s always a forward compatible way to do things.

Whoops. I typed “mytest” in that second function by mistake. My bad, that should be just “test”. :)

@Evita that is in the works, not entirely sure of the timeframe though.

@Otto Let me start of by saying that everything I know about WP plugins is from looking at what other people did, some tutorials here and there and from digging thru the code to see where things can be hooked into.

With that said, your example is actually perfect for what I’ve been doing for most of my plugins where there is a need to communicate directly with the plugins file.

In your example you mean test_var and not test-var correct? Don’t think test-var would work, but I could be wrong.

“You never, ever, need to include wp-config.php. It’s just not necessary. There’s always a forward compatible way to do things.”

Yes, I believe there is always a forward compatible way of doing things, but sometimes its hard to see the forest thru the trees. No matter how hard you look at someone else’s code, you may not always take the best route.

I do appreciate you taking the time to educate me on that point, I will be testing that approach on my PhotoXhibit plugin and see what I come up with.

Hey, for off-the-cuff folk code, I think I did pretty well. ;)

But yes, okay, there’s some minor issues with that bit of code. Nevertheless, it illustrates the point, I think.

Learn from my mistakes, I got burnt by the flame, you don't have to.

RSS Feed Link My Hosting of Choice

68 queries. 0.312 seconds. Powered by WordPress visitor stats