Themes vs Skins vs Plugins
-
I am hoping to dive into nodebb a bit more over the next couple of weeks and learn how to modify and customize it for our community. I noticed that there are three ways to customize the forum: themes, plugins and skins. I was wondering if someone could explain first at a high level what the difference is between these three ways. It would also be great if you could give a couple of examples as when each of those would be suitable. I specially like to know where the boundaries or limitations are set for each of these.
-
In a nutshell:
- Skins
- No experience with CSS/JS/HTML required, pick a skin, slap it on. Looks good? You're done.
- If you know CSS, use a skin in conjunction with the Custom CSS tab to make minor style modifications
- Theme
- HTML and CSS experience required -- can include customisation of the actual HTML on each page's template, and allows greater flexibility for achieving the desired look/feel
- Plugin
- Modify behaviour. e.g. On a new post, ping a web service... etc.
Plugins don't necessarily supercede Themes, nor vice versa. In actuality, themes can be treated as plugins, so a theme can modify behaviour as well.
- Skins
-
Specifically, as far as skins are concerned, we are using Bootswatch to power it. Their themes are all open source so it's actually possible if you know some LESS/CSS to build your own and submit it to them
-
Thanks for the quick reply you two, that makes more sense. But I am still a bit unclear about the plugin vs theme distinction.
Plugins don't necessarily supercede Themes, nor vice versa. In actuality, themes can be treated as plugins, so a theme can modify behaviour as well.
So if I understand correctly both plugins and themes technically have the same privileges when it comes to customizing your site, correct? Is the destination really in the scope of how much modifications they should do? For example if I am going to create a site based on nodebb but make a lot of big changes in look and behaviour I should develop a theme, but if I am going to add a special rating button to each post then I would use a plugin?
we are using Bootswatch to power it. Their themes are all open source so it's actually possible if you know some LESS/CSS to build your own and submit it to them
That is really awesome, there are lots of really good options there. I think I will focus on developing my own theme or plugin to add custom behaviour and use one of the skins to style it.
Is it safe to assume only one theme will be used at a time, but multiple plugins can and should happily coexist? So if what I am going to do is modifying a lot of things and there is a high chance of collision with other plugins, then I should turn my project into a theme, right?
I am somewhat familiar with the wordpress theme/plugin system when both can modify the behaviours, but I think in wordpress the plugin API is a bit more limited compared to the theme API. How does nodebb plugin/theme concept compare to wordpress?
I should mention that I am a JavaScript developer working on both frontened and nodejs backend, so if you can explain a bit more about the technical differences between theme and plugin that would help me understand.
Finally as someone who is going to start hacking nodebb, do you recommend theme or plugin as a starting point?
Sorry for many questions, but I like to understand this properly before diving in. I made that mistake with wordpress a couple of years ago when decided to develop a plugin where I really should have made a theme. So I want to get things right this time
Thanks again!
-
@arasbm As a recent NodeBB explorer (and NodeJs) I'll suggest you to start with the harder of plugins and themes and it's plugins.
As I understand the thing :- Plugin is a custom behaviour that could work on every NodeBB forum and that is not based on the theme. It should be configurable (if needed) and not conflict. It try to solves a problem that is experience related.
- Theme is how you want your NodeBB forum to look like. It's easier to go inside because it's based on a sublime api and it's just css/html and and a bit of JS. If you want you theme to create a custom behaviour that is only applicable to itself then you can because themes are created and treated like plugins.
You can take a look at the api on every NodeBB page with{origin}/api/{path}
Both plugins and themes can make the use of the api and write content to use after. Take a look of the existing ones and you'll have a good point of view to start developing you owns.