I'd prefer it to be a bit *more* complicated, not less. Not for performance as such (though that's important) but because I'd love plugins to be able to be flexible. For example being able to juggle the order of items around in the poster area and inject new items in between things as desired.
Hmm...
I had an alternative solution in mind, which doesn't really fit your description.
Heck, I'll still mention it...
It's two-fold.
1/ Turning posts into macros. In the template we could have this:
<we:postwrapper>
<we:poster>our poster data...</we:poster>
<we:post><we:abovepost>our post header</we:abovepost><we:postbody>our body</we:postbody><we:belowpost>our buttons</we:belowpost><we:signature>our signature</we:signature></we:post>
</we:postwrapper>
Fill the macros with the usual -- and offer, for instance, an alternative that would use table tags to force buttons and signature at the bottom of a post if the body is just a couple of lines and the avatar is huge. One of the things that has bothered me ever since SMF 2.0 Beta 1 came out...
;)2/ Implement a hook into macro replacement -- i.e. when I'm showing we:postwrapper, I'll automatically call_hook('macro_postwrapper'), where a plugin is then free to add their own code.
Point (2) is something I dabbled with when I was looking at skeleton code -- I mentioned it in my earlier posts (which I have difficulty remembering correctly, I guess I'll have to re-read this topic), I'd really like to add automatic hooks into template functions, so that plugins can add stuff without having to actually add a template override function (which might be already taken anyway...)
Anyway... That was what I was considering, because it's relatively easy to implement, and would allow plugins to add stuff to every post that would use macros.
Then again, this technique doesn't allow plugins to reorder elements within a mini-skeleton. But it also doesn't require us to provide miniature functions for each and every area of every post. I dunno...
Override blocks replace the entire block, often that is not necessarily useful, though it can be for some cases.
Say a template function only consists of function template_something() { echo '<div>'; }... You can replace that with a <table> or a <span>, whatever you want. Of course, more functions = more freedom and also more CPU used. You can't eat your cake and have it
The thing about having such blocks is that they're more for the theme to perform overrides rather than plugins doing it - plugins are going to do it via the skeleton anyway, but it is nice to have the choice.
Yep, but that's precisely why it'd be a good thing to associate a hook with every single template function and their derivatives... (et le cul de la fermière.)
I'd argue that's overkill to be honest. Anyone that really wants to do that will inject into the buffer changes at the end.
That's a better alternative, indeed...