Edit MyBB templates and CSS in the MyStudio theme editor

amtekkie · Today

A full code editor inside the MyBB Admin CP: a file tree, tabs, syntax colours and autocomplete. Press Ctrl+S and the forum updates.

In short
  • Open it with Edit on a theme card in MyStudio → Themes
  • Every save passes MyBB's template security check
  • Edit a child theme, never the shipped themes
MyStudio theme code editor in the MyBB Admin CP with file tree and tabs
(1) The theme's file tree with search. (2) New file, new folder, save and sync, collapse all. (3) Open files as tabs; a dot marks unsaved changes. (4) The editor with syntax colours.

What it can do

File treeTemplates in folders, css/, js/, images/, theme.json; filter by name.
TabsSeveral files open; a dot marks unsaved changes.
Syntax coloursHTML, CSS, JS, JSON; bracket matching, folding, minimap.
Emmetul>li*3 + Tab expands, in HTML and CSS.
Find and replaceCtrl+F / Ctrl+H; format with Shift+Alt+F.
Right-clickNew file, folder, rename, delete; upload images.

Colour scheme: Dev Options.

Save with Ctrl+S

Ctrl+S (Cmd+S) saves and updates MyBB's copy at once.

Security checkA template that could run PHP is refused, with the reason.
New files need SyncUse the sync button. New stylesheets must also be in theme.json.
Children followA parent's save reaches child themes that inherit the file.

One file per template

Each template is a .html file with its MyBB name: templates/header/header.html is header, templates/postbit/postbit_classic.html is postbit_classic. Folders only group them.

Child themes: override and revert

  1. The tree shows the parent's files dimmed, with an arrow.
  2. Override in this theme gives you your own copy to edit.
  3. Revert to parent deletes your copy again.

Don't edit the shipped themes directly. Updates replace them. Make a child theme and edit that.

Prefer your own editor?

Edit the files on your computer or in version control, upload them, then click Sync (or turn on auto-sync in Dev Options). See how themes work.

Who can use it?

Admins with the permission for MyStudio's Themes page. It only opens files inside the theme's folder and never creates or uploads PHP files there.