2018-01-11, 01:03 AM
(2018-01-05, 06:34 PM)Euan T Wrote: [ -> ]As described in the roadmap I posted recently, the future development of MyBB is going to happen over a series of major releases:
This thread is dedicated to the ongoing development of MyBB 1.9.0.
- 1.9.0
- 1.10.0
- 1.11.0
- etc.
New Features/Changes
Current Status
- Brand new responsive theme, with more semantic HTML5 structure behind it.
- Changing the template system to use Twig. This brings the following improvements:
- Conditionals and loops within templates, removing the need for plugins like the PHP or Template Conditional plugins.
- Ability to include templates from withina template, leading to more flexibility for theme developers.
- HTML in variables in templates is escaped by default - no need to remember to use
htmlspecialchars_uni()
in backend PHP code everywhere. This should lower the chances of inadvertent holes for XSS attacks to leak through due to output not being filtered.
- Ability to register functions that can be called within templates. Functions such as formatting dates according to MyBB settings, checking permissions, and more will be available from straight within templates, making logic muche asier to reason about.
As of the time of writing, progress on 1.9 is still very early. Work is happening in a dedicated develop/1.9 branch on GitHub. So far, there is a single template converted to Twig, which is the User CP drafts page. There is still a great deal of work to be done here, such as finishing converting the header and layout templates, and adding the user CP menu to the page. However, it should make clear the structure:
Timeframe
- All base templates are stored in the "inc/views/base" directory.
- The drafts tmeplate can be found here, and gives a good example of the Twig syntax - it makes use of a loop, layout blocks, comments, and template includes.
- Twig extensions (which provide functions and global templates) live under the "MyBB\Twig\Extensions" namespace. There are currently two extensions registered - one for providing translations inside templates, and another for providing theme support. More extensions will be added as they're needed - such as a User CP extension to provide the User CP menu.
- Twig views are rendered using the "\MyBB\template()" function, as shown here.
It is planned that 1.9.0 will be available at least as a beta verison within the first quarter (Q1) of 2018, though obviously the sooner the better. We welcome any contributions to the effort that people can provide. For example, if you're used to working on Twig, you can follow the below process:
It is my plan that this thread will act as a status log of progress on 1.9, and I will post weekly status update summary posts, which will be linked to in this opening post as they are created. These status sumamries will detail what's been achieved in the last week, and which templates have been converted (and by who, if by somebody outside the team).
- Fork the MyBB repository to your GitHub branch.
- Create a new branch based upon
develop/1.9
.
- Convert a template to Twig, and test it locally.
- Create a Pull Request to the MyBB repository against the
develop/1.9
branch.
- The team will review and merge the PR, knocking another template off the list to convert!
Would this thread be better off in it's own 1.9 forum?
Or...
At least rename this 1.10 to 1.9.
Either way is the more logical use of the correct versions and it's discussions of those respective versions.
Discussing 1.9 version inside a 1.10 forum seems illogical to me.