Drop distinction between style name and style path

Note: We are moving the topics of this forum and it will be deleted at some point

Publish your own request for comments/change or patches for the next version of phpBB. Discuss the contributions and proposals of others. Upcoming releases are 3.2/Rhea and 3.3.
User avatar
naderman
Consultant
Posts: 1727
Joined: Sun Jan 11, 2004 2:11 am
Location: Berlin, Germany
Contact:

Drop distinction between style name and style path

Post by naderman »

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

User avatar
A_Jelly_Doughnut
Registered User
Posts: 1780
Joined: Wed Jun 04, 2003 4:23 pm

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

Post by A_Jelly_Doughnut »

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
naderman
Consultant
Posts: 1727
Joined: Sun Jan 11, 2004 2:11 am
Location: Berlin, Germany
Contact:

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

Post by naderman »

No, style names would be limited to [a-z0-9_-]

User avatar
brunoais
Registered User
Posts: 964
Joined: Fri Dec 18, 2009 3:55 pm

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

Post by brunoais »

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"

User avatar
callumacrae
Former Team Member
Posts: 1046
Joined: Tue Apr 27, 2010 9:37 am
Location: England
Contact:

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

Post by callumacrae »

+1
Made by developers, for developers!
My blog

Jocelyn79
Registered User
Posts: 11
Joined: Mon Apr 04, 2011 12:42 pm

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

Post by Jocelyn79 »

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!

User avatar
Arty
Former Team Member
Posts: 985
Joined: Wed Mar 06, 2002 2:36 pm
Location: Mars
Contact:

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

Post by Arty »

+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.

ecwpa
Registered User
Posts: 181
Joined: Mon Jan 24, 2005 2:10 am
Contact:

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

Post by ecwpa »

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.
Slightly better English than it was in 2005, still improving :D

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 1904
Joined: Thu Mar 02, 2006 4:29 pm
Location: Earth
Contact:

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

Post by DavidIQ »

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
naderman
Consultant
Posts: 1727
Joined: Sun Jan 11, 2004 2:11 am
Location: Berlin, Germany
Contact:

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

Post by naderman »

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.

Post Reply