MyBB Community Forums

Full Version: Enabling external template editing
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi guys,

I don't know how others feel about this but editing templates in ACP can be a real hassle. Before I started with MyBB I was used to external template and CSS editing with my beloved Programmer's Notepad, because it is quick, more flexible, supports coloring and Indentation (btw, MyBB's template is written pretty much "indentationless", which adds a bit more pain to the matter).

We can already edit CSS files externally, but not templates. I always have to copy and paste a template to Programmer's Notepad, make changes, copy and paste it back to the template manager, save and reload to see the results.

I assume it's not possible to edit templates externally because MyBB is not written that way? (What about MyBB 1.8 and 2.0?)
2.0 will use MVC. You should be able to download a given view file to edit.
(2012-04-25, 12:05 AM)Josh H. Wrote: [ -> ]2.0 will use MVC. You should be able to download a given view file to edit.

Will the folder just be called 'views' or have it's own folder structure? I really hope there can be it's own dedicated folder for themes, like wordpress has it.

A theme would be it's own folder, in that there is a folder for css, js, images, and more a dev could put in.
I assume you're referring to CodePress, the buggy, outdated syntax highlighter we currently use that often messes up templates. If so, 1.8 will include a new syntax highligher for both template and CSS editing.
I don't mean CodePress specifically. You can disable CodePress if you disable javascript in the template manager. CodePress as well as other syntax highlighers are for internal template editing, which means they can be edited only within the ACP. While there is nothing wrong with internal template editing, there should be an option to edit templates externaly also imo. Of course nobody wants to edit their templates externally when hosted on a server, but it's much easier for local host guys to develop a template externaly with their own prefered notepad.

Here is the idea: Why not add a button in the template manager that says "Enable external editing"? When pressed, MyBB copies templates from the database (I assume they are stored there?) to /cache/templates/NAMEOFTEMPLATE/. We then can edit those templates and when finished we have to press another button in the template manager that says "Import external templates to database". When pressed, the templates get imported to MyBBs database.