Only display 'Redirect boards' when there actually are any

Dr. Deejay

  • Happy new year all!
  • Posts: 118

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Only display 'Redirect boards' when there actually are any
« Reply #16, on July 26th, 2012, 11:36 AM »
Quote
I think SMF was trying to head in this direction as you can choose different templates per board
Well, assuming you mean the choice of themes per board, that's primarily so that you can theme different areas of the site relatively easily, and pretty much unrelated to what I'm talking about.
Quote
Maybe even better is to split the template sections up into groups where each section of a template is selectable.
Still not really what I'm talking about, though sort of.


What I'm getting at is that right now, the board index can only display one of two things, a regular board or a redirect board. If you want anything different, tough. What I want to do is be able to give plugin authors and theme authors the ability to restyle it without having to fight too much to make it happen.
When we unite against a common enemy that attacks our ethos, it nurtures group solidarity. Trolls are sensational, yes, but we keep everyone honest. | Game Memorial

Nao

  • Dadman with a boy
  • Posts: 16,080
Re: Only display 'Redirect boards' when there actually are any
« Reply #17, on July 27th, 2012, 05:33 PM »
Quote from Arantor on July 26th, 2012, 05:18 AM
Actually, I was debating going one step further. I agree that default board state icons per board type would be good, but what if we provided the option for different templates for displaying in the board index?
You mean, per-board templating...? i.e. load the list of boards, then for each board, determine type, and load the correspond template block. Render. Rinse and repeat.
Posted: July 27th, 2012, 05:29 PM
Quote from nend on July 26th, 2012, 05:32 AM
I think SMF was trying to head in this direction as you can choose different templates per board, but having different templates per area within a main template is more appealing then the mess of installing multiple templates just to use a message template from it.
Yup...
Quote
Maybe even better is to split the template sections up into groups where each section of a template is selectable. Say you can release a template but it may contain a few files for the post display. Maybe these can be stored in a main template that only contains minor templates that modify little stuff and rely on a main templates CSS for styling or maybe the minor template can have its own CSS which it specifies the system to load with the main template.
As you may remember, I rewrote the templating system for Wedge last year or so. What Wedge supports now is a skeleton where you determine a list of blocks to load from the available templates. You can load multiple templates (as long as you use different function names of course), so it's very easy to have a MessageIndex.template.php file with a function template_type_blog() and a function template_type_board(), which is pretty much how we do it already...
We have yet to delve[1] further into it, it's pretty much done for per-page templating, but it's very much doable for per-board (or per-topic) templating as well... Which, of course, we'll eventually do.
 1. Always thought it was spelled 'dwelve'...

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Only display 'Redirect boards' when there actually are any
« Reply #18, on July 27th, 2012, 06:04 PM »
Quote
You mean, per-board templating...? i.e. load the list of boards, then for each board, determine type, and load the correspond template block. Render. Rinse and repeat.
Yes. Not quite as complicatedly as that, but yes. I wasn't planning on doing anything particularly glamorous or elegant, but functional. (i.e. just calling the relevant template function with the current board's row as its details)