MOD Author's Convention August 2008

Introduction

I would like to start out by addressing much of the feedback and suggestions we've been receiving since Paul's blog post on MOD Author feedback. Thanks to ..::Frans::.. for starting such a lengthy discussion.

As many of you know, the MOD Team is highly interested in the feedback from our MOD Community, both it's users as well as the MOD Authors. Especially the MOD Authors, as you are our driving force behind the phpBB MOD Industry. So we take all of your suggestions seriously.

Many discussions from the blog post have resulted in some changes in the way the validation process works, from Validation, to the MOD Database, and the future MOD Database. Subscribing to MODs to stay informed of updates is one of those features that was requested that Paul graciously implemented. We are working on some documentation what will help MOD Authors understand the Validation process better

We will be publishing a page soon that will list everything a MOD Validator looks for when validating the MODs as best as could be written down... the entire validation process is very extensive, so it's difficult to contain it all in a single page and still make it worthwhile to read.

From here forward, major MOD Team Announcements will be posted in the Announcement forums instead of hiding in the MOD Writers Discussion forums. i.e. such as new releases to MODX or Packaging Guidelines. Many of you probably noticed an increase in the number of MOD Related announcements recently. One goal we have is to increase the communication quality and quantity between the MOD Authors and the MOD Team and make the Validation process a bit more transparent as well.

Tell us about the MODs in Development Forum
That forum will NOT be policed in such a way that we validate MODs within it. Of course, rules must be applied, but we (the MOD Team) do not, and will not test MODs in that forum, we do not do any pre-validation process. That is up to the MOD Author and the users that download the MODs from that forum. To get a MOD validated, one must submit to the db to be validated.

MODX

What is something you the MOD Authors would like to see.
A more automated process on generating MODX files. Give a script a patch or have it run a diff and it automatically generates a .zip file for a MOD. Possibly a desktop application that does this.

Modding for phpBB3

Compatibility

Best practices, what do we mean when we say that? It's not about how you code. Lets say you are creating a MOD, your goal should be to make that MOD have the LEAST amount of core code (phpBB3 default files) edits. Acyd Burn's Attachment Mod for phpBB2 is a very good example of this because it had very few edits to the core files.

One method you could do is include and file and then call functions where ever you need to add the funcationality of your MOD. This is not always possible.

You should be including files with functions and not having the user edit in huge blocks of code or functions, or classes into phpBB3 core files. Keep everything as simple as possible, and you will achieve two objectives:

1) you will make it easy for yourself to update the MOD, now if you release an update for your MOD, your user should simply replace the files, whereas if you edit in a bunch of code, you have to make them edit it again with your updates. That is never preferred... replacing files is always a much better method of updating.

2) you will make it easier for the user to update their board to the next version of phpBB. This is call compatibility.

Scalability

Scalability is coding in such a way that it is easily expandable and so that it can handle higher traffic loads. That way your code will last for years instead of months. Scalability is tied in quite a bit with optimisation and performance. So how can you code in such a way to ensure scalability? ... well, and this again, is tied in with optimisations. For example: adding SQL Queries to loops is BIG NO NO. Why? well, the bigger the loop gets, the more queries you will be running. It becomes a problem when you have 300 queries for every page load. With a couple users it is fine but imagine 50 or even 5,000 users on your site at the same time

Security

The first thing to do as a MOD Author is to make yourself aware of the security within phpBB, that is XSS (Cross-site scripting), CSRF (Cross-site request forgery), and SQL Injection. All of these are surprisingly simple to prevent, but you as a MOD Author must first educate yourself on what they are and how they work. Only then can you become better at ensuring you code in such a way to prevent these types of attacks. You can never be to sure or too safe. You can never believe that you code perfectly securly.

First, SQL Injection, one of the easiest things to prevent against. What is it? according to Wikpedia: SQL injection is a technique that exploits a security vulnerability occurring in the database layer of an application. The vulnerability is present when user input is either incorrectly filtered for string literal escape characters embedded in SQL statements or user input is not strongly typed and thereby unexpectedly executed. To prevent SQL injection you need to know how to use request_var and dbal::sql_escape correctly.

Coding Guidelines

The coding guidelines should be followed to ensure easy readability of code and everything is consistent.

Are there any specific things I need to do for UTF-8 compatiblity in my MODs?
1) use the third parameter of request_var for strings ... request_var('foo', '', true)
2) use utf8_normalize_nfc() on strings
Normally the two are done together like this
$foo = utf8_normalize_nfc(request_var('foo', '', true));

MOD Database

What is the number one reason MODs are denied?
"It doesn't work", yes, that's right... the number one reason a MOD is denied since the release of MODX 1.2 is because the MOD simply does not work ...

The hope is that between the MPV and the Validation checklist, MOD Authors can do a "self-check" prior to submitted the MOD to the MOD Database.
What is MPV?
MPV is an automated pre-validator that can catch things that humans miss. So is Blinky a pre-validator for the install instructions to catch things that we might miss. Blinky is like EasyMOD but for phpBB3 and will automatically install MODs. It is currently in development.
Is it possible to have the total number of mods in the queue on the queue stats page?
Possible yes but we may not do it. We have to think about will it really provide MOD Authors with useful information or will it cause us more problems. Authors may PM us with messages such as "the MOD queue only has x MODs in it, and its been x-amout of time. when is my MOD going to be approved?" or "the queue has 5 gazillion MODs in it, you need to do your jobs and validate!"
Would it also be possible in the future to have mods that are denied to have ALL the reasons it was denied listed? I mean I had to wait several times just to find out there was other things that weren't correct.
The idea is to list everything the MOD was denied for. But for example, if your MOD was insta-denied, it will only list the reason it was insta-denied. If there are already a lot of things that the validator found, he may deny the MOD and list those things. The MOD Author may fix those, submit it again, and the validators continue looking through the MOD from that point, listing things they find.

Many times there are things that are simply not fixed, lets say for example, I find a missing IN_PHPBB check in a file, I may report that, but it'd be your (the MOD Author's) responsibility to ensure it's in all the necessary files... I might find it again in another file.

The validators are human and won't catch everything the first look through.
Is it possible to request certain people to validate a MOD?
No. All validators follow the same rules and the more eyes looking at a MOD the better.

Future

Wordpress for example has hosted SVN for plugins, will phpBB's MOD DB also have one?
It's possible. Not any time soon though.
Is there any likyhood that there will be changes to the moddb similar to the styles db where you can have a number of days to update problems in a mod? I know that the styles issue is to do with version changes.
There are currently no plan