News:

Join the Facebook Fan Page.

Main Menu

Portal style blocks

Started by Arantor, February 19, 2022, 10:31:15 AM

Previous topic - Next topic

Arantor

I'd love to see the introduction of blocks, widgets, whatever you want to call them as a core concept.

Now before we get into the 'whoa making a portal core' OMG BLOAT, hear me out.

Firstly, I'm not really talking about a full blown portal, I'm talking about a system of reusable widgets you can place in different parts of the site. The reality is there are several parts of the system that should have been built this way originally and weren't for reasons.

Think about it: when you add 'who is viewing this thread' via theme settings, isn't that really adding a block of self-contained functionality? (Right now it's mashed in with the topic listing or the topic view itself)

Or the moderation area, which is really a collection of blocks. Or the admin front page, which has two blocks on it (one of which was also awkwardly duplicated to the 2.0 moderation centre)

So that's the first step, refactor out widgets of functionality into their own pieces of code and make it possible to drop them into the page in various places. Leaving it to a portal makes it feel like an afterthought when it could easily be a very nice core feature.

You could even go a bit further and implement a block that contains other blocks. Which would mean you could turn the entire info centre's *sections* into blocks, group them into a single block whose permissions you could control easily.

Think about that for a moment: how often do people ask about hiding the info centre or changing what's in it? Wouldn't it be great if that were possible without too much pain? Well, there's no fundamental reason why not.

And from a bloat perspective, it's actually *not*. Because half of the stuff that should be blocks is already sort-of blocks in the code except not in a reusable, pluggable way and this would get you so much potential for comparatively little work.

Arantor

And really, https://www.simplemachines.org/community/index.php?topic=580808.0 is just another example of the concept: make a calendar events widget, display it wherever you like. Can even be the same actual code the proposed info centre rework uses.

Just to add, making it part of the core means you can also do nice things about collapsibility of the blocks with flexboxes so that the content flows naturally and theme authors can rely on this functionality being available in the core rather than having to be boxed in with the usual portal vs theme dramas.

Doug Heffernan

Do you mean like some sort of a cms type of thing @Arantor? This will make Smf 2.1. even better. It will give the paid forums a run for their money.

Arantor

Not a CMS exactly, more turning what's already there into something more modular.

XF already does this - their info centre on the front page is made of several widgets and there is a defined list of places widgets can be added.

I'm really not thinking about a full blown CMS here, just logical evolution of what is there.

Doug Heffernan

Quote from: Arantor on February 19, 2022, 04:52:39 PMNot a CMS exactly, more turning what's already there into something more modular.

XF already does this - their info centre on the front page is made of several widgets and there is a defined list of places widgets can be added.

I'm really not thinking about a full blown CMS here, just logical evolution of what is there.

I know what you mean now. Hopefully it will be taken into consideration and implemented. Smf will have to change its name to Advanced Machines Forum if all these cool stuff will be added :D

Diego Andrés

You already have a similar topic and you mention the moodle blocks and that's really nice

SMF Tricks - Free & Premium Responsive Themes for SMF.

Arantor

Did I have a previous topic? I didn't look. But consider this a reinforcement of how much value I think the idea really has. (I haven't touched Moodle in almost a year. I've worked on multiple Laravel code bases plus WordPress since then. Come to think of it, that's how Gutenberg approaches content too.)

It's not like this is theoretical either, even down to the 'multi block holding the info centre' because I have a working prototype but adapting it back to SMF would be painful at this point.

Diego Andrés


SMF Tricks - Free & Premium Responsive Themes for SMF.

Kindred

Actually, ot would not take that much... I'm already doing part of that with my custom theme via css
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Diego Andrés

Kindred writing css in 2022, off to a good start this year huh

SMF Tricks - Free & Premium Responsive Themes for SMF.

Antechinus

He had to start learning sometime. ;)

Arantor

That's really really not what I mean though.

Can you place the info centre on another page entirely with CSS? That's what I'm proposing here: take hunks of content/functionality that already exist and decouple them from the pages they're currently hard-coded to be on.

Antechinus

Yes, completely different concept. And you did explain it clearly in your OP. :)

It seems like a good idea in principle. If you think it can be done with next to no bloat or performance penalty, then it's probably worth doing. Out of curiosity: how hard do you think it would be to do as a mod?

Arantor

Do I think it can be done with next to no bloat? You know you already saw a screenshot of it, right? I already implemented a version of this ;)

Could it be done as a mod? It already has, several times, it's called SimplePortal/TinyPortal/LightPortal etc. etc.

The whole point is to not write yet another mod reinventing the same concept and instead implementing the most useful part as a framework for the future, as part of the core.

Kindred

No, I understood what you meant.
I was just saying that it's already partially started, in terms of the ability to style some of that as a block and hide/display that block.

Adding a modular functionality to add or remove that display from a page (based on the action, probably) is not a bad idea for 3.0


As for the other comments...   😜

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

tmachu

I like @Arantor suggestion, just want to mention it. The feature will be useful and practical, so I think it's a good idea.

Advertisement: