Welcome…
Welcome to Rob Hall Online, I am Rob Hall and this is my website.
It was originally designed as a demonstration of my web-development skills for the benefit of potential employers, but I like to think the site has become much more.
The site features a blog, guestbook, chatroom, forum, tutorials, and code samples, all written from scratch by me.
Anyone can view the blog, view/sign the guestbook, view the chatroom, forums, tutorials, and code samples, but only registered users can post chat messages, and add forums threads / posts. Registering requires only a unique name and a password, after which you're automatically redirected back to the page you came from (or the home page if that fails), only now you have a couple more features.
So enjoy yourself, laugh at my poor design skills, and sign the guestbook!
Blog
This also meant that I could remove another table from the database, bringing the total down to five.
The tables are now: user, item, log, level and chat.
Level is a list of those Archangel/1B and Seraphic/8X things you sometimes see at the bottom of pages. I "borrowed" them from Deus Ex just because I thought they sounded cool.
Log records site activity, and chat is only used by chat room, so the site really uses just two tables: item and user.
Check it out...
return "* " + title + " must be a valid e-mail address.";
The client-side and server-side data validation code is now almost identical. When writing a page the author has only to describe the data once and the data is parsed both before and after it's submitted automatically.
The menu on the left has also been altered slightly to make it stand out more, and the image at the top has been renamed from banner.gif to logo.gif because the Firefox plug-in Adblock Plus was blocking images with "banner" in the name.
Finally, the AJAX chatroom is up. It's not quite finished - the red box on the right will one day list active users.
Messages are pulled from the database as XML by calling the chatMessages.php file. This gets the 100 most recent messages less than a day old.
Text can now be really small, small, regular, big and really big.
This was removed because of the XHTML v1.1 standard not allowing <font> tags. Previously [size=n][/size] was translated into <font size="n"></font> by the rich-text parsing code. The new code uses <span style="font-size: n%;"> instead, with 60%, 80%, 100%, 140% and 180% used for the five values.
And now the whole site is XHTML v1.1 compliant as can be seen by clicking this button or the one in the lower-right of each page:
I had to get a bit creative with the SQL since the AVG() function doesn't work with datetimes. Below is the part of the query that calculates post activity:
AVG((YEAR(post.dateTime) * 365.25) + (MONTH(post.dateTime) * 12) + DAY(post.dateTime)) AS averageDateTime
The User Info is also up giving details of a user's avatar/signature, and what threads and forums they've started/contributed to.
Clicking Links or Code Samples from the menu on the left shows an overview page of the links and code samples. All screenshots were taken using IE7 running under XP Home. I considered making some of the samples thumbnails Firefox running under Linux just to prove that I can write cross-browser JavaScript.
If you wish to sign the guestbook steer clear of porn and pharmacological terminology and you should be okay!
It's similar to the old except some major changes behind the scenes. The forums, threads, posts, guestbook, and blogs tables have been replace by one table: item.
Items are infinitely hierarchical, meaning that specific posts can commented on, along with specific guestbook and blog entries.
All users, blog entries, forums, threads and posts have been migrated from the old system. The guestbook should follow suit soon.
Hopefully, soon I'll have a few tutorials up explaining changes I've made and why I've made them.
The IP address blocking code has been improved (i.e. it now works!), and any links in the message body have their domain added to a banned list.
If, when a message is posted, one of its links is detected as spam, all of that message's links are added to the banned list.
Thanks to some enterprising individuals seeking free advertising, a banning feature has been added to the guestbook.
Available to admins only, clicking the left-most icon removes the offending entry and adds the author's IP address to a banned list.
Furthermore, additions to the guestbook must originate from the guestbook page. I'm rather proud of the software that tests for this. Check it out...
$referrer = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : null;
if(preg_replace("/^http://[-.0-9A-Z_a-z]+(.*?)/", "\\1", $referrer) == $_SERVER['PHP_SELF'])
{
...
}
I don't think I've ever seen a domain name with an underscore, but it's there anyway.
SELECT blogs.*, threads.id, COUNT(posts.id)-1
FROM blogs
LEFT JOIN threads ON blogs.date = threads.date AND threads.title LIKE 'Blog Entry for %'
LEFT JOIN posts ON threads.id = posts.threadId
GROUP BY blogs.date
ORDER BY blogs.date DESC
LIMIT $blogOffset, 10;
Before today, each blog entry had another SQL statement to determine the number of comments made, making eleven database calls in total. Now there's just one.
I understand that joining a blog and forum together in this manner isn't terribly robust. Using the date (accurate to only one second) and that the thread's title starts with "Blog Entry for", will have to do until I can come up with something better.
Add Blog Entry
You must be Domination/5F or greater to add blog entries.