phpBB

Development Discussion Board

phpBB's testing ground of bleeding edge code
Advanced search

Drop distinction between style name and style path

Publish your own request for comments or patches for the next version of phpBB. Discuss the contributions and proposals of others. Upcoming releases are 3.1/Ascraeus and 3.2/Arsia.

Drop distinction between style name and style path

Postby naderman » Thu Apr 19, 2012 3:10 am

Introduction

Styles currently have a style name which is displayed to users, and a style path which is the directory in phpBB/styles/ that the style resides in. However these are used incorrectly in somce places already, since they are typically identical. In https://github.com/phpbb/phpbb3/pull/690 the question came up why we differentiate at all.

Proposal
Remove the style_path. Require that phpBB/style/<style_name> exist, and load all templates themes and assets from that directory.

Patch
Ticket: http://tracker.phpbb.com/browse/PHPBB3-10829
PR: https://github.com/phpbb/phpbb3/pull/1072
www.naderman.de
Move your forum to Forumatic - we'll take care of maintenance & spam
User avatar
naderman
Development Team Leader
Development Team Leader
 
Posts: 1649
Joined: Sun Jan 11, 2004 2:11 am
Location: Karlsruhe, Germany

Re: [RFC] Drop distinction between style name and style path

Postby A_Jelly_Doughnut » Thu Apr 19, 2012 3:50 am

Would style names be limited to [a-z0-9. _-] (or whatever regex actually denotes is valid directory name on *NIX and Windows), or would there be some substiution such that a Christmas-themed style called Noël gets mapped to /styles/Nol (for a completely arbitrary example)
A_Jelly_Doughnut
User avatar
A_Jelly_Doughnut
MOD Team
MOD Team
 
Posts: 1751
Joined: Wed Jun 04, 2003 4:23 pm

Re: [RFC] Drop distinction between style name and style path

Postby naderman » Thu Apr 19, 2012 5:01 am

No, style names would be limited to [a-z0-9_-]
www.naderman.de
Move your forum to Forumatic - we'll take care of maintenance & spam
User avatar
naderman
Development Team Leader
Development Team Leader
 
Posts: 1649
Joined: Sun Jan 11, 2004 2:11 am
Location: Karlsruhe, Germany

Re: [RFC] Drop distinction between style name and style path

Postby brunoais » Thu Apr 19, 2012 12:05 pm

So you are trashing any name that is foreign and does not conform with ANSI even though it conforms with UTF-8?
E.g. (lame name but...) "O tema do João"
brunoais
Registered User
 
Posts: 626
Joined: Fri Dec 18, 2009 3:55 pm

Re: [RFC] Drop distinction between style name and style path

Postby callumacrae » Thu Apr 19, 2012 12:31 pm

+1
"In JavaScript, there is a beautiful, elegant, highly expressive language that is buried under a steaming pile of good intentions and blunders"
—Douglas Crockford

View my MOD, phpBB Mobile
User avatar
callumacrae
Website Team
Website Team
 
Posts: 881
Joined: Tue Apr 27, 2010 9:37 am
Location: England

Re: [RFC] Drop distinction between style name and style path

Postby Jocelyn79 » Thu Apr 19, 2012 4:27 pm

I agree with brunoais.
I want to keep the possibility to name my phpbb styles using spaces and any accented character (commonly used in many languages, including german, portuguese, french...and many more!).
Please keep style_path!
Jocelyn79
Registered User
 
Posts: 11
Joined: Mon Apr 04, 2011 12:42 pm

Re: [RFC] Drop distinction between style name and style path

Postby Arty » Fri Apr 20, 2012 12:21 pm

+1

It is very confusing for styles hierarchy when style can have different name and path. Using only directory name makes things much easier. Nobody cares about style name anyway, all visitors just use whatever is set as default style and never even know its name.
Formerly known as CyberAlien.
User avatar
Arty
Styles Team
Styles Team
 
Posts: 789
Joined: Wed Mar 06, 2002 2:36 pm
Location: Mars

Re: [RFC] Drop distinction between style name and style path

Postby ecwpa » Fri Apr 20, 2012 2:56 pm

Now that you mention it, if the board administrator disable the option for users to pick a style, shouldn't that option be hidden to users then? Same goes for boards with only one language. Those are 2 options doing nothing on a lot of boards.
Sorry for my bad english, still improving.
ecwpa
Registered User
 
Posts: 169
Joined: Mon Jan 24, 2005 2:10 am

Re: [RFC] Drop distinction between style name and style path

Postby DavidIQ » Fri Apr 20, 2012 3:35 pm

The style selector is already not shown in the UCP when the Override user style option is set to Yes in ACP -> Board Settings.
Image
User avatar
DavidIQ
MOD Team Leader
MOD Team Leader
 
Posts: 753
Joined: Thu Mar 02, 2006 4:29 pm
Location: Earth

Re: [RFC] Drop distinction between style name and style path

Postby naderman » Sun Apr 22, 2012 12:46 am

ecwpa wrote:Now that you mention it, if the board administrator disable the option for users to pick a style, shouldn't that option be hidden to users then? Same goes for boards with only one language. Those are 2 options doing nothing on a lot of boards.

Yes, I agree. Please create a ticket on our tracker at http://tracker.phpbb.com that we should remove that option if only one style is available.
www.naderman.de
Move your forum to Forumatic - we'll take care of maintenance & spam
User avatar
naderman
Development Team Leader
Development Team Leader
 
Posts: 1649
Joined: Sun Jan 11, 2004 2:11 am
Location: Karlsruhe, Germany

Next

Return to [3.x] RFCs

Who is online

Users browsing this forum: Exabot [Bot], keith10456 and 8 guests