ElkArte Community

Extending Elk => Addons => Topic started by: emanuele on May 30, 2013, 01:20:40 pm

Title: [ADDON] Tabular Categories
Post by: emanuele on May 30, 2013, 01:20:40 pm
Inspired by a recent mod request (the usual annoying one :P) and by Yoshi's mod, I decided to give a try to the new layers I was working on.
And here it is: just a very simple mod that changes a bit the front page creating a "tabbed" interface with categories as tabs.

Let's say it's just something funny to demonstrate how easy it is to change the interface playing only with layers.

Tabular Categories v0.1.0

License
o This ElkArte Addon is subject to the terms of the BSD "3-clause" license. You can obtain a copy of the License at http://opensource.org/licenses/BSD-3-Clause

Features


Repository / Download



Change log

Title: Re: [MOD] Tabular Categories
Post by: Arantor on May 30, 2013, 01:44:42 pm
Pics or it didn't happen :P
Title: Re: [MOD] Tabular Categories
Post by: emanuele on May 30, 2013, 02:22:06 pm
(http://img825.imageshack.us/img825/7818/screen97h.th.png) (http://img825.imageshack.us/i/screen97h.png/)
(http://img694.imageshack.us/img694/2870/screen97w.th.png) (http://img694.imageshack.us/i/screen97w.png/)

/me was in a hurry (food was calling O:-))
Title: Re: [MOD] Tabular Categories
Post by: Arantor on May 30, 2013, 02:52:15 pm
Slick, very slick.

FWIW I've been thinking about this too, but not as discrete tabs like that, instead putting them directly on the main menu (and having the boards as part of the dropdown) but that's really complicated in terms of the crazy menu editor stuff I've been doing (representing a hierarchy in a table is hard work)
Title: Re: [MOD] Tabular Categories
Post by: emanuele on May 30, 2013, 03:34:17 pm
The theme reacts quite well, even with enough categories to create a second line it still looks good.
Ant did a very good job! :D
Title: Re: [MOD] Tabular Categories
Post by: TestMonkey on May 30, 2013, 04:09:35 pm
Nice :)

/me notes that we need to rewrite and switch the definition and namespace. There are no changes yet, but that's just as yet.
Title: Re: [MOD] Tabular Categories
Post by: TE on May 31, 2013, 12:33:41 am
Nice one, would be cool as a core feature (with an option  to enable and disable)  :D
Regarding the styling of the "category tabs": http://twitter.github.io/bootstrap/components.html#navs
I personally prefer "tabs" instead of "buttons" but that's just cosmetics ..
Title: Re: [MOD] Tabular Categories
Post by: emanuele on May 31, 2013, 06:42:27 am
Quote from: TE – Nice one, would be cool as a core feature (with an option  to enable and disable)  :D
Naaahhh....
It's just a js/css trick, it relies too much on the theme to have a certain structure and certain set of ids and classes.
I wouldn't have it as a core feature. At least not as it is.

Quote from: TE – Regarding the styling of the "category tabs": http://twitter.github.io/bootstrap/components.html#navs
I personally prefer "tabs" instead of "buttons" but that's just cosmetics ..
I'm not good with styling, I just copied the first thing was at hand. :P (And you may also notice the tables are missing some borders. ;))
Title: Re: [MOD] Tabular Categories
Post by: TE on May 31, 2013, 10:02:56 am
Quote from: emanuele – (And you may also notice the tables are missing some borders. ;))
uups, bug in the theme? haven't noticed yet, which browser are you using?
Title: Re: [MOD] Tabular Categories
Post by: emanuele on May 31, 2013, 10:26:37 am
Nope, not a bug.
It's the way the tables are designed, the tr:first-child has:
Code: [Select]
border-top: medium none currentColor;
that ends up in a sort of no border.
Title: Re: [MOD] Tabular Categories
Post by: Antechinus on May 31, 2013, 06:50:17 pm
Is a cool idea for a mod. You could add text-overflow to the css to stop long category names making huge tabs. That would make things a bit neater.
Title: Re: [MOD] Tabular Categories
Post by: Bloc on June 01, 2013, 05:17:30 pm
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?

