2007-04-15 18:36
PHP is Fun
In the past few days I have been putting a lot of effort into modernizing my site structure, and making it easily changeable in the future. I started out by entering all of my past posts into a table in a mysql database - then I wrote a sort of template with PHP that builds each blog entry when it is viewed, based solely off of the filename. This way I will be able to change the look and feel of the site without having to change a bunch of individual pages. I of course have been meaning to do this since starting this project, because the longer you wait the more work it is later on. Up until this point I was building each html page individually, and updating them as needed - now PHP can do all of the work. I also received a response from my host, they have turned on PHP parsing on HTML documents - which means all of my URLs don't have to change. Of course, I am not done yet - and that's why this post is still being posted in the old way, but I hope that it will be one of the last I do in this manner. I also haven't forgotten about the comments project I started a few days ago - that's really what got me going on all of this in the first place. I have been working on these other improvements as a companion to the comments - so once both are done they will be rolled out together. The database also gives me the luxury to code my index page to automatically query the database and retrieve the latest entries for display, instead of having to update it automatically. For now I have been entering database data manually, but once I finish with the commenting code I will be experienced enough to move up one level of abstraction, and write a "post a new blog entry" page that does all of the behind the scenes details for me. It seems that one thing prompts another, and this whole "build your own blog software" project is falling into place - the improvements and changes might not be readily visible to someone visiting my site, but they make it a hell of a lot easier to post an entry.
- Kevin
Kevin (at) Upcsite (dot) Net
If you enjoyed this post, Please consider subscribing to my full-post feed, or subscribing to receive my posts by email. Have anything to say? I love feedback on my posts, so feel free to leave a comment below.
Related Entries:
- PHP Comment Program for Download (2007-04-20)
- Database Driven Content and School (2007-04-18)
- A New Project: PHP Commenting (2007-04-12)
Comments:
I think the commenting feature is done! If you happen to see this, feel free to post a comment and test it out.
Posted by: Kevin | 2007-04-16 2:47:56
A great site and very intereting. I like the abstracts leading to the article and the lay out. Cool.
Visit Alex today and discover the true, heart warming story of faith and prayers. http://alex-roadtofreedom.blogspot.com
Posted by: Rod | 2007-04-16 10:46:32
This is a blog for the times man. I have been a reader since day 1 and i must say i am disappointed with the lack of cat related articles of late
Posted by: Butts | 2007-04-16 23:08:36
Post A Comment:
