More usable approach to adding restaurants

The “lazy” approach to usability is to just use a web site or application yourself and use usability heuristics. This is what I do, and it’s why I have a huge to-do list of things to fix on the site. Lately to build out the site content, I’ve been going to a lot of restaurants not listed on the site. This means I have a multi-step process after I eat:

  1. Add a new restaurant.
  2. Add a location.
  3. Add a review of the restaurant.
  4. Rate the restaurant
  5. Add all the menu items I ate.
  6. Tag the menu items.
  7. Write a review of the menu items.
  8. Rate the menu item.

For everyday users, I don’t expect 1 or 2 and only a few of 3-8, but 1 is a requisite and 2 is nice for maps and just being able to get information quickly. I did want to streamline this process, so I made a combined form that does 1,2 and 3 all in one place. That’s just six steps:

  1. Add a new restaurant.
  2. Rate the restaurant
  3. Add all the menu items I ate.
  4. Tag the menu items.
  5. Write a review of the menu items.
  6. Rate the menu item.

For most users it makes sense, since most restaurants just have one location - or if they are adding a restaurant they are only thinking of a specific location.

I also took the opportunity to do a check on restaurant names. If you attempt to enter Green Mill twice, you’ll be prompted that a restaurant with that name already exists. It’s not a very smart check, but it should serve it’s purpose.

Read full post
AJAX star rater for symfony

Francois from the symfony project beat me to the punch. I was going to post a detailed how-to on adding a star-rater to your web site (similar to the one’s I created for reviewsby.us), but for most of you this should do the trick. Unless people request it sooner, I’ll hold off on publishing the details on my star-rater for a while. It only offers a few minor differences (IMO advantages) to this snippet.

Read full post
Migrating from Drupal (4.7) to Wordpress

I helped Katie setup her new blog this weekend and decided that WordPress offers much of what I want out of this blog for a lot less effort than drupal1. I decided it might be worth my time to now while this blog is in it’s infancy to try converting from drupal to WordPress.

The way I start most of my projects is with a plan:

I’m really confident that this will be easy. I don’t even have to worry about comments or anything, since this blog is pretty new, but I can demonstrate how to take care of the.

Discovery

This post details a migration path from drupal to wordpress. Some considerations had to be made since I’m using drupal 4.7.

Implementation

Copy content

I followed most of the instructions, with some alterations from vrypan.net.

I installed WordPress and in mysql ran the following commands:

use wordpress;
delete from wp_categories;
delete from wp_posts;     
delete from wp_post2cat;
delete from wp_comments

I run my drupal site in the same database server, so the data copying was a snap. If you aren’t so fortunate, just copy the relevant drupal tables temporarily your wordpress database.

First we get the drupal categories into WordPress:

USE wordpress;

INSERT INTO 
	wp_categories (cat_ID, cat_name, category_nicename, category_description, category_parent)
SELECT term_data.tid, name, name, description, parent 
FROM drupal.term_data, drupal.term_hierarchy 
WHERE term_data.tid=term_hierarchy.tid;

Again with the posts:

INSERT INTO 
	wp_posts (id, post_date, post_content, post_title, 
	post_excerpt, post_name, post_modified)
SELECT DISTINCT
	n.nid, FROM_UNIXTIME(created), body, n.title, 
	teaser, 
	REPLACE(REPLACE(REPLACE(REPLACE(LOWER(n.title),' ', '_'),'.', '_'),',', '_'),'+', '_'),
	FROM_UNIXTIME(changed) 
FROM drupal.node n, drupal.node_revisions r
WHERE n.vid = r.vid
	AND type='story' OR type='page' ;

And the relation between posts and categories:

INSERT INTO wp_post2cat (post_id,category_id) SELECT nid,tid FROM drupal.term_node ;

And finally comments:

INSERT INTO 
	wp_comments 
	(comment_post_ID, comment_date, comment_content, comment_parent)
SELECT 
	nid, FROM_UNIXTIME(timestamp), 
	concat('',subject, '<br />', comment), thread 
FROM drupal.comments ;

I ended up moving the one static page I had into WordPress’s “pages” section manually.

Since my pages are written in Markdown, I enabled the Markdown for WordPress plugin.

URLs

