Archive for January, 2006

And I’m Back

7 Comments

But from where you ask? From our yearly vacation to Lake Conjola (Lake Conjola 2005 #1, #2, #3). A great holiday, opportunity to catch some well missed sun and generally have a great time.

Of course, I have a whole bunch of photos to throw up to my Flickr account and a couple of stories to go with them, however that will happen sometime Wednesday or Thursday (Internet is capped to 64kbps).

Still catching up too - over the week, 1,758 emails were sent to @mybboard.com, and 400 to @surfionline.com. I also have to catch up on what’s been happening. Places like Neowin, Overclockers Australia, Digg, Del.icio.us, and Windows Live really help with that.

January 28th, 2006 7 Comments

MyBB: Development! Tally Ho!

17 Comments

So Peter and I were having this intelligent discussion on MSN Messenger discussing MyBB and how we could improve it. Peter was all like “Ooooooooooooppp” and I was like “Meeeeeeeeeh”. Then we were like “Weeeeeeeeeeeeeeeeeeee”. Okay, it didn’t really go like that at all.

Let’s face it; the code behind MyBB is crap. Well, a lot of it is crap. This is because MyBB has undergone numerous changes in coding standards and practices as well as development being underway in the past with no version control or collaboration tools in place.

Peter and I were actually discussing how we could improve the way MyBB performs validation on things such as threads, posts and users as well as the methods that MyBB uses when storing posts and other entities.

What we don’t have in MyBB is a standardised method for doing all of the above, code is repeated numerous times which makes it a pain when we’re adding in new features (or new database columns) to go back and make sure we updated other instances of the same, or similar code.

We wanted something to handle data. Enter data handlers. Data handlers will be our way of handling data in MyBB, as you may have already guessed. We’ll be developing several classes relating to different sections of the board (posting, poll voting and user account management) which deal with all of the different types of data that are used in them.

Think of it like a modular system for validation. Our validation classes extend upon an existing parent class called dataHandler. The dataHandler class provides standardised methods for setting and retrieving error messages. The validation classes, once extended upon the dataHandler then provide the actual methods for the type of validation we’ll be performing.

From validating new posts and registrations and determining what error messages to throw back to the user, right through to storing the actual post or user data in the database. Data handlers provide us with a standard API for storing information in MyBB as well as provide users with these APIs if they wish to easily extend upon them or use these features of MyBB in their existing projects.

Now, with our API in place (It’s not developed completely yet!), we’ll be able to do something like this to check if a new post is valid, if not then display the errors to the user, else insert the valid post into the database:

require_once "./inc/datahandlers/post.php";
$post_handler = new postHandler;
if(!$post_handler->validate_post(&$newpost))
{
	foreach($post_handler->get_errors() as $error)
	{
		echo "$error\\n";
	}
}
else
{
	$post_handler->insert_post(&$newpost);
}

Along side our validate and insert methods, we’re going to have a verify method which will simply return true or false if say, a subject is valid, a username is valid or an email address is valid.

We’ve prototyped our error handling class which will allow either single errors to be set or multiple errors at a time. Multiple errors is particularly useful on pages such as the registration page where we supply a list of errors with the registration details along side the registration form again - inline error messages. Single error functionality was added in for those pages where we need to completely halt without further processing when a certain error is found.

Of course, it isn’t only data handlers we have planned. There are a lot of things which can be handled in different ways (Hey! - stop thinking like that!). We’re also talking permission handlers, to determine if a specific user or the current user has the permissions required to perform an action such as edit an event, edit a post, or edit their profile.

At the moment, most of this functionality exists in a prototype class that Peter has developed and we have both reviewed and discussed. Nothing has been implemented as of now - there is still a lot of planning we have to do in regards to how this system will work and exactly how we’ll deal with some of the more tedious parts of the system.

In short, we have lots of things being undertaken with MyBB at the moment, a lot of rewrites, extensions in both front end and code functionality as well as a few more little secrets we’re not going to let out of the bag yet.

I knew there was a reason why I wanted Peter to work with us on MyBB!

January 6th, 2006 17 Comments

New Year, New Layout

23 Comments
SurfiOnline

You know how it works; you get tired of your old layout so you spend 2 months on and off trying to create something you would want to use. Once you finally hit the nail on the head and begin improving on what you’ve already designed, you get bored of it. You start again, only to find the same happening over and over.

Well, at least that is how it is for me. The number of times I created prototype layouts and threw them into WordPress over the last few months is just ridiculous. If I could find something I like, and stick with it, that is what I’d do.

That is what I did. I created something fairly quickly (as to not get bored of creating it), and decided i’d put it into place. Welcome to the new SurfiOnline, in a rather simplistic layout, but something I find is nice.

So, let’s take a look:

  • Peter Akkies kept telling me to lose the defined border look I go for. I think I sort of took his advice this time and ditched having a hard border between the body and the container. Although, the items on the sidebar do have borders around them.. Oh well.
  • Liquid width layouts are cool. Zoomable Liquid width layouts are so Web 2.0. I had to have them. If you’re in Firefox, change the text size and the layout width also changes. Sadly, Internet Explorer users are stuck at a fixed width layout.
  • How else could you get more Web 2.0, than using Ajax. I decided I’d hack up the Ajax commmenting plugin and pretty much rewrote it to include previews, and better error handling.
  • RSS Feeds and Content Syndication are also soooo Web 2.0, that I had to make sure they were mentioned in as many places as possible. You’ll see more of the little feed icons popping up soon too.
  • I found a few “Quote this comment” plugins for WordPress, however they were all pretty dodgy and I didn’t like the way they worked. I decided I’d write my own.
  • The FamFamFam Silk icons are cool. I decided I’d use them in a few places. Now I see Michael has done the same with K2!
  • It was time for a logo. I was getting bored with just using text in my header, or text on an image with a drop shadow and stroke applied. I came up with something simple, which I find looks nice.

So, just where the hell have you been?

The short answer is: really busy. In fact, too busy to even wish everyone a Merry Christmas! I hope you had a great one, mine was!

The new year is upon us..

Well, maybe me because I’m GMT +10:00. What does a new year bring for SurfiOnline? Hopefully a whole lot more in terms of activity, updates and design. I’ll be trying to get things as finished as possible given that I have time.

And MyBB you ask? Alot of things are happening. Peter, Dennis and I have been having a few branstorming sessions on things we’re going to add, the team and I have rewritten a fair deal of code, optimised things, and added a few new small features (we’re trying to concentrate on optimisation and code cleanups). You’ll hear more about a lot of this soon!

Happy New Year! and welcome to 2006!

January 1st, 2006 23 Comments