WordPress and Permalinks

If you haven’t ever used WordPress for your website or blog, you don’t know what you are missing. I have used almost every CMS out there, including PHP-Nuke, Post-Nuke, e107, PHPWebsite, CPG to just name a few of the more popular ones. However, once WordPress got past the 2.0 versions, it was all over. I love the WordPress platform and use it for many different websites that I manage. I do sometimes run something other than WordPress if I have some specific need that something else does better, but for a good, solid blog and/or website platform I find it hard to beat WordPress.

That being said, one thing I have seen people have trouble with is Permalinks. This is when you change the link structure from the default style like this:

http://example.com/?page_id=N

to something more visually appealing like this:

http://example.com/category/post-name/

or

http://example.com/year/month/day/post-name

The friendly Permalink option is not only easier on your visitors, but it’s easier for search engines as well to index your site. That means that setting Permalinks to something friendly is a good idea on many fronts. You can set the Permalink style in the WordPress admin panel under Options. However, when you do that you also have to update your .htaccess file (on Apache) in order to process the links properly. I have included below a nice .htaccess snippet that you can drop in to get your Permalinks working, check it out:

# BEGIN WordPress Permalink Rules
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress Permalink Rules

I hope that will help in your Permalink adventures!

Website Design Tips or Things Not To Do

Ok folks, I have decided to toss out some general tips for those of you who consider yourselves website designers. I have been seeing lots of poorly designed sites out there, and it has frustrated me enough that I have to mention a few of the top offenses. Read this and take heed, you might think you are cool and a super leet rumpshakin pimp webmaster dude but, you’re not. Follow me:

  • Keep your audience in mind. Don’t forget that you are writing a website for a wide variety of users, not a small minority. Sites that don’t render in anything but IE and have the little button “Best Viewed in Internet Exporer” drive me insane, and in fact I won’t do business with sites like that. Most of what I am going to talk about in this post centers around this main issue.
  • DON’T BASE THE WHOLE SITE ON JAVA-FREAKIN-SCRIPT! Did I make myself clear? I can’t tell you how many sites I have found that not only don’t have any navigation links without Javascript enabled, but won’t render at all without it. Here’s a clue, if I just described your website, you are a moron. Javascript is great, but it’s also dependent on the browser again which means you can’t rely on it for critical things like navigation (if that’s the only navigation), rendering the site in the first place, form input validation (duh!), etc. Anyone who uses it for form input validation is crazy, you don’t trust that to something that can be manipulated on the client side … HELLOOO?!
  • DON’T BASE THE WHOLE SITE ON FLASH! Did I stutter? Not only does it take way too long to load, especially for people on dial-up (yes, people are still using dial-up, in fact, the majority of web surfers still do), but we run into that whole client side thing again. Don’t alienate people because they don’t have the right plugin, I don’t care how widespread you think it is. I know, you are thinking that it’s only 5 or 10 percent of the visitors, but why throw away that many opportunities? Come on man, get with it.
  • Don’t over do it with the gadgets. Yes, fly up pop out whirl around shout at you menus are cute, but they detract from the whole purpose of your site, to convey whatever information you have to the visitor. Now, if you have no content maybe you should have all that stuff.
  • The same goes for too many graphics. Load that page up with too many pics and you are back to having it take too long to load and people getting fed up and moving on. From the research that I have read, you have about four seconds to get the page loaded and grab a visitors attention before you have lost them. Think about how fast you yourself move on when surfing. Uh huh, see?

I think that’s enough for now, it’s a good start anyway. At the very least you should get an idea of where I am going. Keep your sites clean, simple and easy to navigate. Great designs are fine and well, great even, but do it right!

Cool Keyboard Shortcuts For Windows

I have been checking out ways to do things easier and faster, plus just plain get around faster in Windows. I have been putting together a list of shortcuts that are handy to have and I thought I would share them with everyone! As I find more I’ll be adding to the list, so check it now and then. For now I have a pretty good start I think, so go take a look

New Computer Goodness From Alienware

Alienware ComputerWell folks, I thought I would share some good stuff that is happening on my end of the ‘net. After using my last computer for about 3 1/2 years, I decided it was time to upgrade. This is no small task for me, mainly because I am picky as hell but what can I say. For starters, I have always built my computers, again because I am picky and I want them my way. I have been doing this for more than a decade and this time I wanted to simply buy one. This meant that I had to do a lot of research to find a good quality machine that was going to live up to my expectations and also not break the bank. After lots of reading and digging I finally settled on Alienware. Now, Alienware has always had a reputation for building top notch machines and I must confess I have always wanted one. Even though the HP Blackbird looked like a mighty fine machine, I just couldn’t justify the cost. That plus did I mention I really wanted an Alienware???

Continue reading

MySQL Error Handler For PHP

Anyone that works with MySQL and PHP knows that it’s a good idea to trap and handle errors as a part of making calls to the database. I have seen folk that do it in many different ways, and some that don’t do it at all. It’s a real handy thing to do, especially in the early phases of development. If there is a problem somewhere in your code, good feedback from the application can make troubleshooting much easier. I tend to write functions that make life easier, put them all into a file and then reference that from my pages that actually do the work. In this case, I have a function that will catch and return MySQL errors, along with the query so you can see what is going wrong. First I will show you the function, and then I will show you some usage examples.

Continue reading

New Stuff

Well, it seems we finally have a good code syntax highlighting plugin (Yeah!), so now I can post code in the actual posts without sending everyone to the forums.  Not that going to the forums is a bad thing, it’s not I assure you, in fact why don’t you head over there right now and get some chit chat discussions going!  Anyway, back to the topic at hand.  I am going to start posting more code in posts marked with the category “Codebank” and whatever language it refers to.  I think this will be a good place for me to store some code and have it readily available, plus it will be a good way for me to share it with all of you fine folk.  If you have some code or scripts that are burning a hole in your disk drive and you are just itching to share them, send it on and I might just add it to the Codebank.