Fix WP Gallery Remote plugin for Wordpress 2.7

Jed | January 28, 2009

Warning: This post assumes a lot of prior knowledge about Wordpress and the WP-Gallery-Remote plugin. I’m writing this post to help any others out there on the internets who also use this plugin and ran into the same problem I did.
wp+galleryI use the WP-Gallery-Remote plugin to show pictures on this blog. Unfortunately after I upgraded to Wordpress 2.7 it stopped working completely. It would still show pictures if I added the special markup to each post manually, but the handy popup editor would no longer insert the tag automatically into my post.

It turns out the problem and fix are very simple. The JavaScript that inserts the special tag into the page is broken because it relied on the structure of the Add New Post/Edit Post page which has changed in Wordpress 2.7.

The problem is with the index of the forms array on line 63 of wp-content/plugins/wp-gallery-remote/mce_plugin/wp-gallery_remote_mce_plugin.js:
insert_wp_gallery_remote_tag_AtCursor(window.opener.document.forms[0].content, tag);

Starting with Wordpress 2.7, the main post content form is no longer the first form on the page. Now in 2.7 the “Screen Options” dropdown on the top right of the page is the first form. This means that forms[0] no longer points to the post textarea.

So to fix the WP-Gallery-Remote plugin to work with Wordpress 2.7, just edit line 63 of wp-gallery_remote_mce_plugin.js and change that 0 to a 1. Or if you want to get more fancy, you can fix the plugin so it will keep working even if the Add New Post/Edit Post page changes in a later Wordpress release by changing line 63 to this:
insert_wp_gallery_remote_tag_AtCursor(window.opener.document.getElementById('content'), tag);

Presto, working Gallery2 editor in posts!

This wingsuit stuff is just so cool

Jed | January 24, 2009

These wingsuit guys are nuts. But I have to say, flying around like this looks crazy fun if you have the courage to do it.

wingsuit base jumping from Ali on Vimeo.

Please don’t tell my mountain-climbing friend Mo about this. I can just see him trying to wingsuit-fly off of the next mountain he climbs… and then he’d be my late friend Mo.

Comments
No Comments »
Categories
Videos
Comments rss Comments rss

Who knew? Congress launches video blog, has sense of humor.

Jed | January 14, 2009

This video was put out by Nancy Pelosi’s office in honor of the launch of http://YouTube.com/HouseHub, a special YouTube page where you can see videos (personal and from TV) of all the Representatives.

While that in itself is pretty cool, it turns out they actually have a sense of humor about it as well. Watch to at least the 40-second mark and you’ll understand what I’m talking about. Congress gets internet memes!

Who are you sketchy silver car?

Jed | January 13, 2009

sketchy silver carNicole spotted this car which stopped in front of our house. The driver rolled down the passenger-side window and started taking pictures. Then they drove around to the side of our house and took more pictures of the back of our home through the passenger side window.

I can’t really make out the license too well, but it looks like BJF-394. Hard to tell which state, probably Virginia. Can anyone tell me what kind of car this is? Click the image above to see bigger (although the full size is BIG so to close just click anywhere outside the picture).

Who are you sketchy person in the silver car? And why are you taking pictures of our house?

Comments
2 Comments »
Categories
DC-area
Comments rss Comments rss

Coming to DC for Inauguration Day? You need to watch this.

Jed | January 10, 2009

Someone in the DC Metro definitely has a sense of humor, but they also understand the need to get their message out for big events. The quick movie below is Metro’s warning advice to anyone coming to DC for Inauguration Day.

Don’t say you weren’t warned!

If anyone knows where I can find the other amusing Metro videos, please let me know.