Geo Mashup Plugin

Tonight I installed the Geo Mashup plugin for WordPress.  This plugin promises to turn WordPress into a GeoCMS (content management system).  It allows you to tag posts and pages with location information, and insert Google maps into pages, with the locations marked.  I was able to insert a Google Map onto a blog page.  It was easy, and looks sharp!  I’m excited!

Because Geo Mashup is located in the WordPress Plugins Directory, I was able to install it directly from the WordPress Admin page, Plugins panel.  Installation instructions are provided in the Geo Mashup Wiki.  Everything proceeded nominally, without any exceptions to the instructions.  You do need a Google API Key for Geo Mashup to work, and to get the Google API  Key, you need a Google account.  Fortunately I already had a Google account, so that saved a few steps.

After activating the Geo Mashup plugin, a Location panel was available for the new Big Trees Trip page.  I searched for Redwood National Park, saved the location, and inserted the shortcode for the map on the page.  Viola! there was the map with a marker at the Redwood National Park.  You are supposed to be able to insert maps in posts as well, so I am going to try that right now.

WordPress Taxonomies

As I considered how to organize my site, I searched the web for advice.  I came across this wonderful site by Scott Ellis.  On his site I found an article on “A Basic Explanation of WordPress Taxonomies“.  It’s a cool way to categorize my site, so I will try to use taxonomies.  I fully expect my site organization to change, as I’m brand new to this.  If it’s not working, I’ll change it!

My Taxonomies

I plan on having three top level categories on this site:

  • Travel: Trips I am planning or have taken.
  • Technology: Computers and gadgets, including software.
  • Home: Things that happen where I live and work.

For each Category, I’ll define a set of taxonomies.  Taxonomies are just a way to organize the posts.  Within a Category, each post can be described by all the taxonomies assigned to the category.

Within the Travel category, there are three taxonomies: (with example terms)

  • Place: (Santa Fe, Bosque del Apache, Mesa Verde)
  • History: (Spanish Colonial, Native American)
  • Activity: (Birding, Museum Visit, Geocaching)

Within the Technology category there are also three taxonomies: (example terms)

  • Device: (desktop, laptop, cell phone, GPS, modem, scanner, web site)
  • Software: (iPhone app, financial, WordPress)
  • Activity: (blogging, finances, pay bills, networks)

Within the Home category:

  • Place: (Master Bath, garden)
  • Activity: (remodel, gardening)

Seems like there ought to be a third taxonomy applying to Home, but it eludes me right now.

Taxonomy Code

I got the code for implementing taxonomies from a post by Justin Tadlock, “Custom Taxonomies in WordPress 2.8“.  Here’s what I used in my blog:

< ?php add_action( 'init', 'create_my_taxonomies', 0 ); function create_my_taxonomies() { 	register_taxonomy( 'place', 'post', array( 'hierarchical' => false, 'label' => 'Place', 'query_var' => true, 'rewrite' => true ) );
	register_taxonomy( 'history', 'post', array( 'hierarchical' => false, 'label' => 'History', 'query_var' => true, 'rewrite' => true ) );
	register_taxonomy( 'activity', 'post', array( 'hierarchical' => false, 'label' => 'Activity', 'query_var' => true, 'rewrite' => true ) );
	register_taxonomy( 'device', 'post', array( 'hierarchical' => false, 'label' => 'Device', 'query_var' => true, 'rewrite' => true ) );
	register_taxonomy( 'software', 'post', array( 'hierarchical' => false, 'label' => 'Software', 'query_var' => true, 'rewrite' => true ) );

(The above is supposed to be a text box with scroll bars. That is exactly what it is when I look at it in the editor. However, when published the scroll bars disappear. I think it is a limitation of WordPress. I’d appreciate some comments from anyone that knows for sure.)

WordPress Avatars

This evening I tackled avatars for my blog.  An avatar is an image that represents a poster or commenter, and appears next to their entry.  WordPress has a setup to generate an avatar image for those who don’t have a custom avatar.  You can choose an abstract icon, a computer generated image, a monster, or a static image “mystery man”.  It was fun playing around with the options.  Of course, only one person has left a comment so far, so the selection of avatars was limited.

I wanted to use a custom avatar for myself.  I have an image that I use for Twitter posts that serves the same purpose, so I attempted to use it.  I spent quite some time looking through all the options in WordPress, trying to find where to upload my avatar, with no success.  I was using my Twitter experience as the paradigm, where it was easy enough to upload an image to the site.

Seems technology has advanced since those days … which weren’t that long ago.  Now, instead of uploading the avatar image to the blog site, you upload it to a third party site,  Your avatar is now available to all sites that have enabled Gravatar.  WordPress, and therefore my blog, is one of the tools that supports Gravatar.

Gravatar was pretty easy to use.  I used my WordPress admin email to create an account.  Once the account was created, I added the email address I use to post on other blogs.  Each email address can have its own unique image, but I used the same image for both.  I may change this in the future.

I uploaded the image I used for my Twitter avatar from my hard drive to Gravatar.  It was slightly larger than what Gravatar uses, so I used the provided online cropping tool.  The image was associated with my two email addresses and viola! my avatar was ready.  A few minutes later my new avatar was showing up in my blog.

Picking a WordPress Theme

Picking a theme has been a challenge. At first I browsed through the themes located in the WordPress Free Themes Directory and picked one that appealed visually to me. This was the Dark Wood theme. It looked nice using Firefox on my Mac, but it did not render properly on my office computer, which uses IE under Windows XP.

The next choice was Constructor. I picked this one because it appeared to be very modifiable. My goal was to learn how WordPress works, and modify to suit my purposes. Constructor is probably suitable for that, but there were two problems: I don’t really have time to dig into the internals of WordPress right now, and the default look did not appeal to me at all.

So now I’ve picked Arjuna X as my theme. I like the look of it, so I don’t need to change any internals. I’ll check it out using different browsers and OS’s to make sure there aren’t rendering problems, but it is the top downloaded theme at WordPress, so it should be pretty good. This time I went with the “wisdom of crowds” and browsed themes based on their popularity.

Browser Tests

  • Looks good using Safari 4.0.4 under Mac OS X 10.6.2
  • Looks good using Firefox 3.6 under Mac OS X 10.6.2
  • Looks good on iPhone using Safari
  • Looks good using IE 8.0 under Windows XP, using Parallels on Mac
  • Looks good using IE 6.0 under Windows XP

Getting WordPress to Run – .htaccess

The installation of WordPress went fairly smoothly.  A few peculiarities due to my ISP, but I figured those out.  However, after installation, I could not get the blog to run.  ISP displayed a page saying I had not replaced the default index.html file with my own file.  Sure enough, the root directory did not have an index.html file, although it did have index.php. The ISP kept putting up the default page.

  • Renaming index.php to index.html had no effect.
  • Calling index.php from index.html did not work.  Index.html contained only one line:
    <?php include("index.php"); ?>
  • Creating index.html with the text “Hello World” caused “Hello World” to be displayed upon going to the URL.

None of the WordPress installation instructions addressed this issue.  They seem to assume that after WordPress is installed, it will just run.  Not so in my case.  After considerable frustration with the above problems, it suddenly started working.  I didn’t understand why, but put it down to a configuration script running at the ISP, that finally recognized it should be accessing index.php rather than index.html.

Tonight I was setting up my FTP client, NetFinder, to synchronize the WordPress installation between the server and my computer.  I downloaded all the WordPress files and directories to my Mac, then ran the script to upload the same files back to the server.  (In the future I’ll be editing the files locally, and using the script to upload them.)  This caused WordPress to break again — I got the same problems as noted above.  It’s a mystery to me — nothing changed except the exact same files were re-uploaded!

Some Internet research turned up a way to redirect files, i.e., make the ISP run index.php rather than index.html.  Redirection commands live in the file .htaccess and apply to files in the directory in which .htaccess is located.  I created an .htaccess file with one line in it:

RedirectMatch index.html index.php

Upon uploading to the server, the WordPress blog started working.