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

6th March 2007 23:55:10 GMT
Captchas have been added to the sign up page, and to the guestbook.  I was hoping to avoid this but there really is no better way to avoid the spam.

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.
28th December 2006 03:26:02 GMT
The client-side data validation has finally been put back.  It differs from that of the old site as it uses regular expressions to parse e-mail addresses, numeric values, non-special values, and username/passwords.

Check it out...

if(!value.match(/^[-'.0-9A-Z_a-z]+@[-0-9A-Z_a-z]+\.[-.0-9A-Z_a-z]+$/))
    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.
12th November 2006 02:44:30 GMT
I've finally put the font-sizing option back into the rich text.  A complete list of formatting tags can be found here (*note: this opens in a new window).

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:

/images/valid-xhtml11.gif
8th November 2006 06:26:56 GMT
The menu on the left now shows the top 5 most active threads in the forums.  Activity is calculated as the average date/time of all that thread's posts.

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
8th November 2006 00:13:08 GMT
The Settings page is now up allowing users to change/remove their e-mail address, forum avatar and forum signature.

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.
6th November 2006 04:00:48 GMT
Filtering spam from the guestbook has been rewritten.  Instead of banning the IP address of the spammer, admins can select URLs and words longer than six characters from the text to add to a banned list.

If you wish to sign the guestbook steer clear of porn and pharmacological terminology and you should be okay!
24th October 2006 23:29:49 GMT
The new site finally goes live!

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.
1st April 2006 21:58:40 GMT
Spam blocking update!

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.
24th December 2005 01:33:54 GMT
Update alert!

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.

http://www.robertdhall.com/images/guestbook.gif

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.
18th September 2005 01:06:19 GMT
I've finally got the blogs database calls down to just one, and here is the SQL...

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.

Valid XHTML 1.1 Strict Valid CSS