In phpBB 3.0.X MODX files, there were a number of modification methods for modifying the template files that were very commonly used, but are not possible in phpBB 3.1:

[ REPLACE WITH ]
[ REMOVE ]
[ INLINE REPLACE WITH ]
[ INLINE REMOVE ]

As a result, extensions can only add new template code, but can not modify or remove core template code. The current workaround is to hope a block of template code you want to modify or remove has an ID selector, which you can use to manipulate using CSS or JS.

However, a proper/simpler method for changing template code should be provided.

Things that need to be ironed out:
1) The syntax?
2) How it should work, like the EVENTs or some other way (Twig blocks/inheritance?, PHP processing?)
3) What to do when two or more extensions want to modify the same piece of code?

MichaelC wrote:This can be done in the phpBB already by using events to insert conditionals.

No, we (EXreaction and I) actually tried that already. It does not work. Trying to use events to insert conditionals just broke things, and left you with half-rendered output. IIRC, it was because each template event is rendered on its own in TWIG, and therefor it appears to have an opened condition that is not properly closed, so poof, broken PHP.

EXreaction wrote:Which code are you thinking may need total replacing or modification?

For example, my ABBC3 bbcode extension, needs to completely replace the core's bbcode posting buttons template code with new template code. I had to do it using CSS instead, but that's not ideal as the old template code is still delivered, just not displayed.

EXreaction wrote:Which code are you thinking may need total replacing or modification?

For example, my ABBC3 bbcode extension, needs to completely replace the core's bbcode posting buttons template code with new template code. I had to do it using CSS instead, but that's not ideal as the old template code is still delivered, just not displayed.