Your premium source for custom modification services for phpBB

HomeForumsBlogMOD ManagerFAQSearchRegisterLogin

Comments September 19, 2006

How long does it take to write a MOD?

Filed under: MOD Writing, phpBB — Dave Rathbun @ 9:22 am CommentsComments (0) 

The classic answer: It depends. :-D All joking aside, writing a MOD generally takes a minimum of two hours, even for a very simple MOD. Okay, an extremely simple MOD might take a few minutes, at best. But most functional MODs that I write take a minimum of two to three hours. Why?

Mainly because of the environment that you have to work with if you want to ever release the MOD at phpbb.com or anywhere else. In order to do that, you have to provide detailed documentation on how to install your MOD, and that means recording each and every step that you do.

It means having to take all of your text messages and putting them into a language file, either one of the standard ones provided with phpBB or one of your own.

It means creating a “clean” phpBB board and testing your install instructions.

Case in point: the latest MOD that I released in BETA: Memberlist Controls (ACP). This MOD requires an admin control panel page, which also requires a template. Not too hard, normally. But in this case I decided I wanted to also try something new. You see, many MODs (mine or others) will store configuration data in the phpbb_config table. The MOD will then provide update instructions for the admin_board.php code, as that is the page used to edit the values stored in that table.

There’s one problem with that… if the admin_board.php code doesn’t find the value already in the database, then you cannot edit it. :shock: So that’s a bit of a bummer. It’s not the end of the world, really, all you have to do is write a few SQL insert statements as part of your MOD installation routine, and you’re done.

But I wanted to be different. :-) So I wrote the code so that it fails gracefully back to an “insert” in the event that the rows are not found. So that meant keeping track of what should be there, and reacting to what is already there in an appropriate fashion. The results came out nice, and I think I’ll be able to use the same logic for other screens, so the time was well spent.

The rest of the coding was simple, really. I edited the memberlist so that it referenced the configuration controls that I created. I edited includes/functions.php to do the same thing. And of course there are the language file edits, along with a minor template update for the memberlist output.

Total time so far: 3 hours. :-)

No Comments »

No comments yet.

RSS feed for comments on this post.

Leave a comment

Tags allowed in comments:
<a href="" title=""> <acronym title=""> <blockquote cite=""> <code> <strong> <em> <u> <sup> <sub> <strike>

Confirm submission by clicking only the marked checkbox:


Powered by WordPress