Skip to main content
Topic: [ADDON] Tabular Categories (Read 19501 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: [MOD] Tabular Categories

Reply #15

For pretty much every point you make, substitute 'mod' for 'theme' and you see the opposite position. If the theme has total control, mod authors won't make mods or will only support just the default theme and leave users to get on with it in terms of rewriting the code to suit.

Just as it's pointless making themes that do anything daring, it's just as pointless making modifications for anything other than the default theme. Just look back through the support threads for how many mods needed help adding menu buttons to the main menu. Every theme did it differently, so mod authors stopped caring about it.

And before you try to argue that the theme has less control when that happens, it's bullcrap. You seriously want to tell me a theme doesn't have control over menu presentation? Of course it does. I'm sitting looking at a site with a modified DS IceCube right now - the one which removes the Login/Logout/Register buttons from the menu and displays them elsewhere.

Yes, it would be nice if themes had total control and mods played perfectly nicely but the reality is it just doesn't work like that, has never worked like that and never will work like that - and certainly doesn't on any other platform I've ever come across. Take it too far in either direction and the result is good for pure customisation but sucks for users who just want something that works, looks 'nice' and does what they want - which is really what most users want.

Total control for themes = no control for mods, total control for mods = no control for themes. Find a balance that works for you. The thing that annoys me is that you and I have had this debate at least 4 times now and you're still recycling the same old tired argument about how you're constrained. The only person who is constraining you is you. You can make themes how you see fit - it's up to you to make the call not to support mods, thus enabling your complete creativity. If you want to make themes that play nice, suck it up and move on.

Re: [MOD] Tabular Categories

Reply #16

Quote from: Bloc – Cool idea yes, but it kind defeat the purpose of having a theme in the first place. If the Boardindex.template of a theme doesn't show it as tabs, but a mod or a built-in function will - why have a Boardindex.template in the first place?
It still has a board index template. I just shows one category at a time, plus tabs for the other categories. Why is that a problem, if someone wants that layout?
Master of Expletives: Now with improved family f@&king friendliness! :D

Sources code: making easy front end changes difficult since 1873. :P

Re: [MOD] Tabular Categories

Reply #17

Because now themes don't have absolute control over presentation. And why would anyone bother to design a theme if they didn't have total control over the presentation?

Re: [MOD] Tabular Categories

Reply #18

K. Well as soon as you release any theme to the public, someone will immediately start asking how they can change something about it. Hey ho.
Master of Expletives: Now with improved family f@&king friendliness! :D

Sources code: making easy front end changes difficult since 1873. :P

Re: [MOD] Tabular Categories

Reply #19

Hey idea, just coz I'm really bored at the moment, but..............

....if anyone wanted to, it would be really easy to make it so that collapsed categories turned into a row of tabs, and reverted to their normal position when expanded.

Just to confuse matters further, and get Bloc really annoyed. :D
Master of Expletives: Now with improved family f@&king friendliness! :D

Sources code: making easy front end changes difficult since 1873. :P

Re: [MOD] Tabular Categories

Reply #20

* scrap this, I don't why I spend even time on trying to explain. Post edited.
Last Edit: June 02, 2013, 09:12:13 am by Bloc

Re: [MOD] Tabular Categories

Reply #21

I was thinking this could be done in a number of ways, none are bad:
1) boardindex_template_init()
2) hook at the template on all template calls: integrate_template_$template()
3) allow the database to define layers
4) allow the database to define a simple JSON object like [{add_after:{$template, 'boardindex'}}] and then parse that
5) add a hook in all init templates

More than one is possible, but it gets complicated to follow and would definitely require documentation.

Re: [MOD] Tabular Categories

Reply #22

Quote from: Arantor – And before you try to argue that the theme has less control when that happens, it's bullcrap. You seriously want to tell me a theme doesn't have control over menu presentation? Of course it does. I'm sitting looking at a site with a modified DS IceCube right now - the one which removes the Login/Logout/Register buttons from the menu and displays them elsewhere.
 emanuele points to his eternal WIP
Everything is done theme-wise.
http://www.elkarte.net/index.php?action=dlattach;topic=323.0;attach=113;image
http://imageshack.us/photo/my-images/203/screen97.png/
Bugs creator.
Features destroyer.
Template killer.

