Home

About This Blog

My Portfolio





Browse by Category

Mundane, Video Games, Football, Ranting, Programing, Design, Boring,


Select by Date


2010-03-01
2010-02-26
2010-01-27
2009-12-04
2009-11-20
2009-10-17
2009-09-27
2009-09-26
2009-09-15
2009-09-13
2009-09-05
2009-09-04

Title



About this Blog


This is a blog created initially just for me to practice PHP & SQL in, it was later greatley expanded as a project for my MIS424 class at WWU in 2009.

This blog doesn't use WordPress or any similar technology, instead it was created by me from the bottom up. I did use other people's code for some of the parts including:
I will explain here breifly how the page is setup and works.

The Main Page
The posts and comments are all stored in a MySQL database, on the main page the posts are drawn from the database and displayed depending on what parameters the user entered in. The parameters include: the post's date, its category or its postID.

The Menu
There is a php include file that contains the lefthand menu as well as alot of the code that would be redundant to put on multiple pages. In the left hand menu There is a category cloud that selects all the categories used in any of the previous posts and sizes the font according to how many times that category has been used, clicking on a category will show all previous posts under that category.

Below that is simply a list of dates that a blog post has been made on, drawn dynamically from the database. Clicking on any date will take you to blog posts made on that date.

The Comment System
The comments system is a HTML form that uses SQL & PHP to write the information inputed into the comment database, but not before being confirmed by the CAPTCHA. The user can either enter a name or select 'connect with facebook' to use their Facebook name. Once in the database the main page reads how many comments exist for any paticular post and displays the number of comments below the post. Clicking on that link will display a list off previous comments made on that post underneath the post itself. All HTML tags are stripped out of comments.

Writing a Post
Writing a blog post is done on a seperate page located here, there is no link to the page on the main page except for obviously right here in the About the Blog page. Here you enter the title and the main content of the blog in addition to a password. The password required is hardcoded in. If the password fails the page is redirected back to the page and lets you know the password was incorrect but retains the content of the forms through cookies and querystring. If the password is correct the post will be written to the database and redirected to the main page of the blog. HTML tags are stripped out of the title but are left in the post itself, HTML line breaks are subsituted with the br tag before the post is put in the database.

Other Nonsense