MyBB Community Forums

Full Version: I can see why no one has completely rewritten an entire template...
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
I can see why no one has completely rewritten an entire template...

It sucks.
Period.

I spend 4 days at it and I am nowhere done. Remove tables for div/css is already one thing. Stripping it done to make it more efficient is another thing. So far, by stripping it done cause me to rewrite like 60% of the css used for the site. The theme option is like near useless now, i only left the ids in place so they can be use for "return to top" or "return to content".

When ever i get it done, I will show it to you. Should be a while now, since I should be studying for my midterms for University... So expect a response in like 3 weeks?

I can tell you this is why we haven't go many new themes with templates that look totally different from others...
theming is easy but
template changing is challenging.

I have used most of the forum software out there and this is probably the best even if it is for free. Only problem with all of the out there is to make it look different from the generic model. Let me break it down for you guys of the biggest names:

IPB - good for CSS and rearranging items, but still looks the same.
vBulletin - just like myBB... it is annoying
myBB - annoying already
PunBB - Overwhelmingly generic, there one page fix makes mybb looks pathetic sometimes
PHPBB - WAY TOO MANY FILES
SMF - skinning alright, but the forum software is a total flop.

I have suggested the idea, a few times in the mybb ideas section, we ought to follow a new way of doing the theme/templating and stop copying from other forum competitors.

Theme/Templating should be easy and can be able to do it out side of the admin CP. Currently there is no forum software example to follow. The best way is to take one of the best in another setting, blogging. Wordpress has change its way since 1.5 and has not look back. It has nearly double the number of skins it produce on an average month since it stop using the more confusing technique.

We should be using basic functions! This would reduce the number of files we have and stop us from having to go into .tlp and such, which we have been doing in the first place. By implementing functions, we could be writing this in simple php with basic if/else and while statements. It only took me 10 hours to write a new wordpress theme, so why can't we take the logic and apply it here?

As the founder of McDonalds say simple, STUPID!
Really, if theme/templating is not simple, how are we that much different from the competitors?
The current way templates are set up separates logic (PHP), layout (HTML), and presentation (CSS). I guess it might be difficult for some people to grasp at first.

BTW, you have to keep in mind, a blog application like WordPress has way fewer pages than a discussion board. I mean you only need a template for the homepage (aka list of posts), and another page to display individual posts.
For PHP, you can use plugins to fulfill your needs anyway. If you need that flexibility, and have the knowledge to code PHP, it shouldn't be difficult to make a plugin.

There are other reasons why PHP shouldn't be allowed in templates, for example, security.

forevagrey Wrote:Theme/Templating should be easy and can be able to do it out side of the admin CP.
In a text editor? You can make an XML file in a text editor, as long as you understand all of it...

forevagrey Wrote:We should be using basic functions!
Could you explain what these are?

forevagrey Wrote:This would reduce the number of files we have and stop us from having to go into .tlp and such, which we have been doing in the first place.
.tlp ? Is this even for MyBB?

forevagrey Wrote:By implementing functions, we could be writing this in simple php with basic if/else and while statements.
Regardless, you'll have to end up writing all the XHTML at some point in time.
I have a problem with the themes CSS as well as some of it's hidden. I was told that's to prevent noobs from destroying a template but I would think a renew function to original state would fix that.

Also some images inside the themes are hard coded to images directory vs being pulled from the theme directory. I have mentioned all this before and been told that 1.4 fixes some of these issues.

I understand your frustration forevagrey but the truth is that all forum software (as you mention) has a similar style or worse. That's because updates require changes to the templates and any custom templates would break the software. Example is when the new keys were added for forms or the logout links. Those with custom templates were forced to make manual changes. The more custom your template...the worse your updating will be.

I prefer to minimize my html/template changes to footer/header and use the css and images to change the look. For the most part it's done well for me. While my templates and sites may not have a totally custom feel...they work and many members are happy with the minimalism I present. Often heavy laden graphic forums are uneasy to look at.

The largest forums on the web are for the most part simple looking. Digitalpoint is a great example..they pretty much use the custom VB template except made it green.
I know what you mean about phpBB3.

If I were still using phpbb3, the edited theme I am using for my site WOULD NOT WORK. NOTHING is wrappable in phpBB3, it just doesn't work, so you can't put your forum in a universal site table.

Also, with phpBB3, if you make ANY edits with their admin cp theme or template editor, it deletes it as soon as you do a file modification as what you perform in the admincp does not reflect what is in the theme files.

IPB is much easier for that, but MyBB will suffice. I don't find making themes that bad, but it depends on what you are trying to do etc. I like MyBB's template and theme system Big Grin
I think mybb is awesome because of its plugin system, just like worpdress - upload the files to "plugin" and "language" folders and activate it in Admin Cpanel, it´s done

I dont care for tableless, W3c compliant themes, if I need to break all plugin compatibility to get them
DennisTT Wrote:The current way templates are set up separates logic (PHP), layout (HTML), and presentation (CSS). I guess it might be difficult for some people to grasp at first.

BTW, you have to keep in mind, a blog application like WordPress has way fewer pages than a discussion board. I mean you only need a template for the homepage (aka list of posts), and another page to display individual posts.

wordpress had 15 templates, and only 4 of them are compulsory. I am sure in mybb the member list, forum team, sync, calendar and help could be left out if needed. When I count out how many are really mandatory, it is around 10.

separating the logic is still happening, because we are only limiting them to do certain things with php: function, if, else, elseif, and while.

ZiNgA BuRgA Wrote:For PHP, you can use plugins to fulfill your needs anyway. If you need that flexibility, and have the knowledge to code PHP, it shouldn't be difficult to make a plugin.

There are other reasons why PHP shouldn't be allowed in templates, for example, security.

forevagrey Wrote:Theme/Templating should be easy and can be able to do it out side of the admin CP.
In a text editor? You can make an XML file in a text editor, as long as you understand all of it...

forevagrey Wrote:We should be using basic functions!
Could you explain what these are?

forevagrey Wrote:This would reduce the number of files we have and stop us from having to go into .tlp and such, which we have been doing in the first place.
.tlp ? Is this even for MyBB?

forevagrey Wrote:By implementing functions, we could be writing this in simple php with basic if/else and while statements.
Regardless, you'll have to end up writing all the XHTML at some point in time.

plugins does not resolve the problem, it is really a bad cover up.
and plugins are actually worst to security then a theme/template can do. I have seen too many plugins that are pretty much hardwired in, and are near impossible to remove without a fresh copy of mybb and playing around with mysqladmin.

XML file is not answer, because you need to upload it on admin cp each time, php files can be modified one by one.

functions are the basics of all generic coding (html seems to be the largest exception, that is why we have php and all these other things). basically all prewritten functions can be use through out the site.

for example: <? php getTitle(); ?> would print out the title of your forum.
a more tougher example would be <? php showMenu('style=list&picture=no'); would show the menu as a list and without the pictures

xhtml.... you will still need a batch of php to instruct it the extra tags... which means more annoyment to the plugin guys


lastly for those who don't care about tables, tables are the main reason why downloading a forum page takes so long. phpbb3 have some skins that are tables free (or more specifically close to using ul tags)
forevagrey Wrote:I am sure in mybb the member list, forum team, sync, calendar and help could be left out if needed. When I count out how many are really mandatory, it is around 10.
Yes, they can be left out - uncustomized templates will revert to the default ones.

forevagrey Wrote:plugins does not resolve the problem, it is really a bad cover up.
How so?
forevagrey Wrote:and plugins are actually worst to security then a theme/template can do. I have seen too many plugins that are pretty much hardwired in, and are near impossible to remove without a fresh copy of mybb and playing around with mysqladmin.
What you have seen does not necessarily reflect what is possible. Are you even familiar with the MyBB plugin system? Most plugins require absolutely no code modifications.
As for security, a theme which can perform some PHP execution has it's security risks anyway. It's solely up to the plugin developer to secure his plugins.

forevagrey Wrote:XML file is not answer, because you need to upload it on admin cp each time, php files can be modified one by one.
Of course you need to upload it. If you don't upload anything, how will your server know what you want?
I don't understand what you're trying to say about PHP files being modified one by one.
And if XML is not the answer, what would yours be?

forevagrey Wrote:functions are the basics of all generic coding (html seems to be the largest exception, that is why we have php and all these other things). basically all prewritten functions can be use through out the site.

for example: <? php getTitle(); ?> would print out the title of your forum.
a more tougher example would be <? php showMenu('style=list&picture=no'); would show the menu as a list and without the pictures
<?php echo $header; ?>
It's not a function, but really, how is it different?

forevagrey Wrote:xhtml.... you will still need a batch of php to instruct it the extra tags... which means more annoyment to the plugin guys
Huh?

forevagrey Wrote:lastly for those who don't care about tables, tables are the main reason why downloading a forum page takes so long. phpbb3 have some skins that are tables free (or more specifically close to using ul tags)
Sorry, but having used MyBB on dialup connections, I'm not going to say it's noticeably slower than other pages without tables.
And with GZip compression, the whole page has to be downloaded before it's rendered, anyway.
forevagrey Wrote:wordpress had 15 templates, and only 4 of them are compulsory. I am sure in mybb the member list, forum team, sync, calendar and help could be left out if needed. When I count out how many are really mandatory, it is around 10.
If we left out the templates for all those pages, then where would we come up with the HTML to do so?
forevagrey Wrote:separating the logic is still happening, because we are only limiting them to do certain things with php: function, if, else, elseif, and while.
If and else are exactly what "logic" is. You can see there is no logic in the current templates, as it's all handled in the PHP files. That is, there is no if and else statements.

I believe we might consider including the so-called conditional tags to make template modifications easier in a future version of MyBB, but I'm not sure.
forevagrey Wrote:lastly for those who don't care about tables, tables are the main reason why downloading a forum page takes so long.

Completely wrong. Check your facts. Tables are no more slower than divs with CSS.
Pages: 1 2 3 4