Re: [MOD] Tabular Categories

Reply #23

Well, I'll try to rephrase the argument another time, last time I promise.

A theme of course is a way to present things to the world.
It may be the usual color variation, it may introduce totally new ways of present things.

Addons are a way to introduce totally new features or change the way a current feature works in a slightly/totally different way.
Addons require interface elements in the vast majority of cases. That's something we cannot avoid.

Do we agree on that?
I hope so.

Now, the current issue is: how a totally revolutionary theme can cope with mods designed to work with "normal" themes?
Out of the box it simply cannot. As simple as that.

Now, what can we do to improve such a situation so that the two can at least not clash vehemently?
We can first of all create some kind of "standardization". One of my goals (and not only mine) is to split different parts of the theme in functions and make easier to re-use "bits" of template in different places.
A very simple example: https://github.com/emanuele45/Dialogo/blob/master/themes/default/index.template.php#L674
This is a function that draws a simple dropdown the a list of boards (grouped by category and indented by child-level). Nothing too scary, but if you a mod wants to add something like that the author will just have to call that function and it will take the appearance defined by the theme.

Now, that's just one part.
The other one are new elements introduced by mods.
Again (like previously said) there is basically no way to have themes supporting out-of-the-box things that they don't know they exist.
So, what can we do? Let theme decide to switch off things it doesn't want? Sound rather harsh to me. In fact you are denying your user a function just because a piece of template doesn't fit into the general design.