One thing is to inject template code from mods into layers - which the theme can't know about - , but taking over basically what the theme should do, is quite another. Not to mention bewildering..where do i go to change the appearance of how those tabs are laid out or even the position? Do I go to the theme..? No, to the source code then? But I should not change source code should i?..

And if the template code IS in the theme(better then) then its basically "doing it in the theme" anyway then, isn't it? You just set a core setting instead of a theme setting.
Title: Re: [MOD] Tabular Categories
Post by: Arantor on June 01, 2013, 06:14:22 pm
You'd approach it the same way the menu is handled: the tabs and their existence and function is dictated by the core but the presentation can be handled by the theme. Not seeing a problem here.
Title: Re: [MOD] Tabular Categories
Post by: emanuele on June 01, 2013, 07:26:17 pm
Please let's not start religious wars between "source" and "theme", I had my fair amount with Ant. :P

Let's have a quick look at the "source" file of the mod (at least a version without useless things that I forgot to remove :P):
Code: [Select]
<?php

function tabular_categories()
{
loadTemplate('TabularCategories');
Template_Layers::getInstance()->addEnd('tabular_categories');

loadCSSFile('TabularCategories.css');
}

So it simply:
load the template
inject the layer
* load the css file (why here? Because the "source" takes care to aggregate and minify it if needed)

This is exactly what the source should do, nothing more, nothing less. It instruct the template what to to.
And is no different from any other Elk file.
It doesn't do any check because the mod is simple and want to be just like that without multiple checks on admin and/or use settings (let's remember this is just a demo to show how to use a new function, not a fully fledged mod with options all over the place).

Then the template file:
Code: [Select]
<?php

