October 15th, 2020 at 9:29 PM
Usually they use a template engine to store the HTML separately from the PHP code. This allows themes to change the HTML structure without editing core code. Some softwares use advanced template engines (such as Twig), while others sort of use more bare-bones approaches (MyBB for example).
I've done quite a few PHP projects at university. We always did our own template engine. I will probably post a tutorial for it at some point (it's about 50 lines, which is not bad). In general, the more it's separated, the better the customizability is from a theme standpoint. I'm not a huge fan of advanced template engines, but the simple ones are very easy to implement.
For simple scripts that don't need a lot of customization, the built in approach works. For FluxBB, it's enough, simplicity is their goal.
I've done quite a few PHP projects at university. We always did our own template engine. I will probably post a tutorial for it at some point (it's about 50 lines, which is not bad). In general, the more it's separated, the better the customizability is from a theme standpoint. I'm not a huge fan of advanced template engines, but the simple ones are very easy to implement.
For simple scripts that don't need a lot of customization, the built in approach works. For FluxBB, it's enough, simplicity is their goal.