MyBB 1.8 Dockerfile & Docker Compose Recipe

With the recent announcements of the 1.10 branch we’ve also got some great news for both plugin developers and theme designers. In recent weeks, work has been underway to create an official Docker image for the MyBB 1.8 series. This work has been taken on by a community member who proposed such a solution and set to work on getting it done. Also provided within the repository are two example docker-compose.yml files, to be used with Docker Compose or Swarm. Docker is a technology for creating lightweight containers to manage and orchestrate software. It works across multiple platforms, and makes it easy to quickly get a live instance of the current MyBB version running with a variety of different configurations without requiring much effort to install database management systems and such on your machine. Docker is a brilliant tool for developers to quickly prototype ideas in a fresh, consistent environment. You can find out more information on Docker here.

Developers can immediately download and start using the current MyBB 1.8.13 Docker image from our official Docker Hub registry account (found here) by running the following command:

docker pull mybb/mybb:latest

Alternatively, for those who would like to view the source, make amendments or just generally prefer to build their own images – you can view the official GitHub repository here. Ample instructions for use are provided within the README.md file. This project is far from complete and we do not recommend it for production use, only for development and staging systems. MyBB’s current installation and upgrade systems make full automation with Docker a difficult feat to accomplish but we’re hoping to include easier ways to do this in the future 1.10 series of releases.

We hope that avid plugin and theme developers make good use of the Docker images that we’ll be releasing and improving upon, any and all constructive feedback (and pull requests!) is welcome.

2.0 dev post #3

It’s that time again, time for another MyBB 2.0 dev blog! This post is the third in a series of development update posts regarding MyBB 2.0.  Currently in pre-alpha, MyBB 2.0 is the long awaited upcoming major version of the open source MyBB forum software.  We’ll be posting regular updates (we promise!) in regards to the development to keep you all updated. The development team have been hard at work since our last dev post, adding new features and polishing existing functionality. This post will explore some of these new features and highlight our approach to the development of the system.

Continue reading

Team Changes and Moving Forward

With the release of MyBB 1.6.13, the team felt there was a need to address some issues that affect the future of the Project, the Community and the Team in general.

Developers and MyBB Development Workflow

With the departure of Nathan and Tomm, MyBB has once again found itself in need of active team members. This, along with the unavailability of most current developers due to time constraints caused by life issues, led to us breaking our workflow, which as you may have noticed ended up delaying the release of MyBB 1.6.13. After MyBB 1.6.13 was out, work on 1.8 Beta 1 has been resumed (and you can clearly see that by examining the commits made for on github in the ‘feature’ branch).

Moving forward with 2.0.

Initially 1.6 was supposed to lead to 2.0 directly, but with the team feeling that 2.0 was still in very early development, MyBB would lose to its competitors for quite a bit of time (the development time of 2.0). Thus, work was put into “modernizing” the look and feel of 1.6 before the complete rewrite, and so 1.8 was born. As anticipated, this has delayed work on 2.0 of course. Once 1.8 is released (Beta 1 is nearing its completion; at time of writing only one feature is left to finish: jQuery conversion; all the other open issues aimed for Beta 1 are bugs) work will start on 2.0. There has been a lot of talk of MyBB being a “dead project”, but this is very far from the truth. As an open source project, as long as we have active developers, the project will never be “dead”. But we need the community’s help – we’ve been helping you for a long time, we’re asking you to help us now  – so if you feel that you know MyBB pretty well but most of all, if you feel that you have value to give to the team and project, contact us!

Changes that we are implementing now

It became apparent to us, that one of the major problems we have had was losing key team leaders. As you may remember, we recently got rid of the “Team Leader” role, and went with a more equal structure. This did not promote (as we had intended) productivity. So we have come up with a new system, whereby developers will take turns taking the “lead” on a per version basis. This will keep them all updated with the procedures required to package and release new versions. We are pleased to announce the Stefan T will be assuming the role of Lead Developer first and and the next should be Pirata Nervo (after that a new internal poll will be made). We are also pleased to announce that King Louis will be assuming the position of SQA team lead (the leader here doesn’t change as we believe the SQA team requires a static leader).

Recruitment

As mentioned above, we are now looking for more active members for both Development, Support, and more importantly SQA (we’re running low here!).  If you feel that you would be a good addition to the team, why not submit some pull requests on Github and/or drop an application to using the contact form, posting a thread in Private Inquiries (recommended) or even by PM’ing us.  You cand read more about the responsibilities here. Do not be afraid of contacting us, we won’t bite you – but we’ll be always be honest with you.

 

Updated Subversion Access Details

As part of our recent (and emergency) server migration, we’ve just finished restructuring our development server (that hosts the MyBB Development Portal and Subversion repositories). As a result, if you’re checking out and working with our Subversion repositories, please be aware that the URLs for doing so have changed.

The new official Subversion repositories are as follows:

If you’ve already checked out a copy of MyBB using Subversion, you can switch your local copy to the new URL using the following command:
svn switch --relocate http://dev.mybboard.net/svn/mybb/ http://svn.mybboard.net/mybb

Please note that the old Subversion URLs will continue to work for the majority of users the time being. However, if you’re running Mac OS X, you’ll need to switch to the new URLs due to a bug with the Subversion client that ships with Mac OS X.

Preparing your Plugins for 1.4

Hello,

With the MyBB 1.4 release pending ever closer, we are stepping up to get your plugins ready for 1.4. There are two main things you should do:

  • Update your plugins to work with MyBB 1.4 ahead of time.
    MyBB 1.4 Beta has been available to download to those who request it. Requesting it is easy. Just click here, find “MyBB 1.4 Beta Testers” and click “Join Group”. For the reason, we suggest you put “Upgrade Plugins to 1.4”, which will let us know you want to upgrade your plugins to 1.4. Theme authors may also do the same thing. It’s very important to us to make sure we give the time and resources necessary, in order to make your transition to 1.4 as smooth as possible.
  • Can’t upgrade your plugins in time for 1.4’s release? Here’s what we recommend:
    GUID’s (Globally Unique Identifiers) are used in MyBB 1.4’s plugin system to allow users to check their plugins for updates. If you were to add your plugin’s assigned guid to your plugin, prior to the release of 1.4, the users who update to it and who download it from there on out, will be able to use the version checking functionality. There is no harm in adding a guid to any 1.2 designed plugin. Versions below MyBB 1.4 will just ignore it. We also recommend adding ‘compatibility clauses’. More information on adding GUID’s and compatibility clauses to your plugin can be found below.

What is a GUID?
Your GUID is a unique identifier that has been generated for your plugin. By including this GUID in your plugin file (see below), users of MyBB 1.4 will be able to check for new versions of your plugin on the MyBB Mods server, with a click from their Admin CP. To allow users to take full advantage of this functionality, please follow the instructions below to add your GUID to your plugin file.

What is a ‘compatibility clause’?
Your ‘compatibility’ clause is a way to tell MyBB which versions of MyBB your plugin will work on. This adds the ability to stop users from installing or running plugins that won’t work with their version of MyBB. To allow users to take full advantage of this functionality, please follow the instructions below to add your ‘compatibility clause’ to your plugin file.

Implementing your GUID & Compatibility Clause
To implement your GUID & ‘compatibility clause’ into your plugin, you need simply add it to the info function of your plugin before uploading it below.

PHP Code:

 'test',
        'description' => 'test',
        'website'     => 'http://mods.mybboard.net/',
        'version'     => '1234',
        'author'      => '',
        'authorsite'  => 'http://your-site.com/',
        'guid'        => '1234567890abcdefghijklmopqrstuvwxyz',
        'compatibility' => '14*',
    );
}
?>

More information on changes in 1.4 that will require changes in your plugins can be found here: http://blog.mybboard.net/2008/07/11/plugin-upgrade-guide-for-plugin-authors/

Plugin Upgrade Guide (for Plugin Authors)

As we approach the release of MyBB 1.4 and the code is finalized I thought it would be a good idea to take some time and write an in-depth guide on how to upgrade your plugins for MyBB 1.4.