function template_tabular_categories_above()
{
global $context, $scripturl;

$current_cat = current($context['categories']);
addInlineJavascript('
$(document).ready(function () {
var current_cat = ' . $current_cat['id'] . ';
if (window.location.hash)
current_cat = window.location.hash.substring(2);

$("#boardindex_table .header").hide();
$("#boardindex_table .divider").hide();
$("#boardindex_table .content").hide();
$("#category_" + current_cat + "_boards").fadeIn();
$("#tabcat_" + current_cat + "").addClass("active");

$("#tabular_cats li").click(function () {
$("#tabular_cats li").removeClass("active");
var id_cat = $(this).attr("id").split("_")[1];
$("#boardindex_table .content").hide();
$("#category_" + id_cat + "_boards").fadeIn();
$(this).addClass("active");
return false;
});
});', true);

echo '
<div id="tabular_cats" class="cat_bar">
<h3 class="catbg">
<ul>';
foreach ($context['categories'] as $category)
echo '
<li id="tabcat_', $category['id'], '"><a href="', $scripturl, '#c', $category['id'], '">', $category['name'], '</a></li>';
echo '
</ul>
</h3>
</div>';
}

It outputs the markup and the javascript needed. Nothing more, nothing less.
During a first approximation I put the javascript code in the subs file, but then I realised different themes may use different ids or classes, so I decided to move it to the theme and still take advantage of the addInlineJavascript function (that if needed will aggregate and minify the code if I remember correctly, but that anyway is always cleaner to use because with the second parameter set to "true" the code will be added at the end of the page all in one big chunk).

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?
No, it doesn't defeat at all the purpose of having a theme because the template can be changed for each and every theme installed and customised the way you want (including markup, javascript and css).

Quote from: Bloc – One thing is to inject template code from mods into layers - which the theme can't know about - , but taking over basically what the theme should do, is quite another. Not to mention bewildering..where do i go to change the appearance of how those tabs are laid out or even the position? Do I go to the theme..? No, to the source code then? But I should not change source code should i?..
You perfectly know that the difference between "theme" and "source" has always been a tiny line in Elk/SMF. I'm not saying this is the perfect final solution, I'm saying this is a possible improvement in comparison with the previous situation.

Now, debate if show the board index as tabs or as a list is a matter of the "theme" or of the "source" is totally academic. We all know that if a user wants tabs, he will not care if the theme has been designed to use tabs or not, he wants them no matter what.
Obviously if we introduce the thing as a core feature most likely all the themes will support the dual option without having to argue if it is good or bad, so this argument is sort of useless, sorry.

Additionally, since the mod uses a template function to style the tabs, what you need to do, is just to add your own TabularCategories.template.php file and a dummy function inside it:
Code: [Select]
function template_tabular_categories_above()
{
// This theme is *not* designed to use tabular categories, do *not* edit this function without my (the author) written permission and the sacrifice of a virgin.
}
just to stay on the safe side, the function is not even necessary.

Quote from: Bloc – And if the template code IS in the theme(better then) then its basically "doing it in the theme" anyway then, isn't it? You just set a core setting instead of a theme setting.
???

Obviously the "theming" is done in the theme.
And the "decision" to show something or not is done elsewhere.

If you think about it, this is not very different from what you have now, the only actual difference is that this approach is just another step to have a better separation between the "core" and the "addons" (with all the advantages this will bring, like easier upgrades, less troubles during installation of mods, mods will work out-of-the-box on themes installed after the mod has been installed and so on).
Title: Re: [MOD] Tabular Categories
Post by: Bloc on June 01, 2013, 09:43:52 pm
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.

It seems it won't be much different than SMF now, with hardly anything else than color variations of default theme. You see, my "war" isn't about mods and themes as such, but more about letting themes be what they can be. As long as boundaries are set like this, they never can be....I am overly dramatic here, I know, :D but think about it - as a theme creator, why would you try to play catch-all in this?
Title: Re: [MOD] Tabular Categories
Post by: Arantor on June 01, 2013, 10:08:22 pm
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.
Title: Re: [MOD] Tabular Categories
Post by: Antechinus on June 01, 2013, 10:46:59 pm
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?
Title: Re: [MOD] Tabular Categories
Post by: Arantor on June 02, 2013, 12:18:16 am
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?
Title: Re: [MOD] Tabular Categories
Post by: Antechinus on June 02, 2013, 12:51:13 am
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.
Title: Re: [MOD] Tabular Categories
Post by: Antechinus on June 02, 2013, 02:19:16 am
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
Title: Re: [MOD] Tabular Categories
Post by: Bloc on June 02, 2013, 05:28:16 am
* scrap this, I don't why I spend even time on trying to explain. Post edited.
Title: Re: [MOD] Tabular Categories
Post by: Joshua Dickerson on June 02, 2013, 10:35:15 am
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.
Title: Re: [MOD] Tabular Categories
Post by: emanuele on June 02, 2013, 04:24:03 pm
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.
/me points to his eternal WIP (http://www.elkarte.net/index.php?topic=271.msg2463#msg2463)
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/
Title: Re: [MOD] Tabular Categories
Post by: emanuele on June 02, 2013, 05:32:33 pm
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).
Title: Re: [MOD] Tabular Categories
Post by: Antechinus on June 02, 2013, 06:32:43 pm
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
Title: Re: [MOD] Tabular Categories
Post by: Arantor on June 02, 2013, 06:49:03 pm
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.
Title: Re: [MOD] Tabular Categories
Post by: Antechinus on June 02, 2013, 07:05:02 pm
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.
Title: Re: [MOD] Tabular Categories
Post by: Bloc on June 03, 2013, 08:13:32 am
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?
Title: Re: [MOD] Tabular Categories
Post by: Antechinus on June 03, 2013, 08:28:43 am
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.
Title: Re: [MOD] Tabular Categories
Post by: emanuele on June 03, 2013, 09:56:48 am
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.
Title: Re: [MOD] Tabular Categories
Post by: Arantor on June 03, 2013, 10:24:26 am
QuotePlus: please, show me how you want to let themes and addons/mods cooperate.

And that's where it falls down. He doesn't, going by previous discussions. Themes have top banana, mods can go to hell.

http://wedge.org/pub/plugins/7823/post-fields/ (esp. reply #5 onwards)
http://wedge.org/pub/7886/wedge-templating-for-designers/ for example.
Title: Re: [MOD] Tabular Categories
Post by: TestMonkey on June 03, 2013, 11:02:55 am
There is certainly a lot of room for improvements. I, for one, entirely agree with the principle that the core handles the behavior, functionality, data, and presentation of this data is the job of the theme. I believe SMF is doing it in a measure, but too little.
But this is a goal to tend to. This goal won't of course be any "100% or it means nothing" for obvious reasons. Not in the least that add-ons present things (of course).
I honestly feel it's better if we can keep this discussion constructive, and figure out more ways to improve the situation as left in SMF2.0.

There are already improvements on the path we have chosen, since pre-2.0 even. Hooks, starting up template 'bits' or sections ("building blocks"), the work on layers. Most of the work of Elk has been on the core until recently (afaict), to make it able to be extensible and reusable. Then, we have made some improvements on the template engine and default theme, and there's a lot of work in these areas to still do IMHO. If you have further proposals or improvements, please feel free to share them. If you wish to make them better, do it.

Testing and documenting how to make an add-on, testing how to make a custom theme, and what are the issues cropping up is already of big help, IMHO. :)
Title: Re: [MOD] Tabular Categories
Post by: Bloc on June 03, 2013, 03:37:53 pm
Quote from: Arantor –
QuotePlus: please, show me how you want to let themes and addons/mods cooperate.

