MyBB Community Forums

Full Version: MyBB 1.9 Development
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Wow, so the template system is suddenly just going to change (nice). But, have you considered the impact in our templates or plugins ? How is the upgrade going to be like regarding the templates system ? Is the upgrade going to be easy for everybody or do we need more technical knowledge (regarding the new template engine) ?

I know 2.0 was to bring all these issues but this isn't 2.0 so I ask.
(2018-03-01, 05:56 AM)Omar G. Wrote: [ -> ]Wow, so the template system is suddenly just going to change (nice). But, have you considered the impact in our templates or plugins ? How is the upgrade going to be like regarding the templates system ? Is the upgrade going to be easy for everybody or do we need more technical knowledge (regarding the new template engine) ?

I know 2.0 was to bring all these issues but this isn't 2.0 so I ask.

Themes/templates will obviously not work with the new template system. Plugins that modify or add templates will also need to be updated. We made this clear when we first discussed with the community the idea of new major versions inside the 1.x line (1.9, 1.10, 1.11, 1.12, etc.). There will obviously also be a beta period for each release (1.9 beta, 1.9 beta 2, etc.) during which administrators and theme/plugin providers can update/test their themes and plugins.

Obviously any big change is going to cause breakage to some degree, but that doesn't mean we should never change things. It was decided that taking smaller controlled steps would be easier for everyone involved, and would yield a better release cycle for the project due to there being less required for each release.
Do you expect plugins to be backward compatible or new releases are necessary/recommended ? I still need to read about the new library but what about inserting and managing custom templates ? To this point there is no easy way for plugins to do so by themselves.
(2018-03-02, 04:09 AM)Omar G. Wrote: [ -> ]Do you expect plugins to be backward compatible or new releases are necessary/recommended?

Any plugins which add, remove or modify templates will need to be updated to support the changes in 1.9.

(2018-03-02, 04:09 AM)Omar G. Wrote: [ -> ]I still need to read about the new library but what about inserting and managing custom templates ? To this point there is no easy way for plugins to do so by themselves.

Perhaps not in 1.9, but I think Euan wanted to add some of the features from frostschutz's PluginLibrary into a core plugins class sometime in 1.10.
(2018-03-02, 04:09 AM)Omar G. Wrote: [ -> ]Do you expect plugins to be backward compatible or new releases are necessary/recommended ? I still need to read about the new library but what about inserting and managing custom templates ? To this point there is no easy way for plugins to do so by themselves.

New releases (where the middle version number change, such as "1.6.0" -> "1.8.0" or "1.8.0" to "1.9.0") have a higher chance of breaking backwards compatibility. Bug fix releases (such as "1.8.14" -> "1.8.15") should not break backwards compatibility.

Twig stores templates in files, rather than the database. It'll still be possible to add custom templates from the ACP, from inside plugins, and inside themes. It'll also still be possible to use the "find_replace_templatesets()" function that developers are used to when developing plugins. The only difference is the way that templates are stored and references (eg: "usercp_drafts_row" becomes "usercp/drafts/row.twig").

Storing templates in files also allows them to be easily edited via FTP, DAV, SSH, or any other remote server access. This means that templates can be edited in any text editor of your choice, and many text editors provide full syntax highlighting for the Twig syntax (PHPStorm does, Sublime text does, VS Code does, Atom does, etc.) along with snippets for the language and more.

I would definitely recommend looking at some of the pull requests for Twig conversions, as they give a good overview of what the actual changes are. Some of the smaller ones I've been working on recently should be very easy to understand:
Just installed it and seems nice and promising, really exciting, cheers !
(2018-03-10, 03:43 AM)Omar G. Wrote: [ -> ]Just installed it and seems nice and promising, really exciting, cheers !

For others reading: There's not much to actually see as a standard user as of yet - the new theme hasn't been implemented in 1.9 yet as Justin is still working on solodifying the design and the ful ltemplate conversion to Twig being completed before implementing it. In fact, we hope that there are no visible differences from 1.8 at all at the moment - that means that the conversion to Twig is working well and is an invisible change as far as users are concerned.
Not to take me wrong but the ever changes of internal system is the main reason of plugin and theme developers losing interest in MyBB modification.
I am not against adapting new technologies, but rework on an old creation is much boring task (even when it requires additional knowledge to learn) and the hard work is just in vain because of compatibility issue ...

I think MyBB devs should take firm decision on choosing the packages to include in MyBB and stick on it or atleast take care of backward compatibility.
If we are going to use 'Twig' why we are not going to use 'Symfony' being its own family and going for 'Laravel'? And if at all such, whats wrong with 'Blade'? I don't know as I am not expert but those are just random questions arrive in noob mind...

.... or, are we thinking about TwigBridge ?
(2018-03-13, 06:13 AM)effone Wrote: [ -> ]Not to take me wrong but the ever changes of internal system is the main reason of plugin and theme developers losing interest in MyBB modification.
I am not against adapting new technologies, but rework on an old creation is much boring task (even when it requires additional knowledge to learn) and the hard work is just in vain because of compatibility issue ...

I think MyBB devs should take firm decision on choosing the packages to include in MyBB and stick on it or atleast take care of backward compatibility.
If we are going to use 'Twig' why we are not going to use 'Symfony' being its own family and going for 'Laravel'? And if at all such, whats wrong with 'Blade'? I don't know as I am not expert but those are just random questions arrive in noob mind...

.... or, are we thinking about TwigBridge ?

This isn’t the first, or the second (and likely won’t be the last) time this has been asked. 

The current 2.0 code already uses the Twig template engine via the TwigBridge library. Adopting it in 1.9 means both 1.x and 2.0 use the same template engine which means that people learning Twig will have that knowledge come across to 2.0.

Why not Blade? It allows arbitrary PHP inside templates, which can quickly become a nightmare when reviewing submitted themes as there could be some dodgy block of PHP hidden inside an otherwise normal looking template. Twig requires you to register functions and filters, making it much safer. Twig is also used in many other products such as Drupal, meaning there is a large amount of documentation that is very well written and lots of people already have experience using it. Additionally, Blade syntax has changed several times over a fairly short amount of time, while Twig is much more stable and standardised - it has had the same syntax for as long as I can remember.
Well explained, was de-touched from MyBB for a while and losing stream. But ...

(2018-03-13, 07:46 AM)Euan T Wrote: [ -> ]Blade syntax has changed several times over a fairly short amount of time, ...

Which is likely going to be a problem with MyBB as well, that was the point of my post, which is not been replied. I was concerned about the consistency of MyBB codes for the interest of theme / plugin devs rather than Twig vs. Blade debate.