.php file in style-name/theme directory

For support and discussion related to templates, themes, and imagesets in phpBB 3.2.
Post Reply
User avatar
eeji
Jr. Style Validator
Posts: 1124
Joined: Fri Dec 12, 2008 9:08 pm
Location: Manchester, UK
Contact:

.php file in style-name/theme directory

Post by eeji » Tue Mar 28, 2017 8:56 pm

If I use a .php file in the style-name/theme directory with the header set to serve as a css file (to enable me to use variables for colours), would this fail CDB validation?
My phpBB styles: phpbbstyles.oo.gd
My board: iansvivarium.com

User avatar
Lumpy Burgertushie
Registered User
Posts: 66812
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: .php file in style-name/theme directory

Post by Lumpy Burgertushie » Tue Mar 28, 2017 9:32 pm

sorry.....
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

If a tree falls in the forest and nobody is there, does it make a sound?

User avatar
eeji
Jr. Style Validator
Posts: 1124
Joined: Fri Dec 12, 2008 9:08 pm
Location: Manchester, UK
Contact:

Re: .php file in style-name/theme directory

Post by eeji » Tue Mar 28, 2017 10:08 pm

Lumpy Burgertushie wrote:
Tue Mar 28, 2017 9:32 pm
sorry.....
"sorry" as in "yes it would fail validation and be rejected from the CDB"?
My phpBB styles: phpbbstyles.oo.gd
My board: iansvivarium.com

User avatar
Lumpy Burgertushie
Registered User
Posts: 66812
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: .php file in style-name/theme directory

Post by Lumpy Burgertushie » Tue Mar 28, 2017 10:17 pm

no, sorry as in I posted something that was not answering your question correctly so I delete it.

robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

If a tree falls in the forest and nobody is there, does it make a sound?

User avatar
Neculai Anisor
Registered User
Posts: 172
Joined: Tue Jan 08, 2013 9:36 pm
Location: Renfrew, Renfrewshire, Scotland
Name: Neculai Anișor
Contact:

Re: .php file in style-name/theme directory

Post by Neculai Anisor » Tue Mar 28, 2017 10:27 pm

Submissions must be stand-alone and not require:
Altering phpBB's PHP code in any way.
Installation of any Extensions.
Files from other styles or from an external website (i.e. linking to images in another style's directory, or linking to an image on your personal website). The only exception to this is for submissions that do not have their own template set included (these can then reference prosilver's template files).

There should be no other files outside of this structure.
There should be no additional files that are outside of a vanilla phpBB 3.1 installation (with the exception of those in the optional contrib/ folder, or any relevant additional .html template files). Likewise, there should be no files or images missing.
Via Styles Submission Policy (3.1.x)
Image | Romanian Support Team | Animo @ phpBB.ro - Administrator

User avatar
_Vinny_
Style Customisations
Style Customisations
Posts: 8407
Joined: Tue Aug 11, 2009 12:45 am
Location: Brazil
Name: Marcus Vinicius
Contact:

Re: .php file in style-name/theme directory

Post by _Vinny_ » Tue Mar 28, 2017 10:33 pm

eeji wrote:
Tue Mar 28, 2017 8:56 pm
would this fail CDB validation?
Yes. Files with .php extension in styles aren't supported.


Could you explain exactly how you intend to use variables for colours?

User avatar
eeji
Jr. Style Validator
Posts: 1124
Joined: Fri Dec 12, 2008 9:08 pm
Location: Manchester, UK
Contact:

Re: .php file in style-name/theme directory

Post by eeji » Wed Mar 29, 2017 5:41 pm

I'm thinking it would make things easier for people to get exactly the color they want in my style. There are only a couple of colours to change, but loads of classes needing color, border-color, background-color etc.
Of course images would need colourising seperately, but they can be packaged white in the /contrib directory so easily changed in the users favourite image editor.

code example...

Code: Select all

<?php
    header("Content-type: text/css");
    $primary-colour = '#abcdef';
    $secondary-colour = '#fedcba';
?>

.some-class, .another-class, .and-another {
	color: <?= $primary-colour>;
}

.this-needs-changing, .so-does-this {
	border-color: <?= $primary-colour>;
}

.a-different-class, .blah-blah, .etcetc {
	background-color: <?= $secondary-colour>;
}
I almost knew the answer before I asked so have already started coding without using php so its no real biggie.
Last edited by eeji on Wed Mar 29, 2017 5:44 pm, edited 1 time in total.
My phpBB styles: phpbbstyles.oo.gd
My board: iansvivarium.com

User avatar
david63
Registered User
Posts: 16663
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: .php file in style-name/theme directory

Post by david63 » Wed Mar 29, 2017 5:44 pm

eeji wrote:
Wed Mar 29, 2017 5:41 pm
but they can be packaged white in the /contrib directory
There is no contrib directory in phpBB 3.2 - that was last used in phpBB 3.0
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

User avatar
eeji
Jr. Style Validator
Posts: 1124
Joined: Fri Dec 12, 2008 9:08 pm
Location: Manchester, UK
Contact:

Re: .php file in style-name/theme directory

Post by eeji » Wed Mar 29, 2017 5:45 pm

my bad, the contrib directory within the style (which according to the guidelines is still an option)
My phpBB styles: phpbbstyles.oo.gd
My board: iansvivarium.com

User avatar
_Vinny_
Style Customisations
Style Customisations
Posts: 8407
Joined: Tue Aug 11, 2009 12:45 am
Location: Brazil
Name: Marcus Vinicius
Contact:

Re: .php file in style-name/theme directory

Post by _Vinny_ » Wed Mar 29, 2017 8:23 pm

Again:
_Vinny_ wrote:
Tue Mar 28, 2017 10:33 pm
Files with .php extension in styles aren't supported.

Maybe you can use SCSS in your code:

Code: Select all

$font-stack:    Helvetica, sans-serif;
$primary-color: #333;
$second-color: #000;

body {
  font: 100% $font-stack;
  color: $primary-color;
}

header { color: $second-color; }

Or see how black style works with several color variations. Basically adds the directories to colors variations with the altered files and each style.cfg is set parent to Black.

User avatar
eeji
Jr. Style Validator
Posts: 1124
Joined: Fri Dec 12, 2008 9:08 pm
Location: Manchester, UK
Contact:

Re: .php file in style-name/theme directory

Post by eeji » Thu Mar 30, 2017 8:54 pm

_Vinny_ wrote:
Wed Mar 29, 2017 8:23 pm
Or see how black style works with several color variations. Basically adds the directories to colors variations with the altered files and each style.cfg is set parent to Black.
Thats the method I started with, and seems the easiest all round for validated styles so I'll roll with it :)
My phpBB styles: phpbbstyles.oo.gd
My board: iansvivarium.com

Post Reply

Return to “[3.2.x] Styles Support & Discussion”