MyBB Community Forums

Full Version: Templating system...
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hey, how hard would it be to mod the board system so rather than using the mysql database for the templating stuff and css to have it stored in a folder for easy editing. Would it be a case of complete rewrite of the board templating stuff or just editing a few things. Also i wouldnt need to edit them through admin panel.
Try this file, you need to manually make the files though. And upload them to <your mybb path>/templates/ folder.
With the same name as in templates manager, with .html behind it.

Upload the attached file to inc folder.

*see on the second page*
cool has this been tested?
I use it on my other project, although not quite the same code, but should work the same.
There is an easy way to do this.

On your forums go to your source...you will see in header a stylesheet line for whatever style you are using.  Copy the url and paste it into your browser...it should open the css file you are using.  Save that as a file...

Now upload it to your server as style.css

Next go to your admincp.  Edit the template headerinclude and change this line from

<link rel="stylesheet" type="text/css" href="{$theme['css_url']}" />

to

<link rel="stylesheet" type="text/css" href="style.css" />

You are done....a hard coded css file.  No fuss no muss.


Oh and make sure that you only have 1 template choosable by members...as this of course won't work with multiple themes installed.
He means the templates AND css........
Why not just have MyBB cache the CSS file?

ACP -> Server and Optimization Options -> CSS Medium

That seems more practical then your method labrocca.
yeah it was mainly templates anyway, as i much prefer to use my localhost and a syntax highlighting editor.
Christian Wrote:Why not just have MyBB cache the CSS file?

ACP -> Server and Optimization Options -> CSS Medium

That seems more practical then your method labrocca.

Oooo...I forgot about that my bad. Also I read too quickly about the template changes as well. To be fair...the strength of mybb is that the templates are DB driven and easily changed. On phpbb2 the templates are flat file which is fine but it can be a nuisance for mods.

Anyways...sorry I got it all wrong.
personally i think that files are alot better, also you could have a saved version of the file into mysql as backup or something ( vice versa). And it wouldnt be a pain for mods as files can be edited online using php. I just think it is alot easier, coming from a designer/ semi coder view, to use syntax highlighting and tabbed editing in a editor that i am comfortable with.

Maybe it could be improved to allow both mysql or files or if not both. Say you have files selected but in admin you could possibly make a copy into mysql and so if a file is missing it will run off the mysql copy.
Pages: 1 2