Blog

The Teal Troopers – The Website Team: Past, Present, and Future

Posted by Sam in Website with the tags , , on January 15th, 2012

Up until recently, the Website Team was a sleepy team within phpBB that acquired team members from other teams and worked behind closed doors in order to ensure the full operation of the website. It is a team that is not very well publicized nor is really known what exactly we do. It has had its lows and even fewer highs, but now the need is too great to keep our operation small and closed.

The past

This historically small team has been known to take current phpBB team members in prior to their departure, during a time where it is not easy for them to contribute much at all. General website maintenance fell to the team’s themselves, each of them taking care of their patron area of the website. While this worked for a while, it has caused more issues than it was worth. Our website is inundated with duplicate CSS, inefficiency in JavaScript, and general chaos in the backend code.

The present

During the past year, the website team has been making the transition from a sleepy team who takes care of few things to a more active team that handles day-to-day maintenance and testing prior to deployment of the website.

We’ve picked a few members and lost many. This is mainly due with the fact that this is only team where it is impossible to get help directly from the community because it’s an internal codebase. It may not have been very noticeable, but any team member the website team picked up was formerly on another team within phpBB.

The future

Currently, we have serveral maintenance projects we are overseeing and one very large project that’s early in development. Unfortunately, we are not in a position to announce these at the moment. I do think it is worth mentioning though, for we are eventually looking to adopt a more open model, even going so far as to release some new code we’re writing on github in an effort to pick up contributors.

To do so, however, we’ll need some help. The future of phpBB.com is a blank slate–and we’re looking for designers, programmers, and other individuals with skills who can help draft the slate into a reality. If you’d like to help out, and have the time and ability to do so, please contact Sam with samples of your work (P.S. being active on the forums on phpbb.com and Area51 are a huge plus). This is your opportunity to make an impact on the phpBB project for users, developers, team members, and more.

How you can aid development

Posted by igorw in Development on January 11th, 2012

Since we opened up development and moved our code onto GitHub, we’ve received several contributions. It allowed a number of non-development team members to contribute. We have been listing these contributors in the 3.0 release announcements, and you can also see them on the area51 contributors page.

However, I think we can do better. And this is why I want to reach out to the modding community. We have limited ressources and we need your help.

Contribute patches

The bug tracker is filled with bug reports. You may have reported a few bugs yourself. There’s so many, it’s likely that a large amount will never get fixed.

This is your chance. If you ran into a bug that really bugs you (pun absolutely intended), now is the time to fix it. If you’ve interacted with the MODding community, maybe by submitting some MODs to the cusomisation database, you should already be somewhat familiar with the phpBB code base and its coding guidelines.

Creating a patch is like creating a MOD. Except you don’t have to write a MODX file. Instead you can have a diff generated for you or just use git to manage the changes.

Once you are done with your patch, you can either attach a patch file to the ticket, or you can be awesome and create a pull request on GitHub. Pull requests make it easier for us to read, discuss, and test your patch. For this reason it will likely be merged faster.

Review pull requests

Pull requests are patches awaiting review. Most of the time they will be from developers. That’s right: every change to the phpBB code base needs to be reviewed by another developer. This allows us to catch problems early, and distribute the blame when something goes wrong.

There is a list of open pull requests that are waiting to be merged. Some of them already have comments, while others have not been reviewed yet.

Reviewing these is a lot of work. But you can help! If you know the phpBB code base well, you can help by checking the diffs and making sure no new problems are being introduced. Be sure to comment with your opinion; even simply saying “looks good” is helpful because it shows that someone has reviewed the patch.

The other thing you can do is test pull requests. Reviewing is nice and dandy, but testing allows you to see if things are really working. And this is very similar to testing MODs. So if you are a MOD author or maybe even a junior MOD validator, this process should be fairly familiar to you. The only difference is that everyone will be watching you.

Git

We use git for version control. This may be intimidating to lots of you, but for development there is really no way around it. It is a great tool, and I encourage anyone who writes code to learn how to use it.

You will first need to fork the phpbb3 repository. Then you will need it to create a branch on your fork for your change. When you have finished your patch, push to your fork on GitHub and submit a pull request. You can also checkout someone else’s branch with that person’s proposed changes, in order to test it.

I’ll be honest with you: it’s tough.

But there are lots of great resources out there! One of my favorites is the “Getting Git” talk by Scott Chacon. He explains the basics of how git works. This really helps you to get an initial understanding, so that you can move on to learn how to actually use it. Some great guides that can get you started using Git are the Git Reference or Pro Git. And we also have the Working with Git article on the phpBB wiki.

And fear not, we are here to help. If you run into any problems, just come onto IRC and ask.

In conclusion

So there you have it, secure your place on the area51 contributors page!

If you have questions or just want to see what we are up to, join us in the #phpbb-dev IRC channel on irc.freenode.net.

Guest post: MOD Creation, From Start to Finish by Unknown Bliss

Posted by DavidIQ in Modifications on January 11th, 2012

Written by: Unknown Bliss

Within this article I’m going to briefly outline how to create your modification, package it up, submit it to the Modifications Database and support it afterwards.

Writing MODs can be so simple but yet so complex. It really depends on what MOD you wish to make. If you wish to make a portal or arcade then it will be quite complex. If you just want to make dynamic page titles or ACP Link in header it will be a rather small trivial task.

The first thing you need to do is open up word or notepad and prepare information on your modification, a brainstorm of ideas. It should include items such as your modification name, description, what sort of features you might include and what requirements do you want. Then you need to think about what features you’ll need. For instance, if you are creating a portal, will you have a configuration setting to toggle or re-order individual modules?

Once you have a good idea of how you want to make your MOD you can start to do a bit of research. Take a look at something similar. If you’re designing a blog with articles and comments then take a look at phpBB’s Topic and Replies system. See how it works and what can be done with it. While you’re doing research feel free to note down bits and pieces of information for future reference.

Once you know what you’re making and you have a rough idea on how you are going to make it, you can start working on it. Normally, it’s easiest to start with the database structure. If you have a bug tracker you know you need to make the table for tickets, the table for projects, table for comments/replies, table for logging etc. So plan this structure out.

After you have done all the planning, notes and researching you can install your test board. I recommend you use QuickInstall (QI) as it does a lot of items already done for you and it can generate multiple boards faster. If you use QI then I always find it’s best to populate your board with users and posts as it can come in handy later on. If you don’t use QI then you need to install a board then enable debug and debug extra. You also should change the recompile style components option to ‘yes’ inside ACP –> Load Settings so you don’t need to refresh your style components or cache every time you make an edit to a style file. There is a blog article about QI here

Now that you have a test board, you should use your DB Structure Plan to make your database changes. If you need to add something later then you can. Once you have your database changes in place what you’ll need to do next is write the PHP functions files. I can’t say much about this except that this is when you need to take out your notes and use a checklist of everything that you need to include.

Once you have made the PHP Function Files you need to create the basic language PHP files. At the moment, you won’t have much to put in them. However, you will need to put in the basics, such as, if you are making a set of modules, you will need language entries such as “Recent posts”. Just a reminder that all standard language files should be inside /language/en/mods as all MODs should have an English language built into the MOD. Any additional languages should be in additional MODX Files but I’ll come back to that later. As a general rule it’s normally useful to have a generic error and success message for most MODs.

Now that you have made you language and function PHP files you need to make your template files. These may need to contain the Overall Header and Overall Footer and sometimes forum jump but otherwise its up to you what goes in them. One very common error people make is putting hardcoded language inside template files. This is against phpBB Coding Guidelines and it will make your Modification deny worthy. If you can remember this rule it then means less of a nightmare later on when your MOD is denied for hard coded language and you then have to re-submit it. Note: Hardcoded language can be anywhere, the most obvious and common place to put it is in template files but you can put it in most files and that’s where it normally catches people off-guard.

Now you need to make your PHP file that the user will visit (such as viewtopic.php or blog.php or index.php rather than /includes/acp/info/blog.php). An attempt should be made to keep file names short and simple like portal.php or blog.php rather than my_absloutley_almighty_cool_portal.php.
Once you have a working set of files you need to start adding your ACP, UCP, MCP etc. Modules. I’m not going to go into much more detail with regards to this much except to say that when designing these try to keep them looking uniform with the built-in modules in these control panels.

Now you should have a working test board. At this moment in time you shouldn’t have all of your features implemented except the very core and basic ones. Now you need to add your UMIL files. To do this just generate a UMIF File with the hosted UMIF Generator. Also make sure you include a copy of the latest UMIL and you must make sure this is always the latest and when a new version is released remember to update. Outdated UMIL makes a MOD deny-worthy.

So now its time to create a development topic in the phpBB.com MODs in Development Forum. Make a topic and I recommend you use the suggested template for your topic. At this moment in time don’t attach any downloads and keep the status as [DEV] but if you wish you can provide screenshots.

Now you need to package it into a MODX. I suggest you use the MODX Generator. Once you have this you can then edit the MODX using the MODX Creator with additional information.

Now that you have made your MOD you need to make a new board. This board should be the same as the one you made earlier with debug, debug extra and AutoMOD. Now you need to zip up your modification, go into AutoMOD on the new board and upload it using the upload feature within the AutoMOD module. Once it has been uploaded, install it. If it fails but you can’t see why double check if you have used spaces instead of tabs and vice-versa in finds. Once you have AutoMOD working you are almost ready to submit your MOD.

You should now update your topic to Alpha or Beta (ALPHA is for a VERY unstable MOD. BETA is generally when almost all of the features have at least been implemented, but not much testing has taken place) and add a download link. Downloads aren’t required for the alpha stage but are recommended; otherwise how do people test your MOD and provide feedback? Downloads for beta are required due to rule 3d. The MODs in Development Forum is a place to get ideas, free beta testers and market your Modification so you should take advantage of it.

Once you have added a download I recommend you test your MOD thoroughly for any bugs and fix them. There is a blog post about how the Junior MOD Validators test (and I recommend you test it in the same way) here. Once you are quite sure that all of the bugs have been squashed and that all of the features have been implemented, as you planned from the start, you can promote the MOD status from the BETA to RC (Release Candidate) stage. Many MOD authors will not accept any more feature requests for the current MOD version, pushing any further requests back to the next major version (X.Y). At this point, your MOD should be ready to be submitted for validation by the MOD Team for approval and release into the MOD Database.

To submit it for validation you need to create a Modification type contribution in the MOD Database. For the contribution details, you should generally use the same information as was used in your MODX install file. You will also have the opportunity to include further information, such as a demo URL and screenshots. Finally, select one or more relevant categories into which your MOD fits. Note that at the bottom of the submissions page there is an option to upload screenshots, not revisions.

The next page to come up will be the “New revision” page. On this page you should upload your zipped up Modification, type in your version number and version name (can be the codename for the release or just the version number or the name of the mod). Then you have the notes to the MOD Team section in which I personally add a note of thanks to those who out of their own free time test and validate my MOD’s code but its up to you what you enter into this section.

Once your MOD has been submitted, it is a waiting game of sorts while the MOD Team and Junior MOD Validators review the code and test the functionality. Note that it can normally take a month, sometimes more, for the entire process to be completed, due to the number of MODs submitted. Once your MOD has been approved or denied, you will receive a PM with validation notes. This can include issues in the code, or problems found while testing. Even if your MOD is approved, it is suggested that the validation notes be taken into account for the next version of your MOD. If your MOD is denied, most of the issues found in the report must be changed before your MOD can be resubmitted. If you find that something in the validation report is incorrect or that there is an issue in the report, you may communicate that by replying to your Queue Discussion topic, found in the Discussion/Support tab of your Contribution page. This topic is only viewable to you, the MOD team, and the Junior MOD Validators. If your MOD is denied multiple times, do not become discouraged. Sometimes, when different people look through your code and test your MOD, different problems will be found. Simply fix the issues and resubmit your MOD.

So when you get your MOD approved it is time to provide support for it. This is not required but is asked for by the phpBB.com MOD Team that you update for new versions/bug fixes and support your MOD. I suggest you subscribe to the support tab in your Modification section in the Modifications Database so that you get updates when support is posted. When new phpBB Versions are released you are asked to re-submit it with any fixes that my be required.

If you wish to add features to it you can also re-submit it at any time for that.
And that’s it really. If you have finished this Modification perhaps you would like to start work on another modification (Maybe from the MOD Requests Forum).

In closing, this guide is just that: a guide. It is how I tend to approach the MOD writing process. If you have a method that works better for you, then you are welcome to use that and possibly share it in the discussion topic. It is quite common to skip the earlier section with planning but that is totally up to you. It can, however, prevent confusion, duplication and missing code later on.
Also remember, if you ever need help with anything MOD related you can always ask in the MOD Writers Discussion, in the Queue Discussion Topic (for queries about issues in a validators report being un-reproducible, queries as to what they mean or any notes to the team about issues that arise in validation etc.) or by asking on the FreeNode #phpbb-coding IRC Channel.

The dangers of ASCII mode

Posted by Noxwizard in Support on August 23rd, 2011

FTP is the most common means of moving files to and from a server. When the FTP specification was written, certain convenience features were recommended to client implementers. This was done through four data type definitions. With these definitions, the clients can perform transformations of the data to ease the burden of performing these transformations yourself every time you upload a file.

The data types are: ASCII, EBCDIC, Image, and Local. The first two are different character sets that the local file can be converted to during transmission to the other server. Image is now commonly known as “binary mode” and it transfers the data without changing it in any way. Local allows hosts to specify custom byte sizes for storage and transmission. For this article, I will be focusing on ASCII and Image and what can go wrong if you choose the incorrect transfer mode.
Read the rest of this entry »

MOD Statistics: The most downloaded MODs from the MOD Database

Posted by battye in Modifications with the tags , , , , , on July 5th, 2011

Every now and then a question pops up in the discussion forums about which MODs are most essential for board owners to install. It’s difficult to answer this question for one key reason; what is essential for one admin may be trivial to another. It all comes down to personal preferences and the unique needs of a particular bulletin board. Unfortunately, while this response is accurate, it still leaves enthusiastic new administrators without any answers.

The purpose of this blog post isn’t to provide a definitive answer to the question, but more to provide something of a starting point for users beginning their search for suitable MODs… or something to munch on for the statistically inclined!

Number of downloads is the primary piece of data used in the calculation of the statistics below. There is no way of knowing exactly how many times a MOD has been installed so the number of downloads is the best option available to reasonably estimate a MODs ranking in terms of total use in the wider community.

 

Most downloaded phpBB3 MODs
Most downloaded MODs for MODs submitted in 2011 

 

Due to the overwhelming success of the Attachment MOD which provided functionality for file attachments in the early-to-mid 2000’s, Acyd Burn remains – and will remain for the foreseeable future – phpBB’s most downloaded MOD author.

 

Most downloaded MOD authors

 

If anyone reading this is feeling nostalgic, you may also be interested in the figures for phpBB2 MODs. Quite conceivably (and conservatively), at its peak the Attachment MOD averaged over 200 downloads per day.

 

Most downloaded phpBB2 MODs
All statistics are based on database entries up to June 18, 2011.

Announcing the phpBB Showcase

Posted by AdamR in Uncategorized with the tags , on March 19th, 2011

Millions of websites use phpBB to power their forums. These communities, ranging in size from just a few hundred to over 50 million posts, rely on phpBB’s efficiency, ease of use and level of customisability to provide a place for their users to come and talk about their unique interests, provide support for a line of products, or just have fun hanging out.

The phpBB Website Team is proud to announce the phpBB Showcase, a new section on the www.phpbb.com website which contains an assortment of unique forums throughout the internet which are powered by phpBB.

The showcase includes selections of forums which stand out to the phpBB Team. These include very large boards with hundreds of thousands of members and millions of posts, large enterprises and corporations using phpBB to power their forums, as well as other well-known open-source projects choosing to use phpBB.

While enjoying the showcase, we would like you to keep in mind that it is not intended to be a directory of phpBB forums on the internet, but rather a selection of forums across the internet which are, in a certain aspect, unique.

If there’s a forum powered by phpBB that you would like to see included in the showcase, we invite you to suggest a site. Sites are added on a case-by-case basis using the criteria above.

We will regularly amend the showcase with new boards as we are made aware of them. We look forward to showing off some of the cool things users have done with phpBB while building their impressive communities.

New Development IRC Channel: #phpbb-dev

Posted by igorw in Development on February 28th, 2011

One of the most important tools in open source software development is IRC. For those who are not familiar with it, IRC stands for Internet Relay Chat and is a protocol for real-time online communication — chat.

For historical reasons the development team was using a private channel until recently. So while discussions on the area51 development board and the tracker were public, the IRC discussions were not. It turns out that a lot of development discussion happens on IRC. Quick discussions between developers are easily achievable on IRC and often beneficial for reviewing patches and making low-impact decisions.

We wish to open up all aspects of phpBB development and encourage all users to participate.

So whether you’re just interested in how we work or if you want to make a contribution to the project…

Join #phpbb-dev on irc.freenode.net

We’re waiting for you.

MOD Team Timeline

Posted by battye in Modifications with the tags , , , , on January 12th, 2011

As we enter a new year it seems like an appropriate time to look back at the history of the MOD Team. This time line focuses on how the team has evolved with regards to community projects, MOD Team sanctioned tools, meetings and more.

MOD Team Timeline

April 2002:
- phpBB2 released
- MOD Team is founded under AbelaJohnB
- Initial release of EasyMOD, the automatic MOD installer

September 2002:
- Second alpha release of EasyMOD

January 2003:
- phpBB2 MOD Database officially opened

May 2003:
- Third alpha release of EasyMOD

October 2003:
- Nuttzy99 becomes MOD Team Leader

August 2004:
- First beta release of EasyMOD

February 2005:
- wGEric becomes MOD Team Leader

August 2005:
- Community coding projects announced

December 2005:
- MODding’s Most Wanted announced

April 2006:
- MODX is announced, the XML version of the MOD Template

July 2006:
- The second edition of MODding’s Most Wanted occurs

March 2007:
- phpBB.com updated to phpBB3
- phpBB.com’s new website is unveiled

May 2007:
- phpBB3 MOD Database (Ariel) is opened for viewing

June 2007:
- First annual MOD Authors Convention takes place on IRC
- phpBB3 MOD Database (Ariel) now allows for MOD submissions and validations

December 2007:
- phpBB 3.0.0 is officially released

July 2008:
- phpBB2 MODs are no longer accepted in the MOD Database
- Londonvasion, the first phpBB meet

August 2008:
- Second annual MOD Authors Convention takes place on IRC
- MPV, the MOD Pre-Validator, is open for public use

October 2008:
- The Junior Validators team is created for the MOD Team
- evil<3 becomes the MOD Team leader

December 2008:
- The first beta of AutoMOD, the successor to EasyMOD, is released

January 2009:
- The framework for creating database installation scripts, UMIL, is publicly released

July 2009:
- UMIL 1.0.0 is released

November 2009:
- The online MODX creator is unveiled

December 2009:
- The MODX generator, which automatically generates MODX documents by comparing two directories, is unveiled to the public

February 2010:
- wGEric returns as interim MOD Team leader
- DavidIQ becomes the permanent MOD Team leader

April 2010:
- The completion of the first phase of Titania, the customisation database, is announced

May 2010:
- The MOD development competition, Summer of MODs, is announced

June 2010:
- AutoMOD 1.0.0 is released

August 2010:
- Libertyvasion, the second phpBB meet

November 2010:
- QuickInstall, the automated phpBB3 installer, becomes an official MOD Team tool as v1.1.5 is released

Invading GitHub

Posted by igorw in Development, Modifications, Styles with the tags , , on November 13th, 2010

After the phpBB core migrated to GitHub earlier this year, most of the sub-projects have now been moved as well.

The initiative begun during the Libertyvasion conference, where we moved the UMIL, AutoMOD and MPV repositories. After that the customisation database and the support toolkit followed. Last night we moved the remaining MOD team projects: MODX, and the MODX Editor, Generator, Creator and finally QuickInstall.

I’m really excited about this relocation because of the huge contribution potential Git and GitHub have to offer. We have already seen a few translators take the hurdle to learn Git, and it makes the whole translation submission process a lot more open. There have also been a few patch contributions, and all I can say is keep those patches coming!

Now with all these public repositories accepting contributions, we need some guidelines. For this reason we came up with a set of Sub-Project Contribution Guidelines. We tried to keep them as short as possible, here is the substantial part:

  • Projects should be hosted on GitHub under the phpBB organization.
  • All work by team members should take place in the main repo.
  • Use of topic branches is very strongly encouraged.
  • Contributors _must_ use topic branches, foreign main branches are never merged.
  • Version tags must be fully lowercase and prepended by a ‘v’, for example ‘v1.0.0-rc1′.
  • Branch names should simply describe the topic and use hyphens, for example ‘quick-reply’ or ‘issue1234′.
  • Translations should have a branch named ‘intl-<lang>’, for example ‘intl-de’.
  • Projects with many core contributors can use forks.

Please do read the full guidelines, as they include some additional information.

I am happy to announce that we have completed our GitHub invasion and are feeling very much at home. Fork away!

Explaining Hooks

Posted by igorw in Development with the tags , , , on October 9th, 2010

Most of you have probably already seen the blog post regarding the RFC process for hook locations to be added to Ascraeus (phpBB 3.1). And many of you may not know what a hook system actually is, so I will take the time to explain it.

In Olympus (phpBB 3.0) all new additions to the core must be made by editing or patching the core files. The MODification is either installed manually or by using AutoMOD. What a MOD usually does is add some specific code at a specific location, this ranges from database queries, template assignments and loading of language files to any custom PHP code. Now, this approach worked for 2.0 and it works for 3.0, but frankly it produces a horrible mess. Installing MODifications is a great pain, uninstalling them is almost impossible in many cases.

To solve this issue we are introducing a hook system. The hook system defines code injection points, giving each one of them a unique identifier. The hooks controller allows MODifications to bind to a specific code injection point or hook location. When that point is reached in execution, the hooks controller will call all of the hooks that registered, passing in the context, so that local variables can be read and/or modified by the hook, thus “injecting” the hook into that location. Technical details can be found within the General Hook Architecture RFC.

Automagic

To remove the need for any core edits the files defining and registering hooks will be automatically loaded. They will be in a certain folder that phpBB will scan regularly. This will hopefully make the whole MOD installation procedure automagic. You drop in the files and are ready to go.

To make the registering of hooks more convenient, MOD authors will be able to define a class of which each method represents a hook.

This allows all hooks belonging to a certain MOD to be grouped within one file that can be automatically loaded and registered.

Example

Here is an example with code. Note that this API may change since it’s not final yet. The hook location will be in user_add as described in this RFC topic ([RFC] user_add hook).

We will create a file called hook/logging.php (convention will change) containing the following class, which will be loaded automatically by phpBB.

Code: Select all
class phpbb_mod_logging
{
public function user_add(&$sql_ary, &$cp_data)
{
file_put_contents('registered_users.txt', time() . ": " . $sql_ary['username'] . "\n", FILE_APPEND);
}
}

Since we want to hook into user_add and the RFC describes the input arguments as $sql_ary, $cp_data (by reference), our hook will have to take those arguments. In this example we will write the unix timestamp and the username of every new user into a log file. This happens right before a user is created.

The user_add() function will execute all ‘user_add’ hooks before inserting the user. While we are only reading the arguments here, it is also possible for hooks to modify them.

Under the hood

So, how does this work? Let’s take a look at the engines that power this. These are mostly internals of the hook system that you will not have to deal with, because it is all taken care of by phpBB.

Before we can do anything hook related, we need to create a hooks controller. The hooks controller manages the hooks and makes sure all of them are called. All hook-related actions go through this class.

Code: Select all
// create the hooks manager
$hook_handler = new phpbb_hooks_controller();

In phpBB this controller is automatically loaded, and there is also code that will load all the hook files (hook/*.php). It registers the hook containers of those files with the hooks controller.

Moving on to the actual hook invocation. Within the actual user_add function, you will find the following:

Code: Select all
// call hooks
$hook_handler->invoke_hook('user_add', array($sql_ary, $cp_data));

This calls all hooks that bound to ‘user_add’, passing the two arguments into them. There will be quite a few of these hook locations to take advantage of, and they will always provide a context that you can work with.

As a MODification author you will also be able to provide your own hook locations to other MOD writers. All it takes is a call to invoke_hook, which will allow others to hook into your code.

There are some more advanced features about hooks, such as (un)installing, enabling/disabling, prioritising hooks. But I’ll save that for later.

In summary

  • class with methods representing hooks
  • invoke_hook will call all hooks that registered
  • hooks are automagic

So now that you understand the basics regarding hooks, I hope you can look forward to this great addition in ascraeus and help us by contributing Hook Location Requests.