And that's where it falls down. He doesn't, going by previous discussions. Themes have top banana, mods can go to hell.

http://wedge.org/pub/plugins/7823/post-fields/ (esp. reply #5 onwards)
http://wedge.org/pub/7886/wedge-templating-for-designers/ for example.

Funny that. I worked on TP for a number of years, and think I have an idea of what it means for mods and themes to cooperate AND how to make seamless integrations where possible, work within constraints. True, I favor themes nowadays, because no-one else does and because they appeal the most to me. But from that saying that I don't give a damn about mods, is a typical Arantor argument. The wheel keeps spinning here.. my old arguments, mostly said out of frustration with said individual is used as sort of argument in itself. "look, see here, he said that there!"..like we are in kindergarden or something.

Testmonkey,
you are absolutely right, so i will not stir up things more than I have(it seems). I love working with finding solutions to both areas mod/theme in SMF(or forked SMF as it may be), and improving core as well(to my best capability, I am quite humble about that part). Its just hard to find people that share the vision I see, and I mistakenly though Elkarte people were onto a similar path. But maybe we can learn from each other instead - from a distance.
Title: Re: [MOD] Tabular Categories
Post by: Arantor on June 03, 2013, 03:43:35 pm
Quotemostly said out of frustration with said individual is used as sort of argument in itself. "look, see here, he said that there!"..like we are in kindergarden or something.

No, it's more that this is precisely the same debate, yet again, with you banging on about the same thing and still not actually providing anything more than hyperbole to actually support it. Don't just go 'themes should have total control over layout'... show us how it's done, show us how to make it work.

QuoteIts just hard to find people that share the vision I see, and I mistakenly though Elkarte people were onto a similar path

They probably are. But they, like me, appear to have noticed the lack of anything but idealism in what you're proposing. Like I said, like Ant said, it's great if you're building something for just you. Trouble is, none of us here are building things entirely for us but with a view to giving them to other people to play with - which is naturally a constraint.

I'll bow out, leave you and Elkarte to forge a new path if you think you can manage it.
Title: Re: [MOD] Tabular Categories
Post by: Antechinus on June 03, 2013, 07:36:38 pm
Quote from: Bloc – I love working with finding solutions to both areas mod/theme in SMF(or forked SMF as it may be),.....
Ok, but exactly how do you propose to make it all work? Sooner or later, you'll have to hit a point where some compromise is required. This point will be partly determined by personal preference. I'm all for giving themes as much control as is feasible, but I realise it probably can't be 100% control.
Title: Re: [MOD] Tabular Categories
Post by: TestMonkey on June 08, 2013, 08:45:32 pm
Quote from: Bloc – Its just hard to find people that share the vision I see, and I mistakenly though Elkarte people were onto a similar path.

