[RFC|Merged] Merge style components

These requests for comments/change have lead to an implemented feature that has been successfully merged into the 3.1/Ascraeus branch. Everything listed in this forum will be available in phpBB 3.1.
User avatar
Arty
Registered User
Posts: 970
Joined: Wed Mar 06, 2002 2:36 pm
Location: Mars
Contact:

[RFC|Merged] Merge style components

Post by Arty » Sun Jan 15, 2012 11:50 pm

Introduction

In phpBB 3.0 there are 4 cfg files per style:
- style.cfg that contains information about style: style name, style version, author name
- theme.cfg that contains same data as style.cfg + flag defining if css files should be parsed by style.php
- template.cfg that contains same data as style.cfg + defines template inheritance + bitfield for bbcode
- imageset.cfg that contains imageset data

All those files have duplicate data:
- Component name, that is always the same as style name
- Version, that is always the same as style version
- Copyright notice, that is always the same as in style.cfg

In 3.1 imageset is gone, so that's one cfg file less
In 3.1 css files are no longer parsed, so theme.cfg becomes useless
In template.cfg there are only two items:
- BBCode bitfield. It is the same in all styles. No designer has ever changed it and I doubt most designers even have a clue of what it is for. It can be removed.
- Template inheritance field. It can be moved to style.cfg

There are only two style components: theme and template.
All styles have their own themes, making style/theme separation pointless.
With implementation of template inheritance style/template separation also became pointless.

Then there is a confusion among users. Refresh style, theme, template... aren't they all the same? No, they aren't. Users get completely confused and stop trying to customize forum.

Proposal

I propose to:
- Merge style all components.
- Hard code bbcode bit field.

There will be only 1 part: style and 1 configuration file: style.cfg

style.cfg will include:
- Items that it already has: name, version number, copyright
- Template inheritance information

Pros

- No more confusion over styles, templates, themes, skins.
- Redundant information gets removed, leaving only one cfg file with style information.

Cons

- It won't be possible to create new style that uses template or theme from another directory. Template inheritance takes care of template part. Theme part cannot be solved, but nobody uses it anyway.

Patch
Ticket: http://tracker.phpbb.com/browse/PHPBB3-10632
Patch: https://github.com/phpbb/phpbb3/pull/625

Changes included in patch:
- Merging style components.
- Unlimited styles tree.
- New acp_styles, includes only basic style management functions.
- New style superclass. $style is used to setup style instead of $template
Formerly known as CyberAlien.

Free phpBB styles | Premium responsive XenForo styles

User avatar
jsebean
Registered User
Posts: 165
Joined: Wed Nov 17, 2010 1:40 am
Location: Atlantic Canada

Re: [RFC] Merge style components

Post by jsebean » Mon Jan 16, 2012 3:15 am

I think it is an excellent idea because messing with all the cfgs is... a mess :lol: . Especially trying to explain it to new people designing who don't understand why you have to repeatdly enter in the style name, copyright, version over and over and they ask you why and you say "Well ummm because that's the way it is" :lol:

+1
-Jonah

User avatar
Mighty Gorgon
Registered User
Posts: 14
Joined: Wed Sep 17, 2003 8:52 am
Location: Italy
Contact:

Re: [RFC] Merge style components

Post by Mighty Gorgon » Tue Jan 17, 2012 10:54 pm

I agree... I don't think there are so many users mixing up styles components to get new styles.

Also I think there is no "professional" reason to have hundreds of style installed on a board (unless is for test/demo purpose), so that feature shouldn't be so useful anyway.

Oleg
Posts: 1150
Joined: Tue Feb 23, 2010 2:38 am
Contact:

Re: [RFC] Merge style components

Post by Oleg » Wed Jan 18, 2012 3:10 am

Seems reasonable, but I don't know much about styles.

What is the purpose of bbcode bit field?

User avatar
Arty
Registered User
Posts: 970
Joined: Wed Mar 06, 2002 2:36 pm
Location: Mars
Contact:

Re: [RFC] Merge style components

Post by Arty » Wed Jan 18, 2012 8:47 am

Oleg wrote:What is the purpose of bbcode bit field?
I'm not sure about that. It is used by bbcode.php for something
Formerly known as CyberAlien.

Free phpBB styles | Premium responsive XenForo styles

User avatar
Jacob
Registered User
Posts: 100
Joined: Wed Jan 04, 2012 1:41 pm

Re: [RFC] Merge style components

Post by Jacob » Wed Jan 18, 2012 11:29 am

To tell the parser which bbcodes you want to replace? http://www.phpbb.com/kb/article/how-to- ... d-bbcodes/

User avatar
marian0810
Former Team Member
Posts: 16
Joined: Sun Jul 25, 2010 11:31 am
Location: The Netherlands
Contact:

Re: [RFC] Merge style components

Post by marian0810 » Wed Jan 18, 2012 11:41 am

Mighty Gorgon wrote:I don't think there are so many users mixing up styles components to get new styles.
I actually use that a lot :?
Don' t Cry Because It's Over
Smile Because It Happened

User avatar
Arty
Registered User
Posts: 970
Joined: Wed Mar 06, 2002 2:36 pm
Location: Mars
Contact:

Re: [RFC] Merge style components

Post by Arty » Wed Jan 18, 2012 1:32 pm

marian0810 wrote:I actually use that a lot :?
What components are you mixing?
Formerly known as CyberAlien.

Free phpBB styles | Premium responsive XenForo styles

User avatar
bonelifer
Community Team
Community Team
Posts: 107
Joined: Mon Jan 31, 2005 10:41 am

Re: [RFC] Merge style components

Post by bonelifer » Wed Jan 18, 2012 10:51 pm

Arty wrote:
Oleg wrote:What is the purpose of bbcode bit field?
I'm not sure about that. It is used by bbcode.php for something

http://wiki.phpbb.com/Tutorial.Parsing_text
foo_bbcode_bitfield - a bit field containing the information which bbcode is used in the text so only the relavant ones need to be loaded from the database.

User avatar
naderman
Product Manager
Product Manager
Posts: 1727
Joined: Sun Jan 11, 2004 2:11 am
Location: Karlsruhe, Germany
Contact:

Re: [RFC] Merge style components

Post by naderman » Thu Jan 19, 2012 1:49 pm

I'd say +1, if we implement some kind of theme inheritance, too and allow multiple levels of inheritance. Then you can do the same as now through inheritance, rather than combinations of theme/template.

Post Reply