Tag: tricks

This is a quick tip about WordPress blog emails. Ever since this blog was started, I received emails about comments from my webhost default address. It was ugly looking and didn’t provide any details about who really sent the comment.

The solution is to create an email account on your server with the address wordpress@domain.com where domain.com is, of course, the domain of your website. Once this change has been made, comment moderation notifications will be from WordPress <wordpress@domain.com> and new comment details will be sent from the actual person emailing.

Tagged with: , , ,

When the iPhone arrived on the scene in 2007, it brought with it the ability to pinpoint your location to a fairly small area. This meant that if you were looking for, say, a local fish and chips restaurant, the iPhone would provide the closest matches. It did this by using the same techique as GPS — triangulation — with the signals from cell towers. The second generation iPhone includes real GPS, making it even better at finding your current location, and makes location-aware application much more enjoyable.

Of course, the iPod touch is limited to connecting with WiFi signals, which means the only way for it to find your location is through a database of WiFi hotspots set up by Skyhook wireless. This list tracks the ID of your router and connects that to coordinates on a map.

You can even submit your own router data, and enjoy the nerd bonus points that come along with having your iPod find your house. To do this, navigate to Skyhook’s submit page and enter your address. Once the map appears, move the pin to as close to your house as possible and fill in the additional information. The ID of your router is found in your administration panel. For Airport Extreme users, it is called the Airport ID and is displayed on the summary page of the Airport Utility.

It took more than 3 weeks for my iPod to be able to find my house. If it seems that nothing has happened after submitting your info, just be as patient as possible and give it a few more days.

So give it a try if you want to impress your friends with an iPod that knows where it is.

Photo edited to make it look like I live on Apple’s Cupertino campus. Sadly, that is not the case.

[tags]iPhone, iPod touch, Google Maps, GPS[/tags]

Tagged with: , , , ,

UPDATE 2: A lot has changed to WordPress since 2.x so I don’t recommend trying this for versions above 4.0. I can’t confirm it’s operation.

UPDATE: This also works with WP 2.7.1. If editing wp-db.php is too daunting, you can download my version, which will work as long as the prefix of your main blog is wp_.

While developing new themes for the blog, I needed a place to preview a theme that includes all the current posts, comments and categories. Thanks to a blog post from United States of Martin, I was able to set up the blog in a subdomain that only uses a different options database.

Basically the method is to tell the main blog to allow users in the slave blog to access the posts. You do that by accessing your web host’s MySQL database admin panel and entering this text as two separate queries:

INSERT INTO main_wp_usermeta (user_id, meta_key, meta_value) VALUES (1, 'slave_wp_user_level', 10)
INSERT INTO main_wp_usermeta (user_id, meta_key, meta_value) VALUES (1, 'slave_wp_capabilities', 'a:1:{s:13:"administrator";b:1;}')

where slave_wp is the prefix of your second blog, and main_wp is the prefix of your original blog.

The second task is to change the file /wp-includes/wp-db.php by adding a few lines of new code. The reason I’m posting this is because even with the original instructions, I could not get it working with WordPress 2.6 for some time, even after having it work properly under 2.5.

Find this text in wp-db.php

foreach ( $this->tables as $table )
$this->$table = $this->prefix . $table;

which is likely on line 383 – 384. Immediately after this text, insert these lines:

$this->posts = 'wp_' . 'posts';
$this->users = 'wp_' . 'users';
$this->categories = 'wp_' . 'categories';
$this->post2cat = 'wp_' . 'post2cat';
$this->links = 'wp_' . 'links';
$this->postmeta = 'wp_' . 'postmeta';
$this->usermeta = 'wp_' . 'usermeta';
$this->terms = 'wp_' . 'terms';
$this->term_taxonomy = 'wp_' . 'term_taxonomy';
$this->term_relationships = 'wp_' . 'term_relationships';
$this->comments = 'wp_' . 'comments';

where wp_ is the prefix of your main blog as set up in wp-config.php.

This immediately fixed my setup, and now I can enjoy 2 different themes, with one set of posts, comments, categories and pages.

[tags]Wordpres, 2.6, database, MySQL, blog[/tags]

Tagged with: , , ,

It’s 8 AM. You’re just about to email the TPS reports you’ve been working on since 1 o’clock this morning when suddenly your computer stops responding to your inputs. In a panic, you shut down the system by holding the power button, but on the next startup, the screen doesn’t even reach the desktop. Before starting to pull your hair out, you suddenly realize that you’ve prepared for an event like this — you’ve made a backup drive.

By and large, Macs are very stable systems. Even with little or no maintenance, they’ll run for years without a problem. Unfortunately, they do occasionally decide to take a vacation, which most often comes at a very unlucky time. To protect yourself from such problems, you should have a bootable drive that contains only the bare minimum of applications, hopefully allowing you to remain productive in desperate times.

Important note: There is an important difference between making a drive for Intel-based systems versus PowerPC-based computers. Intel systems can be booted from cases using the cheaper USB 2 standard, while PowerPC computers can only use FireWire drives. Be sure to use the correct case for your computer, as well as the right partition scheme: GUID for Intel, Apple Partition Map for PPC.
Read More »

Tagged with: , , , ,