I actually think we are on a similar path - at least in intentions on results. I'm only saying, constructive != holy wars. :)
Moreover, the path is what you make it be. :)

Elk is what SMF should have done, and it won't. Or to put it simply, the next version of SMF is changing name.
As an Open Source project with open development, Elk is driven by its development community, sharing with everyone who aligns their goals to it. At the end of the day, methinks we all know that code speaks. If there is an issue with what we did so far (which is more than possible), please file an issue, point it out, let us know what, why, and how we could fix it. If there is something you want it to do, do it. ;)
Title: Re: [ADDON][DEMO] Tabular Categories
Post by: emanuele on November 26, 2013, 02:00:18 pm
Updated the OP with a new download link and a new screeshot matching the new release. :)
Title: Re: [ADDON][DEMO] Tabular Categories
Post by: emanuele on June 26, 2014, 07:04:58 pm
This evening while looking at another forum script (don't remember the name and it's a bit too late to go back and find it), I got an idea about this mod.
See the attachment. O:-)

ETA: updated the first message with the new release. :)
Title: Re: [ADDON] Tabular Categories
Post by: stanstrup on June 15, 2016, 08:54:15 am
How do you switch to the sidebar? I couldn't find any settings for the addon.
Title: Re: [ADDON] Tabular Categories
Post by: emanuele on June 15, 2016, 11:09:35 am
You should find it in admin > config > addon settings > miscellaneous
"Show the category tabs on the side".
Title: Re: [ADDON] Tabular Categories
Post by: stanstrup on June 16, 2016, 08:30:44 am
Nothing there :( I only see the Google Analytics settings under miscellaneous. Perhaps they don't like each other?
Title: Re: [ADDON] Tabular Categories
Post by: stanstrup on June 17, 2016, 03:20:02 pm
Tried to uninstall Google Analytics but that didn't change anything.
Title: Re: [ADDON] Tabular Categories
Post by: emanuele on June 17, 2016, 05:43:21 pm
Darn, a couple of spaces slipped in the integration code...
Download that version:
https://github.com/emanuele45/tabbed_cats/releases/tag/tabcat_0.1.1
Title: Re: [ADDON] Tabular Categories
Post by: stanstrup on June 17, 2016, 05:54:04 pm
Now the checkbox appears and it works. But there is no text to explain the checkbox...
Title: Re: [ADDON] Tabular Categories
Post by: stanstrup on June 17, 2016, 06:13:23 pm
Found another funny thing. If you resize the window after clicking a forum category it will show the full list. Clicking again shows only the category as expected.
Title: Re: [ADDON] Tabular Categories
Post by: emanuele on June 17, 2016, 06:39:17 pm
That's indeed pretty funny. xD
Title: Re: [ADDON] Tabular Categories
Post by: DeadMan on February 05, 2023, 10:11:51 pm
@emanuele  or @Spuds
For some reason, I can't find the fix that was told before about how to fix this issue.
Installed the addon, like have done on other sites, and all categories still show, the category headers, not the boards.
I can't remember what the fix was.

(Link-10244)
Title: Re: [ADDON] Tabular Categories
Post by: DeadMan on February 07, 2023, 04:54:13 pm
I found the fix for this:

BoardIndex.template.php

Code: (Find & Remove) [Select]
		
<header class="category_header">';

// If this category even can collapse, show a link to collapse it.
if ($category['can_collapse'])
echo '
<a class="chevricon i-chevron-', $category['is_collapsed'] ? 'down' : 'up', '" href="', $category['collapse_href'], '" title="', $category['is_collapsed'] ? $txt['show'] : $txt['hide'], '"></a>';

// The "category link" is only a link for logged in members. Guests just get the name.
echo '
', $category['link'], '
</header>
Title: Re: [ADDON] Tabular Categories
Post by: Spuds on February 14, 2023, 10:14:11 am
Glad you got it sorted.  I've never looked at this addon  :zipper_mouth: