• IMPORTANT: Welcome to the re-opening of GameRebels! We are excited to be back and hope everyone has had a great time away. Everyone is welcome!

MyBB 1.9 Development

Referal

Well-Known Member
Joined
Mar 22, 2017
Messages
661
Reaction score
58
As described in the roadmap I posted recently, the future development of MyBB is going to happen over a series of major releases:
  • 1.9.0
  • 1.10.0
  • 1.11.0
  • etc.
This thread is dedicated to the ongoing development of MyBB 1.9.0.

New Features/Changes
  • 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.
Current Status


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:
  • 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.
Timeframe

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:
  • Fork the MyBB repository to your GitHub branch.
  • Create a new branch based upondevelop/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!
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).

What do you guys think of 1.9 are you guys egar or excited to see 1.9 in the future releases of MyBB for I am super excited to 1.9 this can have better themes and addons/plugins in future so this good news
Retrieved from: https://community.mybb.com/thread-215211.html posted by Euan T
 
Top