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: Karlsruhe, Germany
Contact:

Drop distinction between style name and style path

Post by 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

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

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

Post by naderman » Thu Apr 19, 2012 5:01 am

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

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

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

Post by 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"

User avatar
callumacrae
Infrastructure Team
Infrastructure Team
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 » Thu Apr 19, 2012 12:31 pm

+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 » 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!

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

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

Post by 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.

Free phpBB styles | Premium responsive XenForo styles

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

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

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

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

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

Post by 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.

Post Reply