Now for the real test. I needed to go through each page on my site and see if I could get to it using the same URLs. Since I had only 14 posts, I did this somewhat manually. I used drupal’s built in admin to do this from most popular to least popular. Most URLs worked fine. There were a small number that didn’t for various reasons, I used custom mod_rewrite rules to handle them.

Adjusting Templates

My drupal template was fairly clean and simple. So I adjusted the CSS for the default theme in WordPress until I got what I liked. Very minimal changes had to be made to the actual “HTML.”

Make the switch

Well, time to make the switch. In the WordPress administration, I just had to tell it that it’s now going to be located at spindrop.us. Then I moved my WordPress installation to the spindrop.us web root. It was a snap. Let me know if you have any troubles.


  1. Taxonomy, legible URLs and trackback support all seemed quite difficult to master in Drupal. In Wordpress they appeared to be available standard or with a minor change in the administration panels.
  2. This is a prime reason why URLs should be clean and make sense to the end user, not the programmer of the publishing software.

Read full post
Comment Anonymously at ReviewsBy.Us

I decided to overhaul the comment system on the reviewsby.us site. I implemented an AJAX form and allow anonymous comments. Anonymous comments is a slippery slope, but reading about friction and identity some things need to be taken into account.

The site is new. It’s going to take a while before it generates a lot of traffic and therefore members and therefore comments. But it would be nice to keep collecting information and make that collection as painless as possible. Of course the potential for spam is high, but when/if that happens there are safeguards that can be put in place. I imagine, until a decent membership base is established, the rules for who can and cannot post will probably change every now and again.

Read full post
Rate your favorite dishes

Screenshot of reviewsby.us dish ratings

If you’ve stopped by reviewsby.us this week, you’ll notice we extended ratings to dishes. On a restaurant page, blue stars are averages for things you haven’t rated yourself and orange stars are your own rating. At a glance, you can now see what you should order at any given restaurant.

Read full post
Internet Explorer bug fixes

[katie]: http://katiebonn.com/ [ubuntu]: http://ubuntu.com/ [wine]: http://winehq.com/ [rbu]: http://reviewsby.us/

IE Fix
My web development shortcomings for my personal sites, including [reviewsby.us][rbu] (one-man army, no QA testers) is being blind to IE. [Katie] and I both work using Powerbooks and our backup computer is a [Ubuntu] desktop. At work [Katie] uses IE and noticed an error with how I display menu items. Friday I took that [Ubuntu] machine and installed Internet Explorer via [Wine][] (details to follow).

Read full post
reviewsby.us + Google Coop, ratings, updates

[Google]: http://google.com/ [b]: http://googleblog.blogspot.com/2006/05/yes-we-are-still-all-about-search.html [c]: http://www.google.com/coop/ [q1]: http://www.google.com/search?hl=en&lr=&q=cheesecake [s]: http://www.google.com/coop/profile?user=015173080624703800226 [tcf]: http://reviewsby.us/restaurant/cheesecake-factory [Google][] [announced yesterday][b] [Google Coop][c], a way to subscribe to links from other sites. So let's say you type in a word like ["cheesecake" into Google][q1]. If you are [subscribed][s] to results from [reviewsby.us][r] you will get a result for [The Cheesecake Factory][tcf]. Go ahead and [give it a try][s] (you must be logged in to your Google Account to subscribe).

Read full post
Collecting and displaying phone numbers on the web

[re]: http://en.wikipedia.org/wiki/Regular_expression [php]: http://php.net/ Using some [regular expressions][re] we can easily convert this: 8005551212 Into this: 800.555.1212 In [PHP] we can use this function: function format_phone($phone) { return preg_replace("/([0-9]{3})([0-9]{3})([0-9]{4})/", "$1.$2.$3", $phone); } Not terribly complicated. We can even go in reverse and remove the dots as I'll demonstrate below. Despite the ease of going from a formatted string to a string of digits and back again, we often run into forms that aren't usable.

Read full post
Full writing schedule

I've created a full writing schedule for this site for the next year. These include various tutorials on usability, [symfony], RSS, [Google Maps][g], CSS and other web development related issues. These, of course, will be in addition to the periodic updates to [reviewsby.us][r]. Stay tuned. I should be releasing them at least once a month. [g]: http://google.com/apis/maps/ [r]: http://reviewsby.us/

Read full post