Mostly about my amusement

Category: Software (page 18 of 22)

Halo 2 on Vista

Halo 2 for Vista screenshotMicrosoft could have done better for a Vista only game.

Two weeks ago I was at my in-laws house. My nephew has an old Xbox (not the 360) and was playing Halo. It was a little retro compared with Gears of War but it looked okay. So for $20 at Best Buy I picked up the original Halo Combat Evolved for my PC. I completed it quickly enough and had some fun.

Plasma grenades sticking onto the bad guys was fun; sometimes the little grunts would shout “Not again!”

Halo 2 for Vista came out and I picked it up too. It’s okay. It’s not as visually entertaining as Unreal Tournament 2004, and the Marines have already run me over in a Warthog.

Just like an original Xbox game, it feels a little retro but displayed in wide screen. So far the game play is acceptable, just not anything to get excited about. It plays better than the original Halo but there is nothing that I can see that justifies it being a Vista only game.

Microsoft should have gone with a port of Gears of War, now THAT would have been very cool.

Screenshot taken from Microsoft’s Halo 2 for Vista website.

Adding Slimstat to WordPress

Slimstat thumbI run this web site as a hobby but I still like to have tools to check how the site is doing. Slimstat is a tool that I use because it captures things like search strings, referers, etc. It’s like Google analytics but more local.

For WordPress there is a useful plugin that adds Slimstat to the dashboard. My advice to people is to use the plugin as it is fire and forget.

I don’t listen to my own advice 🙂 so I prefer to add Slimstat outside of WordPress by adding a few lines to the wp-config.php like so:

// Jan added Slimstat
$ip_jan=$_SERVER['REMOTE_ADDR'];
$url_ref=@$_SERVER['HTTP_REFERER'];
if (($ip_jan != "24.46.186.255" ) or ($ip_jan != "64.233.178.136")) {
   if (!(preg_match("/translate.google.com/",$url_ref))) {
      @include_once( "/srv/www/slimstat/inc.stats.php" );
   }
}
/* That's all, stop editing! Happy blogging. */

I am not a programmer and my PHP is horrible. I add the code to wp-config.php because it gets included every time and I don’t have to modify the theme. Putting it there also means when I upgrade the theme or WordPress version it will get preserved from being overwritten.

I put the if statements in there because I want to exclude from logging website requests from a Google address and from my own IP address. I use Angsuman’s translator plugin and exclude anything that is refered from translator.google.com. If someone hits a web page with /post-slug/es/ (for the spanish version) then I want to see that URL and not the ones that the machine translator hit.

Setting up Slimstat is easy as pie. I put the slimstat on a HTTPS portion of my web page, used .htaccess to password protect the URL (for no real reason other than I can) and I get easy stats available to me without logging into WordPress.

WordPress 2.2 is out

WordPress 2.2 is out and has at least one really useful feature that I’ve already used.

I backup my blog software and database on a nightly schedule. The whole works, database and files gets copied to my backup server on a VPS.

Testing the backup is a pain since the database points to the real URL and hostname. Now with 2.2 you can override the site url and wordpress home with these two lines in your wp-config.php file:

