Spam Protection

As a side point, I really, really, really need to get CAPTCHA for the blog comment posting.

Sure, the existing spam protection prevents spam comments from being visible. The stupid spammers can never figure out that gobs of links give away the fact that it’s spam.

Or I could use a spam service like Akismet. Either Akismet or Nio’s Anti Spam Image plugin is what it shall be.

UPDATE: Okay, and when it’s all said and done, I went with Spam Karma 2. They seemed pretty good. We’ll see how things turn out.

A New Site Design

In a continuation of the first few steps to improve and expand my website, I have selected, implemented, and partially tweaked a new design that will meet my needs in the future as well as satisfy my desire for the coolness factor. :-)

What was the main motivation for the new site design? Microsoft IE 7. Thanks Microsoft, your new browser completely choked on my old WordPress theme. It’s for the better, though, because it moved me to action, and this new design is awesome!

I came this close to dropping WordPress and going with BlogCFC. Not so much out of a dislike for WordPress, but due to discomfort with PHP and WordPress templates in general, compared to thorough knowledge of ColdFusion. Alas, I stuck with WordPress for a few reasons: (a) It forces me to tinker a bit with PHP. It’s a good thing. (b) WordPress has a billion themes, and I’m picky at how my site looks. (c) BlogCFC just feels a bit too plain sometimes. This is not an insult to Ray’s fine work.

So here I am, with a fine theme called “Scary Little” by The Scary Little Monkey. It features some fun JavaScript effects, a great stylish look, and let’s not miss the AJAX-driven search, which is great fun!

I’ve tweaked it a bit to include my tags (aka categories) in the menu navigation and to make pages (not blog entries, but the CMS pages) fill the whole site width, with no side menu.

Future tweaks I hope to get to: (a) A new header graphic that is flash-driven to incorporate just a tad of stylish animation, perhaps even an occasional image change; (b) Tabs at the top of the header, for moving between the different major website sections (I’ll expound in a moment); (c) Either a better editor or tweak the default editor.

The site will be expanding. It is not going to be just a blog. Some ideas I have for expansion (probably about in order of seriousness): (a) A front-end site for my freelance development work; (b) A Trac-driven projects page, to be used with my freelance work; (c) Finally set up my “Land of Nazin” story blog! (d) An Apple Computer history wiki site. Yes, I know there are some out there, but I want to make one that is really nice. After all, I’d enjoy the process of making it since I enjoy reading about it.

Stay tuned!

Oh, the Irony

The irony of it all has me cracking up. After waiting weeks for my 404 article to get put on CFDJ, it gets printed just shortly after my hosting company moves my account to a new server…and forgot to migrate my existing custom error handler settings. So I had an article about 404 forwarding with examples that came up with 404 errors.

All is well now. Heh. Heaven forbid I have a moment of pride without a humbling moment immediately thereafter.

The Mysterious Vanishing WordPress Posts

Three of my recent posts from August 2006 have been mysteriously cut off at the knees (two articles about SELinux and one article about Apple releasing the Mac Pro). The first opening sentences remained, but then mid-sentence at a variant length, the article body was truncated. One of the posts was particularly lengthy, and naturally I didn’t have a backup of the article in any fashion. That is extremely disappointing.

To prevent the lamentable agony of this kind of loss, I could: (a) Set up a WordPress scheduled task (with plugins that provide such functionality) to backup the database on a regular basis, or (b) I could backup the database manually after I post an article. As a different approach, and the most fun because it involves programming, (c) I could set up a scheduled task on my server at home to pull the RSS feed from my site on a daily basis and save that.

My server at home is a Linux box (currently Fedora Core 4), so a quick little Linux script is the best way to go. This is exceptionally easy, so let’s take a look:

fn=/backuppath/rss/nazin-`date –iso-8601=date`.xml
url=http://blog.nazin.com/index.php/feed/
curl -o $fn $url

This obviously could be a one-liner, but to dumb it down, I put the backup file path and the URL of the RSS feed in script variables. The first line says, “Make the path inside the rss directory (relative to the location the script is ran from), with a file called ‘nazin-yyyy-mm-dd.rss’, using today’s date.” If you are new to Linux scripting, anything wrapped in ` symbols will be processed and replaced with its output. So “nazin-`date –iso-8601=date`.rss” will actually become “nazin-2006-09-07.rss” if that is today’s date. The second line obviously just assigns the value of the url variable. The third line is then a basic curl call. It says, “Go browse the $url and put the output in the file at $fn.”

I then just set up that script to run as a scheduled Cron job, and we’re in business! A quick note about the path: You can leave it as a relative path, and the script will work fine when you execute it at a shell prompt, but it may fail as a Cron job. To be safe, provide an absolute path so that it works at both places.
Don’t leave backups to humans. We’re too unreliable. Leave it to your server to handle. :-)

  Theme Brought to you by Directory Journal and Elegant Directory.