Two WordPress Plugins And The (Missing) Nokia Map

It’s a glaringly obvious oversight but a few month’s back I realised that given what I do for a living, there’s something missing from my blog and that something is a map.

There’s a whole slew of “where am I” style WordPress plugins out there, but after some careful research I decided that none of them did precisely what I wanted, which was to show the last check-in I made on Foursquare, on a map, in the sidebar of my blog.

Those that did come close still didn’t do the key thing I wanted and that was to use the map I work on as part of my day job. Now don’t get me wrong, I’ve got nothing against the maps that I could have used; Google, Bing, Mapquest and OpenStreetMap produce very fine maps and they all have the JavaScript API I’d need to display my last checkin. But none of them used my map and that means a Nokia Map.

So taking what I’d learnt about WordPress plugins during the course of producing 12 versions of the WP Biographia plugin, I rolled up my sleeves (mentally and literally) and started work on what would become WP Quadratum. I seem to have a thing about naming my plugins using a Latin derivation of their name; I have no idea why, but it seems to be better than something along the lines of WP Yet Another Foursquare Checkin Plugin. But I digress.

Several months later, after wrestling with getting a plugin to authenticate with Foursquare via OAuth 2 and learning how to write not only a WordPress plugin but also a WordPress widget, WP Quadratum appeared on the sidebar on my blog. It’s over there right now, towards the top right of your browser screen, unless your reading this on a mobile device, in which case you’ll just have to take my word for it for now.

Now Nokia allows free and unauthenticated use of the JavaScript Maps API, but only up to a certain number of transactions over a lifetime. So I also built in support for supplying Nokia’s Location API credentials as well. But then I stopped. Why build custom support for authentication and credentials into a plugin, only to probably have to copy-and-paste the code into another plugin I write that will use the same Maps API? So I digressed again and wrote another plugin, WP Nokia Auth, that handles the Nokia credentials for me, and then made WP Quadratum play nicely with WP Nokia Auth, if it’s installed, active and configured.

It took a while, but v1.0 of both plugins are now up on the WordPress plugin repository and on GitHub as well, for the usual forking, downloading, hacking and poking around. Whether they get the same number of downloads as WP Biographia has (over 7,000 to date) I somewhat doubt, but unless I release these, I’ll never know, so that’s just what I’ve done.

Written and posted from home (51.427051, -0.333344)

6 Comments

  • I just installed v1.0 but I get an error when I try to activate the plugin:

    WP_PluginBase’ not found in /home/vhosting/j/vhost0002738/domains/jillesvangurp.com/htdocs/www/wp-content/plugins/wp-quadratum/wp-quadratum.php on line 46

    Running wordpress 3.3.1

    • Oh a**e. I was sure I’d sorted that. I know exactly what it is. I’ll sort it first thing tomorrow and push out a fix.

    • Just pushed v1.0.1 to the SVN repository; should be showing there now. Damn Git submodules were causing me grief. Again.

      • Works great now. wp-nokia-auth killed my site though. Had to ssh in and rm -rf the directory. Entering the credentials manually works OK. though the names in your settings form don’t quite line up with the names used on the nokia side (confusing).

        • Killed? In what way. I’ll take a look at this on a clean install if you give me a bit more information (hint: take a look at http://www.vicchi.org/2012/03/31/asking-for-wordpress-plugin-help-and-support-without-tears/, there’s a whole slew of questions in there).

          Will also look at matching Nokia credential titles with plugin titles as well.

          • All I got was a blank page after activation, for any URI on my site.

            I’ve seen this before with other plugins and it is probably throwing some error. Since you can’t actually get to the admin ui, the only way to fix is to remove the plugin files.

            For the record, wp 3.3.1 with the default 2012 theme. I have about 15 plugins:
            Akismet (Version: 2.5.5)
Disqus Comment System (Version: 2.72)
EasyRedirect (Version: 0.2)
Facebook Comments TNG (Version: 0.31)
Flexi Pages Widget (Version: 1.6.10)
flickrRSS (Version: 5.2)
oogle Analytics for WordPress (Version: 4.2.4)
Google XML Sitemaps (Version: 3.2.6)
Jetpack by WordPress.com (Version: 1.2.4)
Twitter for WordPress (Version: 1.9.7)
Twitter Tools – Bit.ly URLs (Version: 2.4)
Twitter Tools (Version: 2.4)
Plugin Lister (Version: 2.1.0)
WP Quadratum (Version: 1.0.2)
WP Security Scan (Version: 3.0.9)
WP-Syntax (Version: 0.9.12)