MyBB Community Forums

Full Version: Theme / Template Suggestions
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
After download and installing mybb I was interested to see how easy it would be to customize a theme and or template, what I found that it was ridiculously hard.

The idea of importing/exporting CSS as XML files is stupid I think. It can be hard enough to learn the names of the different CSS elements and try understand how they affect different parts of the webpage. When you export it as XML and surround everything with CDATA tags you make everything close to impossible to read and comprehend.

I was hoping that MyBB would be easier to customize than phpbb but sadly I found this not to be the case. I want a fully featured forums that can be easily embedded into a current page design so that it looks like it is apart of the website and not like it was added on as afterthought. The forums has to FLOW with the rest of the site design, and MyBB in its current iteration does NOT do a good job of making it easy for the web developer.

I have a couple suggestions to vastly improving MyBB, I am not here to just blueberry and moan without offering anything constructive.

  1. Implement a true templating system
  2. Remove CSS from the database and place in a static file that is included based on its Name and place in the directory structure
  3. Access the HTML chuncks in the database by parsing the template file.

Let me elaborate some more on these things I have listed.

Look at Smarty Template Engine to see how to use a templating system for your forums. Some forums that actually do a good job at this is PunBB. I have included their default template file as an example.

Store the name of the CSS file in the database. Place them in the ~/css or ~/style directory. You can easily generate a path if the directory name is static and the name of the CSS file is in the database. Then you can just echo $stylesheetpath to get whatever the current theme is.

Leave the HTML chunks in the database, that doesn't seem that big a deal. It would be nice however to create some sort of interface in the admin side that allowed you to edit the chunks easily. There must be close to 400 different chunks and its very complicated to try and figure out what chunk is what. PunBB parses the template file when it sees "< pun_head >" (spaces added) it knows to spit out the standard header chunks. This is where it figures out the CSS include and other stuff.

Well that is about it. I hope you listen to what I had to say and make MyBB easier to customize, if you do I think you will see a lot more people using it. I'll check back in a year or so and see how you guys are doing. Good luck fixing things.

Regards,

llbbl.com
Let me explain this to you. You don't have to export your theme then import it later when you have edited it. You can just use the template system within MyBB, editing online. Within MyBB admin CP you have a Themes and a Templates, if you click "Modify / Delete" on one of those you'll see the Templates/themes, click on edit on yours.
Within Templates section you can just click on the different templates and modify them.
Within Themes section you have the css, click go on your theme. You'll see the different css text area/inputs you can edit for it.

MyBB templates are really easy on the server, it doesn't use a lot of CPU/resources, loads quickly. Unlike Smarty which isn't really quick at all.

We use php variables within our templates. like $headerinclude for the header includes, and $header for the default header.

Hope this helps.

Cheers,
CraKteR.
llbbl Wrote:The idea of importing/exporting CSS as XML files is stupid I think. It can be hard enough to learn the names of the different CSS elements and try understand how they affect different parts of the webpage. When you export it as XML and surround everything with CDATA tags you make everything close to impossible to read and comprehend.
The XML file is for distributing theme (and template) data as a whole. It was not meant for you to edit it (that's what the Admin CP is for).
llbbl Wrote:I was hoping that MyBB would be easier to customize than phpbb but sadly I found this not to be the case. I want a fully featured forums that can be easily embedded into a current page design so that it looks like it is apart of the website and not like it was added on as afterthought. The forums has to FLOW with the rest of the site design, and MyBB in its current iteration does NOT do a good job of making it easy for the web developer.
With a few simple modifications to the header and footer templates, I came up with this for my forum:
http://dennistt.net
Would you agree that I embedded the forums into a current page design?
llbbl Wrote:I have a couple suggestions to vastly improving MyBB, I am not here to just blueberry and moan without offering anything constructive.

  1. Implement a true templating system
  2. Remove CSS from the database and place in a static file that is included based on its Name and place in the directory structure
  3. Access the HTML chuncks in the database by parsing the template file.

Let me elaborate some more on these things I have listed.

Look at Smarty Template Engine to see how to use a templating system for your forums. Some forums that actually do a good job at this is PunBB. I have included their default template file as an example.

Store the name of the CSS file in the database. Place them in the ~/css or ~/style directory. You can easily generate a path if the directory name is static and the name of the CSS file is in the database. Then you can just echo $stylesheetpath to get whatever the current theme is.
In MyBB 1.2.x, you can switch the CSS storage medium to a file. It's in one of the settings in the Admin CP.
llbbl Wrote:Leave the HTML chunks in the database, that doesn't seem that big a deal. It would be nice however to create some sort of interface in the admin side that allowed you to edit the chunks easily. There must be close to 400 different chunks and its very complicated to try and figure out what chunk is what. PunBB parses the template file when it sees "< pun_head >" (spaces added) it knows to spit out the standard header chunks. This is where it figures out the CSS include and other stuff.
There's a template editor in the Admin CP. [wiki]Admin CP Templates[/wiki]
llbbl Wrote:Well that is about it. I hope you listen to what I had to say and make MyBB easier to customize, if you do I think you will see a lot more people using it. I'll check back in a year or so and see how you guys are doing. Good luck fixing things.

Regards,

llbbl.com

As you can see, we already have most, if not all of the things you mentioned.
Anyone that truly is a web developer knows CSS. If you don't know how to make CSS then your not ready to customize your forum simply put. They didn't make CSS a global standard for no reason... Besides that, every forum software has a learning curve. You shouldn't export your theme to edit the CSS. Thats why we have it built in along with a template editor too. We also have the option to make the CSS as a static file. We obviously put thought and research into our product to make it the best it can be.

Next time please do your research.
As others have pointed out...you are using mybb template/theme system incorrectly. You should edit via the admincp. Most likely you will never export or import a theme. My suggestion is to first create a new theme in admincp. It will basically be a copy of the default. Then you can edit it till your hearts content and implement it as the default theme for the site. The theme basically holds all CSS information. Templates hold all the variables and xhtml of the site pages.

Goodluck...my advice is to give it a try with an open mind. Learning something new can be frustrating but you may be very pleasantly suprised once you realize HOW to utilize the system. It's easy and rather intuitive actually.