First are the required code changes in MyBB 1.4:

  • TABLE_PREFIX is not used anymore except in $db->query().
    • In MyBB 1.2 it would look like this: $db->simple_select(TABLE_PRFEFIX.”users”, “*”, “uid=’1′”);
    • In MyBB 1.4 it now looks like this: $db->simple_select(“users”, “*”, “uid=’1′”);
  • All “yes”/”no” columns have been converted to 1/0 for speed improvements. All plugins will need to change this.
  • The function is_moderator() now returns true/false in MyBB 1.4 versus the old “yes”/”no” in MyBB 1.2.
  • sprintf() is no longer used in MyBB. If you use sprintf() now use $lang->sprintf() instead.
  • Links to forums/threads/posts now use functions to generate them because of the SEO in MyBB 1.4:
    • get_thread_link(arg1 thread id, [arg2 page,] [arg3 action])
    • get_forum_link(arg1 forum id, [arg2 page])
    • get_post_link(arg1 post id, [arg2 thread id])
    • get_profile_link(arg1 user id)
    • get_announcement_link(arg1 announcement id)
    • get_event_link(arg1 event id)
    • get_calendar_link(arg1 calendar id, [arg2 year,] [arg3 month,] [arg4 day])
    • get_calendar_week_link(arg1 calendar id, [arg2 week])
  • All queries in your mods that write data to the database and use $db->query() will now have to use $db->write_query(). You won’t have to worry about queries that use simple_select or update_query as they automatically assign it to the correct function. By doing this, you can make your plugin compatible with forums that run on multiple servers. These forums are usually large, in the scale of millions of posts or more.
  • rebuildsettings() has been renamed to rebuild_settings(). Plugins looking for backward-compatibility should execute a check to function_exists before defining their own rebuild_settings() function in order not to have “function already defined” errors.
  • Plugins using the Moderation class should take note of a few changes to the function parameters
    • tid and fid are no longer passed into Moderation::unapprove_posts and Moderation::approveposts
  • Any plugins written to add / change functionality to the Administration Control Panel (ACP) will have to be completely rewritten. The changes needed to be made are too vast and too complex to be covered in this article. However, take a look at the ‘Akismet’ plugin bundled with MyBB 1.4 for examples of how to use the Admin Control Panel functionality.

Second, the suggested changes in MyBB 1.4:

  • There are two new fields for the information array in your plugin:
    • guid and compatibility.
    • guid’s (Globally Unique Identifiers) are assigned to plugins on the MyBB Mods site and can be put in plugins to allow for “Plugin Updates” via the new ACP page in MyBB 1.4.
    • compatibility can be set to “14*” so MyBB knows in the future which plugins work and don’t work with the next version of MyBB.
  • The ‘website’ field should point towards the URL to your plugin on the MyBB Mods website (or the link to the plugin where it is hosted at.) We’ve noticed that it’s been a common misconception to use that field to point towards your own personal site, while it’s intention was to be used to allow the average admin to go directly to the plugin’s page and check for updates, etc.

There is of course more material not covered that is out of the scope of this article. If you have any questions feel free to ask where appropriate.

MyBB 1.4 Admin CP – The Complete Overview (Part 4)

Welcome back for the final installment in our Complete Admin CP Overview. First and foremost I would like to thank all of you who had submitted their questions for this week’s blog post. Second, today we will be going over the Templates & Themes tab and some of the cool things we did to make your experience easier!

Templates

Template editing hasn’t seen many updates, but there are quite a few tiny changes to generally make template management easier and more user friendly.

Template Sets
Template Groups
Adding a template set
Editing a template set

Little has changed with the template sets and template groups listing, just a bit of cleaning for both pages. However, you’ll notice that all templates are now in a group. Any templates that don’t have a group are found under “Ungrouped Templates.” Also, multiple template groups can be open at once, and after leaving the page to edit a template, the template groups you had opened beforehand remain open.

Adding and editing a template set is more or less the same as in 1.2; there is still just one option – the name of the template set.

Editing a template
Adding a template

Template editing has seen a huge change – both when adding templates and editing existing ones. Now, MyBB uses Codepress to provide syntax highlighting, line numbering, and a more code-friendly interface for editing overall.

Template search and replace

Template search and replace has also seen the addition of Codepress. Also, you can now search and replace multiple lines of code at once – in 1.2, you could only provide a single line of code to search for and (if requested) replace.

Themes

Theming, on the other hand, has changed significantly since MyBB 1.2. 1.4 introduces a brand new theming system, including multiple stylesheets per theme, a new advanced editor, and an updated simple editor.

Themes listing
Create a theme

While the themes listing itself has not changed much, some features have. New to 1.4, you can force a theme on all users with the click of a button. Also, creating a theme is as simple as ever.

Edit theme

Right away, you’ll see some huge changes to this page. First, there’s a stylesheet listing. In 1.4, you can have multiple stylesheets per theme, with 5 included by default. Stylesheets can either be global (meaning it is used on all pages), or can be restricted to certain pages. If restricted to certain pages, you can also specify certain actions (if you wish) to use the stylesheet on. Stylesheets are inherited from parent themes until you edit them.

The rest of the page – the properties portion – is quite similar to 1.2. However, new to 1.4 is the “Editor Theme.” The MyCode Editor can now have multiple themes, as seen in the MyBB 1.4 Beta Screenshots post, which features both MyBB’s default editor theme and a special Office 2007 theme.