We are all working together here to reach our goals, so the path I would chose is to (virtually) sit around a table with the themer (/me considers himself the modder O:-)) and try to find some kind of mediation. What is this mediation?
Considering a mod is something "additional", I could expect it not to fit perfectly into the theme design. I could accept that (I know perfection doesn't exists and even if it exists it would require too much efforts).
A themer may not. Fine, I modder could consider to change the behaviour of my mod when dealing with a certain theme:
Code: [Select]
if (this_is_block_theme_super_uber_cool)
    Template_Layers::getInstance()->addBefore('my_new_layer', 'some_other_layer');
else
    Template_Layers::getInstance()->addEnd('my_new_layer');

Of course this is just an example, there may be tons of alternatives. For example Block you could decide to better support my mod and do the place you want do a simple:
Code: [Select]
if (function_exists('emanuele_s_mod_number_one')
    echo 'something';

Now, what I really don't understand is why you all seem to want to work in complete and utter isolation from the world, without even consider the possibility to collaborate.
I know collaboration costs, but as I already said perfection (if it exists) is difficult to achieve and requires quite a bit of efforts.

What I'm trying to do here is to give people tools that I think are better than what they have now and that should allow them to reduce the barriers on both sides. If the only answer is: themes should have control over everything because otherwise innovation is not possible...well, I could simply give up and wait for your code to show me how things could be done much better and in a simpler way for both modders and themers.


Now back a second on one reply:
Quote from: Bloc – Well, for anyone making themes it will not spur them to create anything that changes more than index.template, since those edits or replacements won't matter anyway if the user wants things changed by mods. Isn't that what you are saying? The decision to use this subtemplate instead of that isn't done by the theme/theme setting..but by the source and the admin. So why should I bother making themes that cater for perhaps multiple "versions" of Boardindex.template? You might build in tabbed categories,then 2 mods come along that makes something different again...it would be pointless to rely on any other things than what the default theme offers.
TBH I don't understand how you are mixing things here.
I'll try to explain you what I'm reading because I'm not sure I got what you wanted to say:

Quote from: Bloc – Well, for anyone making themes it will not spur them to create anything that changes more than index.template, since those edits or replacements won't matter anyway if the user wants things changed by mods.
As I said before mods add something (that's normal), that "something" may be known or not to the theme, that's not something I cannot guess in advance (even though an educated guess may be that the theme doesn't know anything about what the mod adds).
Now, how a new interface element created for a specific purpose relates to the fact that themers wouldn't do anything more than index.template because otherwise things get changed by mods is a mystery to me.

Since I joined SMF I heard the mantra that themers doesn't change anything apart from index.template.php because otherwise mods wouldn't work and users would complain.

Where is the truth?
Are themers not doing something because mods wouldn't work? Are they not doing it because mods will add pieces?
At that point I'm starting believe that they change only index.template simply because is the only thing they care about...

No, I'm saying that if a mod needs to add a new piece of markup, it's easier for it to add it with a function without edit the theme files. I don't know how you can read in my posts that I'm saying themers should not bother change everything because anyway mods will overrule their changes.

Quote from: Bloc – The decision to use this subtemplate instead of that isn't done by the theme/theme setting..but by the source and the admin.
So, you (as themer) would be able to dictate if, when an user wants to create a poll, this user should be able to see the input boxes to fill in the options or not?
That's basically what I understand you are saying: you as creator of the interface are the King of the content and want to have the final word on anything that is displayed to the user.
Of course mine is an exaggeration, but it is to try to understand if what I understood is correct or not.

Quote from: Bloc – So why should I bother making themes that cater for perhaps multiple "versions" of Boardindex.template? You might build in tabbed categories,then 2 mods come along that makes something different again...it would be pointless to rely on any other things than what the default theme offers.
The meaning of this is totally obscure to me.
Why would you create multiple versions of BoardIndex.template?
You want to create a BoardIndex.template with a normal view and one with the tabbed configuration?
Then your users wouldn't need the mod. That seems obvious.
Of course if then they want a mod that adds...whatever, a preview of the latest message posted in a board directly in BoardIndex.template, why should I bother? Everything is already possible (just edit the template file and it's done), I'm not trying to limit anyone, I'm trying to make the life easier for everyone (themers, modders, final users).
Bugs creator.
Features destroyer.
Template killer.

Re: [MOD] Tabular Categories

Reply #24

Quote from: emanuele – Now, the current issue is: how a totally revolutionary theme can cope with mods designed to work with "normal" themes?
Out of the box it simply cannot. As simple as that.
I agree with this. At some point, if you get creative enough, the system will break down to some degree. That just means that anyone who wants to get that creative, and anyone who wants to use the result in combination with other stuff, will have to do a little bit more work. You get that.


QuoteSince I joined SMF I heard the mantra that themers doesn't change anything apart from index.template.php because otherwise mods wouldn't work and users would complain.

Where is the truth?
Are themers not doing something because mods wouldn't work? Are they not doing it because mods will add pieces?
At that point I'm starting believe that they change only index.template simply because is the only thing they care about...
From what I've been able to gather from talking to people and observing their behaviour, I know that mods are part of the problem. If you make a "creative" theme that wont automatically accept all mods without hiccups, you will get a lot of annnoying support requests about all sorts of obscure mods not working with your theme. You will also alienate a large number of non-coding users who might otherwise want to use your theme. So, particularly if you are trying to sell "premium" themes, there's a lot to be said for leaving things as standard as possible. It's boring, but it works.

The other things that I'm convinced are a problem are CSS and semantic markup. Most so-called themers only have a very rudimentary grasp of these, and find them either downright scary or just too much trouble to bother with. With the old table-based layout, things would stay where you put them providing that you got your rowspans and colspans right. The amount of CSS required to make it all work was negligible, and mainly to do with colours and images. This may be inflexible and horrible for a11y, but the apparent stability (assuming desktop only, with limited range of monitor sizes) and the simplicity of the CSS encouraged experimentation to some degree. A11y? What's that? Most themers have never even heard of it.

So now things are at a point where most themers don't want hassles with mods and (apart from a few nutters) don't want hassles with exploding layout shiz. The result is that nobody tries anything out of the ordinary.

Moving from "mods" (traditional SMF version) to "plug-ins" (a la WP) will solve some of the scariness about mods. Inevitably, somebody will still manage to break something, but it should be less problematic on the whole.

The other problem (markup and CSS) is harder to "fix" because it's really necessary for any modern interface. The structure can be simplified, but people will still have to learn how to use markup and CSS properly if they want to innovate. The other day there was a "freelance web designer" over at SMF who didn't even want to edit a basic CSS declaration for a border colour. Not sure what you can do with people like that. :P
Master of Expletives: Now with improved family f@&king friendliness! :D

Sources code: making easy front end changes difficult since 1873. :P

Re: [MOD] Tabular Categories

Reply #25

QuoteI agree with this. At some point, if you get creative enough, the system will break down to some degree.

All due respect but this is not a new argument. As stated, Bloc and I have had this debate multiple times in the past and it goes the same way every time - I point out the shortcomings and the logical and practical flaws (as just outlined above), and Bloc says I don't understand and goes off in a huff.

I get the notion of themes having total control. I understand why this is important and even desirable - it just doesn't work in practice for the majority of users. For a one off site? Hell yeah. Go nuts. Make something awesome. But for general use, for distribution for others to use, no, it just won't work because it requires keeping a degree of agreeing to an implied mutual contract - that both themes and mods have to meet in the middle.

We did some of this, for example abstracting away the <h3 class="catbg"> type stuff - whatever a theme wants to use, the plugin will simply not be aware of it, it's just given meta markup to play with and told to get on with it - both themes and mods therefore have a mutual meeting place, in our case, <we:cat> and <we:title>. The theme does have total control over what markup is used, while plugins don't have to worry about compatibility provided they use it. And if a plugin doesn't, things go wrong.

Thing is, unlike Bloc, I'm not living in some theoretical ideal (it would be lovely if everyone, themers and modders alike had total control)... I recognise the shortcomings of what we did and what is proposed here, but it's all steps in the right direction. It's a very good thing Bloc doesn't design for IPB, XenForo or vB, for his sake.

See, to me, a theme designer that has total control is making it for *themselves*, not for others to use. That's fine, provided that they don't let others use it or have the expectation that things will work, because it just won't.

The thing that a lot of people seem to miss is that I spent a vast amount of time trying to skirt around doing template edits - there is absolutely nothing better at teaching you the limitations of something than trying to do something within those limitations. For a practical demonstration, look at SimpleDesk and in particular a helpdesk department showing on the board index... And without touching the board index template at all. That is the perfect example, in my head, of an add-on ceding control as far as possible to the theme - and STILL it didn't work properly. Admittedly it's more of a limitation of the techniques used than of the idea, and had the board index framework (and template) been a bit more accommodating, it wouldn't have been a problem at all, even for themes to do totally their own thing.

Re: [MOD] Tabular Categories

Reply #26

Quote from: Arantor – See, to me, a theme designer that has total control is making it for *themselves*, not for others to use. That's fine, provided that they don't let others use it or have the expectation that things will work, because it just won't.
Yup. That tends to be my approach these days, when I can be bothered coding, that is. I just get an idea that I want to see implemented, then bloody well implement it come hell or high water.

The other day I had to tell an enthusiastic n00b that regardless of how much he liked the theme I had done, and although I had no particular opposition to making it available, it was so far from the norm that it would be virtually unusable for most people.
Master of Expletives: Now with improved family f@&king friendliness! :D

Sources code: making easy front end changes difficult since 1873. :P

Re: [MOD] Tabular Categories

Reply #27

So you never dare to bet on something new and innovative - in fear of that people might not like or use it? You just make stuff people need, boring as that may be, but ultimately a safe choice?

Re: [MOD] Tabular Categories

Reply #28

How did you ever get that conclusion from what I just said? My point was that I'll make whatever I feel like making, regardless of what it breaks. I'm just not going to hand it out to n00bs who wont have a clue why their mods wont install easily and will want me to do all the custom coding changes for them. I don't have the patience for all of that. If someone who knows what they're doing wants a copy to play with, no problem.

ETA: The n00b the other day that I referred to wanted to use a theme I'd made. I had to explain that I'd virtually rewritten the entire interface from scratch, and that most users would have a hell of a time getting the thing running.

Said theme is arguably one of the most innovative SMF themes ever made.
Master of Expletives: Now with improved family f@&king friendliness! :D

Sources code: making easy front end changes difficult since 1873. :P

Re: [MOD] Tabular Categories

Reply #29

Quote from: Bloc – So you never dare to bet on something new and innovative - in fear of that people might not like or use it? You just make stuff people need, boring as that may be, but ultimately a safe choice?
What Ant said.

Plus: please, show me how you want to let themes and addons/mods cooperate.
I'm fully open to discussion (on code).
Don't forget that themes should be allowed to innovate, but addons should have the exact same possibility.
Bugs creator.
Features destroyer.
Template killer.