mybb2 icon indicating copy to clipboard operation
mybb2 copied to clipboard

Theme system

Open euantorano opened this issue 7 years ago • 1 comments

We need to implement a theme system, allowing custom themes. The default style needs to become a theme that is shipped alongside the core software.

*Desired Features

  • Custom styles per theme, overriding and extending defaults
  • Custom templates/views per theme, overriding and extending defaults
  • Custom JS per theme, overriding and extending defaults
  • SASS support for styles, compiled by backend (using PHP - if this is not possible, we need to evaluate options)
  • TypeScript support for JS, compiled by backend (using PHP - if this is not possible, we need to evaluate options)
  • Styles should be easily distributed as packages, possibly via Composer and also installable via the ACP by upload of a ZIP file or similar
  • Possibly a system similar to WordPress's functions.php file allowing hooks to modify backend output from a theme?

euantorano avatar Sep 30 '17 16:09 euantorano

Regarding the SCSS support, there only seems to be one central package for it which is SCSSPHP. It is also possible to call Gulp/Webpack via Artisan commands, with this in mind you can take the heavy lifting away from PHP, but this probably isn't the best solution as especially production machines will most likely not have any build tools on it.

TypeScript I am not sure about - I haven't ever written JS in TS.

I have an idea, though it's quite a wild one about packages - most people that use MyBB have an account on the website, wouldn't it be great if you could "sync" packages from the MyBB website to your forum? Technically I'm not sure if it will work. Another idea would be to run a registry which contains all the plugins and themes, and people just include the vcs in composer.json so they can quickly add new themes. I realize that this is quite a random idea and may not be what you want, a twist on this could be that instead of syncing them, you can build 'bundles' (think typekit on how they bundle their fonts, you create a kit, add fonts then use the import they give), when they create this bundle it will give them a list to paste into composer.

If this process can be easier than what it is currently - downloading a bunch of zip's isn't exactly the easiest way to do things anymore.

1e4 avatar Jan 04 '18 16:01 1e4