Simple mode
Advanced mode
Stylesheet properties

Stylesheets are the core of your theme, and in 1.4, there are two ways to edit them – simple and advanced modes. Simple mode is very similar to 1.2, in that it provides some of the common elements as separate text boxes, and then has an area to specify any additional CSS for each element. AJAX is used here for quick and simple switching between the various elements, and for saving elements.

Advanced mode is new for MyBB 1.4, and allows advanced users a more familiar environment for CSS editing. Advanced mode shows the raw CSS and allows editing of it directly. Advanced mode must also be used if you wish to add additional elements to your stylesheets to further customize your theme beyond the default elements.

Finally, the stylesheet properties page allows you to edit the pages each stylesheet is loaded on. As you can see in the screenshot, you can specify multiple files that use each stylesheet. You can then select actions within each stylesheet, or have the stylesheet be loaded on all actions in the file. For instance, usercp.css is used on usercp.php, usercp2.php, and private.php, on all actions in each file.

Importing a theme
Exporting a theme

Importing a theme has seen a few helpful changes. First, you can now import from either a local file or from a URL. This means theme creators can simply post their XML files online rather than require users to upload it themselves.

When exporting a theme, you are now presented with just two options – whether or not to include all or just the custom stylesheets, and whether or not to include the templates for the theme. This is pretty similar to 1.2, just changed slightly to fit the new theme system in 1.4.

There has been another important change in theming that doesn’t have a screenshot I can share. MyBB 1.2 added the ability to cache your themes to flat files, but in 1.4, we’ve taken it to the next level. You can now edit your stylesheets in a text editor and upload them to the directory created for each theme. When you go back into the ACP to edit the stylesheet at a later time, it will automatically take the content from the file and update the copy of the stylesheet in the database.

Questions

Thanks to the many of you who submitted their questions! We’ll start out with Snowy’s question which is probably the most asked question of MyBB 1.4:

Snowy Says:

When will MyBB 1.4 be released?

Now I know we have pretty much refused to give any dates in the past, but today, now that all the features are done and beta testing is well into progress, I am able to say with confidence that MyBB 1.4 should be released no later than July. Assuming no huge issues arise during beta testing, expect it to be here by then!

Das Tier Says:

well okay it says “you should put your read servers on a load balancer ” well show would you do that is that a server thing or some that can be done by MyBBoard.

Let me clarify for those of you whom didn’t read the technical section of last weeks post. Das Tier is asking about one way of setting up multiple MySQL servers on one MyBB installation for redundancy and performance reasons.

Das Tier, a load balancer is an application, or service, you can install on your server. It asks the MySQL servers for their loads (how stressed they are under) and it chooses the one with the least load. This in turn leads to a much faster and stable experience and in the event a MySQL server crashes, your other ones will still work.

Tip: Multiple MySQL servers however are costly and will probably only ever be used by forums with millions and millions of posts. So don’t go out thinking you need to buy multiple spaces at a Data Center in order for your forum to be fast. Most forums out there can operate fine on any standard or basic hosting package that meet MyBB’s minimum requirements.

Tristan Says:

Are there controls for administrators to regulate use of the moderator control panel (ie: how long mods can ban, who can edit profiles, etc…) or is the whole panel open season if one has access to it?

At this time, any user who has access to the Moderator CP has full access. Access to the Mod CP is set (similar to access to the Admin CP) as a user group setting.

robyhomes Says:
How will themes go on moving to this next version? I know the layout of the posting has changed a lot so will the theme have to be changed a long way to so that the user’s details are above the post? Or will the theme move it back to the side?

Your themes will be automatically converted to the new format. Templates will be reverted where possible, and any templates that were edited before the upgrade will have to be dealt with in the Find Updated Templates manager in the Admin CP.

Regarding the postbit layout: There’s a new setting in 1.4 that lets you decide whether you’d like a horizontal postbit (above the post) or classic postbit (to the left of the post). Users can also choose to use the classic postbit from their User CP.

Thanks for reading!

Thanks for reading our four-part series about the MyBB 1.4 Admin Control Panel. Hopefully the posts have been informative and have highlighted some of the great changes we’ve made to make your administration experience the best it can be. I personally cannot wait until 1.4 is released – and I hope you feel the same way.

Multiple people have contributed to this post, including: Tikitiki and Justin S.

MyBB 1.4 Admin CP – The Complete Overview (Part 3)

Welcome back for another overview of MyBB 1.4’s Administrator Control Panel – this time, we’ll be covering the “Users & Groups” as well as some of the technical decisions made.

A portion of code in the Users ACP page

Users & Groups

Users

Like many other sections of the new Admin CP, the user management section is quite different from what you’ll be familiar with in MyBB 1.2. The focus of the new section is still very much to make it quick and easy to find and manage the users you need to. When you click on the new “Users & Groups” tab, you’ll automatically be taken to the Users page, from which you can quickly find, merge, and create new users. When you find the user you’re looking for, a number of options are available to you; including edit, delete or ban the user, show referred users, show IP addresses used by that user, and view the user’s attachments.

Users
Find Users
Creating a User
Show IP Addresses
Merging Users

In the first screenshot above you’ll probably notice that the page begins listing all the registered users of the board in business card style. This is part of a new feature called “Views,” which is a great new way of quickly getting to the information you require regularly. Essentially, views are saved live searches. In the screenshot for example, the default “All Users” view is selected and is therefore starting to display all the registered users of the board, along with the user’s email address, registration date, the date on which they were last active, and the user’s post count. You can modify the view or create a new view which instead listed users with different information such as their primary user group, additional user groups, reputation, and so on. You can also specify search criteria and sorting options for any view you create, as well as view the results in either list or business card style.

Views
Adding a View
Adding a View
Editing a View
Users List View

There’s a lot of information to store for each user, such as their details, profile information, and personal options. In the front-end these options have always been grouped into different sections of the User CP in order to make it easier for users to find exactly what they want to change. We’ve introduced a similar idea into the new Admin CP. When you select a user to edit you’ll be taken to a page with five tabs, on which only the relevant options are displayed. These tabs are labeled “Overview,” “Profile,” “Account Settings,” “Signature,” and “Avatar.”

Editing a User
Edit User Profile
Edit User Account Settings
Edit User Signature
Edit User Avatar
Edit User Avatar

Groups

When you head to the “Groups” section of the new Admin CP, you’ll be taken to a page that looks very similar to its 1.2 counterpart. You’ll see a list of the current user groups along with the group description, the number of users in the group, its order on the “Forum Team” page, and the relevant control options. There’s also a new icon next to each group which makes it more obvious which groups are custom groups and which are there by default. You’ll notice a significant difference when you click to edit a group. Rather than displaying all the group options at the same time, the options have been separated into four different tabs; namely, “General”, “Forums and Posts”, “Users and Permissions” and “Miscellaneous”.

Manage Groups
Adding a Group
Editing a Group
Editing a Group
Editing a Group
Editing a Group

User Titles

The user titles section hasn’t changed much from the Admin CP in 1.2. It allows you to manage the default user titles that members will automatically be assigned based on their post count. The interface is straightforward just like its MyBB 1.2 counterpart.

User Titles
Adding a User Title
Editing a User Title

Banning

One of the things we thought was messy in 1.2 was that banning options weren’t placed in the best of places in the Admin CP. You could ban a user in the banning section, but to disallow specific usernames, IPs or email addresses you would instead have to look through the settings area to find the appropriate options. In 1.4 all of these options are placed in the same place making it easier to find the specific banning options you require. We included screenshots of the “Banned IPs”, “Disallowed Usernames” and “Disallowed Email Addresses” pages in Part 1, as they are technically under the Configuration portion of the Admin CP, so here’s a screenshot of the “Banned Accounts” page which instead falls under the Users portion of the Admin CP.

Banning

Admin Permissions

The “Admin Permissions” section has received the same kind of tabbed layout used in the users and groups editing pages. The permissions are spread over five tabs which correspond to the main tabs of the Admin CP.

Admin Permissions
Default Admin Permissions
Editing Admin Permissions
Admin Group Permissions

Mass Mail

The Mass Mail section has changed a fair bit. The first thing you’ll see when you click the mass mail page is the current message queue, which contains mass emails which are still sending. Yes, this means mass emails are now sent using the task system, and you can also schedule mass emails to be sent at a later time. Aside from the obvious layout changes, many of the sending options remain the same but with one significant addition. It’s now possible to send mass emails in plain text, HTML format, or both. If sending in both formats, you can either enter a specific HTML and plain text version of the message, or have MyBB attempt to create the plain text version automatically based on the HTML version.

Mass Mail
Creating a New Email

Group Promotions

The group promotions system is a major new feature in MyBB 1.4. The system allows you to promote users of specific groups to another primary or secondary group when they meet the required criteria, such as post count, reputation and time registered. Promotions are then performed using the new task system in MyBB 1.4. This system solves many requests administrators have made to restrict forums or features to users with a specified number of posts or time registered.

Group Promotions
Adding a New Promotion
Adding a New Promotion
Editing a New Promotion
Viewing Promotion Logs

Technical Decisions

From the beginning of MyBB 1.4 development to this very day, MyBB 1.4 has nearly doubled in the amount of code compared to MyBB 1.2. Here are some figures:

MyBB 1.2:
Source code lines (not counting blank lines): 65,165 lines
Comment lines: 6,994

MyBB 1.4:
Source code lines (not counting blank lines): 113,503 lines
Comment lines: 13,722

Throughout all of MyBB 1.4’s development process, we’ve seen many new and exciting features. I’m going to talk a bit about some of the less known and more technical side of things in MyBB 1.4, so feel free to skip over this section if you lack interest when it comes to code.

PostgreSQL, SQLite 2, and SQLite 3 (via PDO) are all supported in MyBB 1.4. What’s more is we’ve implemented Slave/Master technologies allowing people to hook up multiple SQL servers. If I had two MySQL servers, the code in inc/config.php for databases would look something along the lines of this:


$config['database']['type'] = 'mysqli';
$config['database']['read']['database'] = 'mybb';
$config['database']['read']['table_prefix'] = 'mybb_';
$config['database']['read']['hostname'] = 'localhost_read_address';
$config['database']['read']['username'] = 'root';
$config['database']['read']['password'] = '';


$config['database']['write']['database'] = 'mybb';
$config['database']['write']['table_prefix'] = 'mybb_';
$config['database']['write']['hostname'] = 'localhost_write_address';
$config['database']['write']['username'] = 'root';
$config['database']['write']['password'] = '';

You could even have multiple read and write databases like:


$config['database']['type'] = 'mysqli';
$config['database']['read'][]['database'] = 'mybb';
$config['database']['read'][]['table_prefix'] = 'mybb_';
$config['database']['read'][]['hostname'] = 'localhost_read_address';
$config['database']['read'][]['username'] = 'root';
$config['database']['read'][]['password'] = '';


$config['database']['read'][]['database'] = 'mybb';
$config['database']['read'][]['table_prefix'] = 'mybb_';
$config['database']['read'][]['hostname'] = 'localhost_read_address2';
$config['database']['read'][]['username'] = 'root';
$config['database']['read'][]['password'] = '';


$config['database']['write'][]['database'] = 'mybb';
$config['database']['write'][]['table_prefix'] = 'mybb_';
$config['database']['write'][]['hostname'] = 'localhost_write_address';
$config['database']['write'][]['username'] = 'root';
$config['database']['write'][]['password'] = '';


$config['database']['write'][]['database'] = 'mybb';
$config['database']['write'][]['table_prefix'] = 'mybb_';
$config['database']['write'][]['hostname'] = 'localhost_write_address2';
$config['database']['write'][]['username'] = 'root';
$config['database']['write'][]['password'] = '';

Now, in the event that you do have multiple read / write servers setup in the config, MyBB would connect to all the write servers so it can update all of them, and select 1 read server at random. I wish we could easily detect the load of the read servers and pick the lowest one, but unfortunately that’s not very practical yet.

If you are going to have multiple read and write servers, you should put your read servers on a load balancer rather than in MyBB’s config file. The only difference is you would point the read array towards your load balancer.

On a different note, I’m sure you saw the picture at the top of this blog post depicting some code. This code is from MyBB 1.4 and it is of the new code in the ACP; specifically, the Users page in the ACP. I won’t go into detail about all the new code in the ACP but I’ll briefly cover what was shown in that picture.

The first thing you’ll notice is $form->output_row(…). What it does is fairly obvious but just in case, it outputs a row to your MyBB ACP page. The arguments for this function are as follows:


title - string The title of the row.
description - string The description of the row/field.
content - string The HTML content to show in the row.
label_for - string The ID of the control this row should be a label for.
options - array Array of options for the row cell.
row_options - array Array of options for the row container.


output_row(title, description="", content="", label_for="", options=array(), row_options=array())

Now you may be thinking we use pure HTML all the time in $form->output_row. As you look closer at the picture, however, you will also see $form->generate_select_box and $form->generate_check_box, the arguments of which are:


name - string The name of the select box.
option_list - array Array of options in key => val format.
selected - mixed Either a string containing the selected item or an array containing multiple selected items (options['multiple'] must be true)
options - array Array of options for the select box (multiple, class, id, size)


generate_select_box(name, option_list, selected=array(), options=array())

and


name - string The name of the check box.
value - string The value of the check box.
label - string The label of the check box if there is one.
options - array Array of options for the check box (id, class, checked)


generate_check_box(name, value="", label="", options=array())

Those are just two of several functions that allow you to generate code automatically for the new ACP.

Questions? Comments? Anything else?

As with the rest of the Admin CP, the Users & Groups tab packs a huge number of features and functionality in an easy to use interface. Once you use 1.4's Admin CP, you'll be able to tell a lot of planning was put in to forming the best layout possible for all features.

Another overview covering the "Theme & Templates" tab and will be posted within the next few weeks as well as a few other things we haven't covered. We will also get into the questions you left us last week and this week. Leave a comment with your question and check to see if your question has been answered!

There is still some left to cover, but as always, we're happy to hear any questions or feedback you may have. We'll try to take advice on board, but understand it isn't always possible. There's still more exciting parts of the Admin CP left to share, so by no means is this all we'll be posting!

Multiple people contributed to the writing of this article, including MusicalMidget, DennisTT, Tikitiki, Chris Boulton, and Justin S.

MyBB 1.4 Admin CP – The Complete Overview (Part 2)

It’s time for another overview of MyBB 1.4’s Administrator Control Panel – this time, we’ll be covering the “Forums & Posts” and “Tools & Maintenance” tabs, as well as some of the general design decisions made – and how we made them.

Did you know? Many of the Admin CP pages are born by rough sketches by hand from Justin, one of our designers. We then discuss and revise them, and finally implement the finished product in code. We have taken a lot of time to develop pages which let administrators extensively manage their forum, while maintaining the ease of use. Read more about this process in the “Design Decisions” section below.

Sketch of the forum permissions view

Forums & Posts

Forums Management

So, by now, you’re probably drooling for more screenshots. The interface of the Forum Management has changed significantly. The forum listing page has been cleaned up and refined; all of the previous buttons are now condensed to a single drop-down menu. Adding a forum only shows the basic options, but you can show all options by clicking on “Show Additional Options” (the screenshots show this with the additional options already expanded). Copying a forum, however, has remained more or less the same since 1.2.

Forum Management
Adding a Forum
Adding a Forum
Adding a Forum
Copying a Forum

The forum view page (the page you visit after selecting a forum from the primary listing) has radically changed since MyBB 1.2. Although it contains all of the same information, it includes a sleek new interface separated into javascript tabs, where subforums, permissions, and moderators now each have their own tab. This was done to make permissions and moderator management easier and more visible. The permissions tab now combines quick & full permissions, providing the option to set or edit a group’s permissions from the quick permissions table under the permissions tab.

Viewing a Forum
Viewing Forum Permissions
Viewing Forum Moderators
Editing a Moderator

Forum Announcements

The forum announcement manager functions the same as MyBB 1.2. However, unlike past versions, when an administrator edits an announcement, the announcement author will remain the same instead of being changed to the user who last updated it.

Forum Announcements
Adding an Announcement
Editing an Announcement

Moderation Queue

The moderation queue no longer has an option to view Threads and Posts on the same page. This was due to the fact that there are already individual pages to show these, and that even if they were on the same page, they could not be moderated together at once.

The information and options have been optimized in the new layout to use the least vertical space as possible, so as to fit as many posts/threads/attachments onto your screen. Also, there are options at the bottom of the page to mark all entries as approve, delete, or unchanged.

Threads Moderation Queue
Posts Moderation Queue
Attachments Moderation Queue

Attachments

The main change in this section is that the orphan scan encompasses all possible unlinked attachments. These include uploaded files that are not in the database, missing files, leftover attachments due to post deletion, and files uploaded to abandoned posts.

Attachments
Orphaned Attachments

Tools & Maintenance

System Health

When you click on “Tools & Maintenance” in the top tab, you’re taken to the System Health page by default. It’s essentially your standard miscellaneous and useful information page.

System Health
System Health

Cache Manager

Little has changed here, other than a few new caches necessary for MyBB 1.4. Everything else is essentially the same as the cache manager in 1.2.

Cache Manager

Task Manager

MyBB 1.4 introduces a whole new system for running various tasks that otherwise would take up valuable database resources and time to execute. The new Task Manager in MyBB 1.4 allows specific tasks to be run at certain times. You’ll notice you can run any task manually via the Task Manager by clicking the little Alarm Clock.

You will also see some tasks disabled by default. More specifically, the ‘Backups’ and ‘Check Tables’ tasks. This is because they require, or are at least highly suggested, to be run via a cron. The command would look similar to this: “php /path/to/mybb/task.php x” where x is the task id.

