Problem with WordPress 2.6 upgrade – 404 errors

Just a quick note – if you’re about to install the WordPress 2.6 upgrade, make sure you don’t just check your homepage and then call it a night. On a site I help manage for some friends I ran into a huge bug – the upgrade went smoothly, the homepage looked fine, but all the posts returned 404 errors.

It’s apparently very common if you are using “index.php” in your URL structure, which many sites use because IIS doesn’t have an equivalent of Apache’s mod_rewrite or because their host doesn’t allow mod_rewrite for some reason.

The solution can be found in this thread on the WordPress support forums. Basically the solution is to get the latest copy of rewrite.php and copy over the version for 2.6. Here’s another post with a technique for category and tag pages.

There’s a lot to like about WordPress… the open-source codebase, the templating system, the extensible plugin architecture. But I’m starting to feel like I’m squeezed between a rock and a hard place – delay an upgrade and you run the risk of getting hacked; go forward with an upgrade and you run the risk of throwing 404s for your entire site.

Urban Usability – How walkable is your city?

Cleveland skyline from the Superior Viaduct I have a little project called Localographer, which you can use to create heat maps and find a house or apartment near your workplace, friends and relatives, or other place you’d like to be.  When I showed it to my brother he tried mapping out places in Boston and ran into a limitation – the interface doesn’t show you various transit options and it doesn’t make it easy to figure out the real cost and benefits of living in different places.

If you move to the suburbs, you might be able to commute by car but living by a train stop can be cheaper and easier.  In some neighborhoods you can get 10 different kinds of food in a 10 minute walk, in others you need to get in your car and drive a quarter mile to get anything to eat at all.

Adding features like this to Localographer means solving two problems – data and user interface.  I don’t have access to restaurant locations, transit stops, etc. and that sort of data can be expensive to get from commercial sources.  I could go the wiki route but that would require building an interface for users to contribute data and finding ways to make the data more reliable.

So in the mean time, if you want to get an idea of how walkable a potential neighborhood might be, take a look at Walk Score.  It’s a very cool site which has some of the features I’ve been meaning to add to Localographer – you can get a score for how livable the area around any address might be.

For example, my current neighborhood in California has a score of 74 out of 100.   Our house in Shaker Heights scores 62 out of 100.  Because any excuse is a good excuse to use a spreadsheet and a graph, I’ve plotted out the walkability of all the places I’ve lived using a Google Docs spreadsheet and the Interactive Time Series Gadget.  I wrote earlier about how you can embed any Google Doc or Spreadsheet into a blog post but Gadgets are even easier – just click the “Publish” button on the gadget and paste the Javascript code in the raw HTML view of your blogging software.

There are some issues with Walk Score, of course – for example Naples, Florida scores very high, but when I lived there I really missed having access to a car.  Most of the restaurants and shops along 5th Street and Tamiami Trail were out of my internship-funded price range.  I used to bike some distance to get to The Clock, a cheap diner.

All of this discussion is pointing toward a much larger question that I have been thinking about for a long time – I know how to study the usability of web sites and other software, but I wonder if anyone does usability studies of urban planning?  I’ve seen traffic flow studies and I know building codes have some basis in ergonomics and accessibility, but does anyone do observational studies of how people interact with different urban environments to figure out what works and what doesn’t?  Is there a Fitt’s Law of where to locate grocery stores compared to condos?

How to keep spam off your blog, bulletin board, or forum

Columns of gears in the difference engine Spam, it’s not just for breakfast and email anymore.  Webspam is a huge problem – if you run a blog or a forum, you’re probably familiar with the gobs and gobs of gibberish being posted all over the web by spammers.

This humble blog, which only gets a few hundred visitors per day, has had over 17,000 spam comments since I moved over to WordPress last year.  Having your site inundated with comment spam can be just as big a headache as getting hacked.  No one wants to spend hours every day sorting the good posts from the bad.  I’ve already written about how to totally clear out a spammed forum and erase all traces of it’s reputation-marring existence, but the best solution is prevention.

Here are some steps you can take to help prevent spam on your blog or forum.

Keeping Spam off Your Blog

This section assumes you’re hosting your own blog and can add plugins and make configurartion changes, and my examples will be WordPress-heavy because I’m more familiar with WordPress.

Option 1:  Close or restrict comments. Most blogs give you some options to restrict who can comment on articles.  In WordPress, you can require that users create accounts to comment under Settings -> General.  This might not help too much since I’ve seen hundreds of automated user accounts created right alongside the spam.

You can also require that comments are approved before they appear – in WordPress look under Settings -> Discussion.  This will stop your blog from being graffitied without your knowledge but also requires manual effort.  You can also disallow trackbacks and pingbacks, which are really cool in theory but a major avenue for automated spam.

You can also shut down comments completely, or disable comments on old posts.  At that point you may be throwing the baby out with the bathwater, but it’s certainly effective.

Option 2:  Make sure commenters are real people with a captcha. Even if you’re not familiar with the term, you’re familiar with captchas.  They’re the little widgets at the end of a form where you have to decipher some scrambled text from an image.  Many blogs have captcha options built in, but if you’re looking for a captcha plugin be sure to balance usability with security.

I’ve used the Did You Pass Math plugin with some success.  Jeff Atwood has used an extremely simple captcha for years on his high-traffic blog.  Recaptcha is a really cool project that helps fight automatic posting and digitize old books at the same time.

Option 3:  Use an automatic filtering system. If you’re using WordPress, I have three words for you:  Akismet, Akismet, Akismet! Seriously, Akismet is so good at automatically marking spammy commetns and trackbacks that it’s almost scary.  If you’re not using WordPress, you may still be able to find an Akismet plugin for your blogging platform.  There are other systems worth trying as well such as Spam Karma but I have less experience with those.

Keeping Spam off Your Forum

Again, I’m assuming you are hosting the forum yourself or can otherwise make config changes.  I’ll use phpBB (version 3) as an example because I’ve used it in the past.

Option 1:  Restrict user accounts. This can be a tough call, because when you start a forum you want to make it as easy as possible for people to join in the discussion.  Unfortunately, allowing anyone to register and begin posting without any admin approval also opens the door for spammers.

In phpBB this setting can be found in the Administration Control Panel under Board Configuration -> User Registration Settings.

Option 2:  Again with the captchas. Captchas aren’t 100 percent garanteed to remove spam but they do help.  If your forum software doesn’t have a captcha or a captcha plugin, I would seriously consider upgrading to a version that does or switching forums completely.  I know it’s a huge pain but waking up one morning to find 10,000 spam posts is even worse.

In phpBB3 look under Board Configuration -> User Registration Settings for a setting called “Enable visual confirmation for registrations” and make sure it’s turned on.  You can change the details under Board Configuration -> Visual confirmation settings.

Option 3:  Try to find an automatic filtering system. This is harder than for blogs.  There was an Akismet phpBB mod but it’s apparently not being maintained.  There’s a workaround involving the Spam Words mod that you can read about here.  The Spam Words mod might be worth trying on it’s own too.  Here’s a thread with more options for phpBB2, search around and find what’s available for your forum software.

Even without automated filtering, you can try to slow down the spammers by setting a time limit between posts (most human beings don’t type as quickly as spambots do).  Other options, such as disallowing links and BBCode, are pretty drastic but might make your blog less enticing.

Just for fun:

Spam, spam, bacon, and Spam