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 ) 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:
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:
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:
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:
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.
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.
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).