Task Manager
Adding a Task
Adding a Task
Editing a Task

Recount & Rebuild

Again you’ll notice that Recount & Rebuild has not had much of a change from MyBB 1.2. However, the page has been cleaned a bit to show all of the tools in much less space, while still providing the same options.

Recount & Rebuild

View PHP Info

There is little to say about the PHP Info page, but as always, it is extremely handy in identifying all of the various settings regarding your PHP installation.

View PHP Info

Backups

Database Backups have received some minor tweaking. You’ll notice [above] that backups can be automated via the new Task System. The ‘Sequential backup?’ option previously found in MyBB 1.2 was designed to help on hosts where a full backup would time out. However, the option has been removed from MyBB 1.4 due to confusion as to its purpose, and is instead a default feature of the backup.

Backups
Backups

Optimize Database

As with MyBB 1.2, you simply select the tables you wish to optimize and perform the task. Little to do on your part, but your database will thank you!

Optimize Database

Administrator Logs

You’ll notice the Administrator Logs has received a fairly good revamp. We log a lot more useful data now and you cannot see it but only Super Administrators can prune logs. In the event a hacker gets in, it will be much harder for them to erase their tracks. Or for that fact, any other misbehaving administrator you may have.

Administrator Logs
Administrator Logs

Moderator Logs

Moderator Logs are essentially the same in MyBB 1.2 with a few changes here and there.

Moderator Logs

User Email Log

With MyBB 1.4 comes the ability to view emails that have been sent via your forum. This can allow you to track abusive or spam messages being sent from other users. You will notice that you can search for criteria and view the email by clicking the subject.

User Email Logs
User Email Logs -> View Email

System Mail Logs

Another new feature introduced in MyBB 1.4 is the ability to view emails that could not be sent due to server errors. This can help pinpoint problems within your mail server or server configuration.

System Mail Logs

User Warning Logs

User Warning Logs, in conjunction with MyBB 1.4’s Warning System allows you to view warnings given by moderators or administrators. You can filter through the warnings and view full details on the warning.

User Warning Logs
User Warning Logs

Design Decisions

MyBB 1.4’s Admin CP was well planned from the start. Several staff members spent hours on end discussing the various improvements that would be made in some of the worse parts of the Admin CP. We all pinpointed some of the interface disasters in MyBB 1.2’s Admin CP, and built the interface for each page from the ground up – countless non-functional “mock-ups” or “prototypes” (some on paper, others in HTML) were created to demonstrate how the page would end up looking. These would then be discussed, all before a single line of code was written for the page in the Admin CP.

Early on, it was decided the 1.4 Admin CP would be tabbed – there were so many different tasks that could be performed, they would have to be divided into different categories. This sort of thing is done all the time, in all sorts of different applications, so it just made sense to do it in the Admin CP too.

Each was then categorized into the different sections – such as Forum Management, Forum Announcements, and so on under the Forums and Posts tab. While some sections could apply to more than one tab, all were put in the most logical location. For instance, general configuration items go under the Configuration tab, whereas those directly dealing with the forums or posts on your board would go under Forums & Posts.

Beneath these sections are the various tasks that can be performed in the Admin CP. Before this point, everything was simply categorizing in order to make finding each task much easier. The Admin CP was designed to make finding individual tasks easier – after all, once your forum has been set up, you’ll usually only go into the Admin CP for just one or two tasks.

You’ll find that for just about every design decision made in MyBB 1.4’s Admin CP, we have a legitimate reason for doing it that way, and not a different way. This is because 1.4’s Admin CP was built from the ground up in order to ensure we could find the best way to design all of the various pages in the Admin CP.

Questions? Comments? Anything else?

As with the Configuration section, there’s a lot you can do under the Forums & Posts and Tools & Maintenance sections, but it’s very easy to use once you dig into the administration panel. It might look confusing now, as all you’re seeing is screenshots, but rest assured that all was planned out to be as well organized as possible.

Another overview covering the “Users and Groups” tab will be posted next week. We will also take time to answer some stabbing questions you may have. Leave a comment with your question and check to see if your question has been answered next week!

There is still a lot to cover, but as always, we’re happy to hear any questions or feedback you may have. We’ll try to take advice on board, but understand it isn’t always possible. There’s still more exciting parts of the Admin CP left to share, so by no means is this all we’ll be posting!

Multiple people contributed to the writing of this article, including DennisTT, Tikitiki, Chris Boulton, and Justin S.