Posted by & filed under Geekery.

I thought I had this bad boy all wrapped up, but apparently not…

I’ve spent some spare time this week on putting together a WordPress plugin that integrates Google Maps into the comments on a post. I’d intended to make this available for a WordPress Page, as well, but it seems that WordPress is lacking the needed hooks to elegantly extends Pages in the same way that you can with posts. grumble

The goal with this plugin is to enable someone who comments on the post (or Page) to also specify their location. Once the location has been collected, it will be displayed on a Google Map that’s embedded in the page, just after the content of the post. I expect this will be a good replacement for Frappr maps that some bloggers have been linking to to build up a map of their readership. But this really belongs to a Page, in my opinion, however, and that’s where I’m stymied.

Anyway, what you (should) see here is my GeoComments plugin in action. Once I’m sure it’s working outside of my own test environment, I’ll officially release it and let the teeming masses have their way with it. If you’re feeling particularly frisky, check out a working copy from my svn repository into a directory named “geocomments” in the wp-content/plugins directory.

I still have some work to do with the way the location fields are presented along with the comment form; they’re currently functional, but ugly. There are some nomenclature adjustments to be made, as well. It’s also not been tested outside of Safari on OS X 10.4.3 or FireFox 1.0.7 on the same, but I don’t think I’m doing anything browser-incompatible.

So, please, comment below, and tell me where you’re from!

update I decided to bite the bullet and release 1.0. Time for me to get on with some other things! :-) There’s now a rudimentary project page.

28 Responses to “Testing the GeoComments plugin”

  1. blalor

    I live in the middle of nowhere!

    That’s relative. You’re right near the Salton Sea! That beautiful oasis that stands as a testament to Mankind’s uncanny ability to really fuck up Nature. ;-)

  2. ukpylot

    Ahhh, the Salton Sea – you know, they’re building luxury homes on its border, well within the ‘stink zone’ (i.e. about 20 miles in all directions). But its going to be saved, don’t you know, just as soon as someone is willing to pay for it.

  3. Vetto

    This is exactly what I was looking for! Thanks for creating it. Now, how do I get the additional fields for zip, city, state and all that? is it just supposed to “be there” on the comment page? I get the map diaplayed, but no fields for commentors.
    I have checked the box for geocomment on the post

    ...and I noticed a “custom field” in the drop down also, what is that for?

  4. blalor

    Vetto, your theme must support the same “actions” that the default WP themes do. In particular, the comment_form, wp_head and wp_footer actions are used. If the hooks to those actions don’t exist in the theme you’re using, this plugin (and probably others) won’t work.

  5. icemountain

    Hmmm… “I’ll fix it soon for WP2.0”

    I guess I can stop holding my breath….2 months later and still no fix?

  6. icemountain

    I’ve been anxiously waiting for this plugin to be fixed now since Jan 23, 2006. I guess after almost 7 months I should probably stop visiting this page.

  7. blalor

    Minor mods have been made to make this work with WP2.0. Thanks for the gentle encouragement, icemountain.

    Once I finish testing a couple of things, I’ll update the archive on the project page.