define(‘WP_SITEURL’, ‘http://www.sample.com/wordpress’);
define(‘WP_HOME’, ‘http://www.sample.com’);

I created a new backup and restored it on my VPS server. I made that change to the wp-config.php file to point to the name and location of the backup server. Now all the links and administration work fine referencing the real hostname.

See http://codex.wordpress.org/Version_2.2 for more information. This feature lets you test your database on another server and play around without impacting your real blog.

Thunderbird Webmail Extension

I am a big user of freely available software. Here is a short list of what I use.

  1. Firefox – no brainer
  2. Paint.NET – Image editing
  3. WordPress – Server blog software
  4. Thunderbird – email

Thunderbird 2.0 now integrates with Vista. I like it because it’s a full fledged email client. In order to use it with web mail, you need to turn on POP3 with the mail provider. Google Mail supports this but with Yahoo and Hotmail you need to shell out some dollars.

With the Webmail extension for Thunderbird you can treat Yahoo, Hotmail, and a bunch of others as if they were a POP3 mailbox. The extension listens on localhost on a port that you can decide (defaults are POP3 at 110, SMTP at 25, and and IMAP at 143) and receives e-mail from the site for you. Thunderbird then connects to localhost to get the POP3 mail.

Webmail extension dialogOn my Vista system I could not use the port defaults. It’s probably due to Vista goofiness or the personal firewall software I use. I first installed the Webmail extension and changed the defaults to 8110 and 8025. Here is what the options dialog box looked like.

After that I installed the additional Yahoo and Hotmail extensions and configured them both for the BETA website versions. With the Web Mail extension installed in Thunderbird 2.0 you can now add Webmail accounts. These accounts are just POP3 mail accounts that happen to speak to localhost. I changed the account names to make them shorter. If all goes well you should have something like this added to your folders list.

Webmail folders

This also works in Thunderbird 1.5 (I tried it on my Ubuntu laptop) except 1.5 puts all the mail into one local folder. In the current version each account gets its own inbox.

Thanks to this extension I can now use Yahoo and Hotmail email with Thunderbird without setting up (read as: pay for) POP3 access. This is a neat solution and provides a shim to make web based email accessible via more common interfaces such as POP3.

Pidgin Windows Spellcheck

Last Update: Oh good grief. Pidgin spell check works fine and it was an aspell issue all along. The file aspell.exe needs to be in your PATH.

Install Pidgin 2.2.2 and make sure you install the language you need. That will kick off Aspell and the dictionary. Once the installation is done go to the control panel. In Vista it’s “System and Mantenance” then click on Advanced system settings.

Vista environment settings

Click on Environment Variables and modify the Path environment variable. BE CAREFUL not to mess up that settings as it could do bad things to your system.

When you edit the PATH variable, append to the end of it with a semicolon the path of your aspell.exe. On my system I added to the end “;C:Program Files (x86)Aspellbin”.

That’s all there is to it.

Spell check now works in Pidgin

This is probably documented somewhere but hey as long as it works…

Update: Spell check for Pidgin 2.2.2 (current as I type this) does not work on my installation. I believe the problem is that pidgin is looking for Aspellbin in the wrong directory but that’s just a guess on my part. If I can get it to work on my Vista 64 installation and reproduce it, I’ll post it here.

In order to get the Windows version of Pidgin spell check working, go to http://aspell.net/win32/ and get the full installer as well as the pre-compiled dictionary.

XHTML 1.0 Strict and WordPress themes

WordPress themes are usually either XHTML 1.0 Transitional or XHTML 1.0 Strict. The first line of the generated web page has the Document Type Definition (DTD) sent to the browser to define which.

My main theme that I use FastTrack, was defined as transitional. Just for kicks I changed it to strict and figured I would use the W3C validation service to identify what needed to be changed to make it validate.

I did not have to change much. The built in TinyMCE editor produces img tags that are not XHTML 1.0 Strict compliant. For example an image will have the tag defined as

<img src=”http://blog.dembowski.net/wp-content/costco-harmony-720.jpg” title=”Logitech Harmony 720″ alt=”Logitech Harmony 720″ align=”right” hspace=”5″ vspace=”5″ />

The attributes align, hspace, and vspace are valid XHTML 1.0 Transitional but not strict.

In order to make it valid for strict I had to lose those attributes. In strict this is valid:

<img src=”http://blog.dembowski.net/wp-content/costco-harmony-720.jpg” style=”margin: 5px; float: right” title=”Logitech Harmony 720″ alt=”Logitech Harmony 720″ />

The align attribute is not valid for <p> tag either, this requires another replacement with a style= statement.

In the theme I replaced one that was using <p align=”center”> with <p style=”text-align: center”>.

The last thing was to change strike through and underline. I used to put in the post via the code tab <strike>text</strike> which is not valid in strict. Neither is <u>underline</u>. I replaced that with <del>text</del> to have a line through the text and <ins>text</ins> to get underline.

I’m not particularly concerned about XHTML compliance. This and playing with CSS entries is just part of my learning and understanding how this all works.