January 5, 2009
Wow, two entreies right after the other.
It's 1:58 AM as I'm writing this, and I just finished converting my entire blog from HTML to PHP just so the links on the right are easier to manage.
Yes, I am just that compulsive in order to make myself lazier later on. It was a good excercise though. Before this, I thought PHP was an entirely different language altogether. I'm very glad to see that I was able to just edit some parts, Save As a .PHP file and call it good.
Now, for the juicy part of what I actually did in this upgrade to make it so much better:
First off, I'm going to assume you know a bit about HTML. If not, then this probably won't make any sense at all until the very end where I reveal something amazing.
In the beginning, my blog was a mess of HTML, CSS, DIV tags, and whatever else. It looked something like this:
http://pastebin.com/f57fbb917
After the switch to PHP, it now looks more like this:
http://pastebin.com/f3de5889
With a separate .php file containing:
http://pastebin.com/f13936d71
Doing this, I'm able to drop 44 lines of code from EVERY page, as well as let me edit only one page to change the links that appear to the right on every page. Not only is this a more efficient way in terms of file sizes, but also in time management. Now for the moment of truth... Time to upload the site and hope it all works perfectly on the first try.
-tk