Question about the hashcode in stylesheet

For support and discussion related to templates and themes in phpBB 3.3.
User avatar
Tastenplayer
Registered User
Posts: 773
Joined: Thu Jul 03, 2014 9:20 pm
Location: Village in the middle of Switzerland
Name: Jutta Koliofotis
Contact:

Question about the hashcode in stylesheet

Post by Tastenplayer »

On phpBB.de the question has arisen whether it is necessary to insert the hashcode as in prosilver in the style for the validation.
Or would an own hashcode be allowed?
e.g. @import url("blackfog.css?v=style1"); or @import url("blackfog.css?v=3.3.1");
I think probably not. Because the Win10 App Hash Tool 1.2 always shows me the CRC32 hashcode anyway.

Could somebody enlighten us on this, please? What must the stylesheet look like for validation? Is it allowed to use an own hash like in the examples above or not?
More of my styles you can find in my phpBB Style Board & More
Be the best version of yourself rather than a bad copy of someone else!
Excuse me for my English, but I learned the language by speaking to people and not at school.
User avatar
wintstar
Registered User
Posts: 329
Joined: Sat Mar 07, 2009 12:39 pm

Re: Question about the hashcode in stylesheet

Post by wintstar »

You could use my Css Hash Tool, then you are independent from any operating system to get a hash value.
Last edited by DavidIQ on Tue Aug 11, 2020 7:41 pm, edited 1 time in total.
Reason: Removed self-promoting link
User avatar
Tastenplayer
Registered User
Posts: 773
Joined: Thu Jul 03, 2014 9:20 pm
Location: Village in the middle of Switzerland
Name: Jutta Koliofotis
Contact:

Re: Question about the hashcode in stylesheet

Post by Tastenplayer »

That's not our question. With the app in Win10 reading out the hash is no problem. But we would like to know if an own hash is allowed or not.
More of my styles you can find in my phpBB Style Board & More
Be the best version of yourself rather than a bad copy of someone else!
Excuse me for my English, but I learned the language by speaking to people and not at school.
User avatar
david63
Registered User
Posts: 18570
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Contact:

Re: Question about the hashcode in stylesheet

Post by david63 »

What does it say in the rules for submitting a style? If nothing then you can do what you want -otherwise do as it says.
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
Tastenplayer
Registered User
Posts: 773
Joined: Thu Jul 03, 2014 9:20 pm
Location: Village in the middle of Switzerland
Name: Jutta Koliofotis
Contact:

Re: Question about the hashcode in stylesheet

Post by Tastenplayer »

Let a style validator tell us what is going on. Everything else is uncertain are only assumptions.
By default you have to update everything as specified in prosilver. That would be with the hash as in prosilver. However, this means a considerable additional effort when updating the styles.
More of my styles you can find in my phpBB Style Board & More
Be the best version of yourself rather than a bad copy of someone else!
Excuse me for my English, but I learned the language by speaking to people and not at school.
User avatar
Joyce&Luna
Registered User
Posts: 290
Joined: Wed Oct 14, 2015 3:46 pm
Location: Germany
Name: Anke
Contact:

Re: Question about the hashcode in stylesheet

Post by Joyce&Luna »

Sorry
But I find it very awkward with this hash code.
The code has to be regenerated every time the style is changed.
So I find it compelling to know whether it is a MUST or whether you can decide freely. Is a style only validated with HASH, or is it allowed to decide for yourself?
Supporting the style also takes longer and is more complex.
There is nowhere a reasonable answer.
Even extensions sometimes have to be edited, etc.
My contributions are translated from German to English by google. This can lead to misunderstanding.

phpBB Style Design
User avatar
Tastenplayer
Registered User
Posts: 773
Joined: Thu Jul 03, 2014 9:20 pm
Location: Village in the middle of Switzerland
Name: Jutta Koliofotis
Contact:

Re: Question about the hashcode in stylesheet

Post by Tastenplayer »

Plus the fact, that it is hardly possible to create a new style.
The only solution is to create a new style in 3.3.0 and then update it to 3.3.1, otherwise you will never finish, if you should / must change the hash in the stylesheet after every change.

By the way: depending on which file I change in style, in Firefox the change is not updated in the Quickinstall board even after emptying the cache. This despite a correctly inserted hash in the stylesheet. This on 3 completely different devices. In the other browsers and other phpBB version borads it is no problem. Only after one day Firefox shows me the change in 3.3.1.
More of my styles you can find in my phpBB Style Board & More
Be the best version of yourself rather than a bad copy of someone else!
Excuse me for my English, but I learned the language by speaking to people and not at school.
User avatar
3Di
Former Team Member
Posts: 16052
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milano 🇮🇹 - Frankfurt 🇩🇪
Name: Marco
Contact:

Re: Question about the hashcode in stylesheet

Post by 3Di »

Tastenplayer wrote:
Tue Aug 11, 2020 5:39 pm
... But we would like to know if an own hash is allowed or not.
Let's make this story short once and for all: YES it is.

I wrote that PR and its ticket in the tracker clearly explains the reasons why I did it.

https://tracker.phpbb.com/browse/PHPBB3-16543

Moreover, so you can trust me... in case
Marc wrote:
Sun Aug 09, 2020 4:20 pm
Modify the hash value for the files you have changed in stylesheet.css. This can be as simple as appending a 0 or any other alphanumeric character to the hash.
Hope is all clear now. :)
To request support for our extensions you can also contact me here: phpBB Studio

Please PM me only to request paid works. Thx. Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
🚀 Looking for a specific feature or alternative option? We will rock you! 🚀
User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 17374
Joined: Thu Jan 06, 2005 1:30 pm
Location: Fishkill, NY
Name: David Colón
Contact:

Re: Question about the hashcode in stylesheet

Post by DavidIQ »

Official response: we are not requiring that style authors add a hash or any other cache-busting parameter to the imports in their stylesheet. Of course if you update something in one of those imported stylesheets it would be of benefit to add a hash/number/whatever to the import so that frequent visitors see the changes right away but, again, leaving it up to the style author.
Apply to become a Jr. Extension Validator
My extensions | In need of phpBB services? | Was I helpful today?
No unsolicited PMs unless you're planning on asking for paid help.
User avatar
eeji
Jr. Style Validator
Posts: 1301
Joined: Fri Dec 12, 2008 9:08 pm
Location: Manchester, UK
Contact:

Re: Question about the hashcode in stylesheet

Post by eeji »

Thanks for clarifying David.

For my styles, I am changing the ?v=3.3 from 3.3.0 to the styles current version, so for eg. my Flat Style will have ?v=1.1.1 appended, and then I'll just increment this with each new release.
My phpBB styles: phpbbstyles.oo.gd
My board: iansvivarium.com
User avatar
Tastenplayer
Registered User
Posts: 773
Joined: Thu Jul 03, 2014 9:20 pm
Location: Village in the middle of Switzerland
Name: Jutta Koliofotis
Contact:

Re: Question about the hashcode in stylesheet

Post by Tastenplayer »

Thank you for clarifying what is required in terms of style validation.
More of my styles you can find in my phpBB Style Board & More
Be the best version of yourself rather than a bad copy of someone else!
Excuse me for my English, but I learned the language by speaking to people and not at school.
User avatar
3Di
Former Team Member
Posts: 16052
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milano 🇮🇹 - Frankfurt 🇩🇪
Name: Marco
Contact:

Re: Question about the hashcode in stylesheet

Post by 3Di »

eeji wrote:
Tue Aug 11, 2020 8:20 pm
For my styles, I am changing the ?v=3.3 from 3.3.0 to the styles current version, so for eg. my Flat Style will have ?v=1.1.1 appended, and then I'll just increment this with each new release.
Exactly, that's the simplest way to go. Simple as it is.
To request support for our extensions you can also contact me here: phpBB Studio

Please PM me only to request paid works. Thx. Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
🚀 Looking for a specific feature or alternative option? We will rock you! 🚀
User avatar
Tastenplayer
Registered User
Posts: 773
Joined: Thu Jul 03, 2014 9:20 pm
Location: Village in the middle of Switzerland
Name: Jutta Koliofotis
Contact:

Re: Question about the hashcode in stylesheet

Post by Tastenplayer »

However, there is still a lack of clarity. What do I do with the css files not inserted in style?
Do I have to insert the hash from prosilver there? Or do these files have to be inserted in overall & simple header now? I can't just add my own hash to these files, I suppose.

Code: Select all

/*  phpBB3 Style Sheet
    --------------------------------------------------------------
	Style name:		Blackfog
	Based on style:		prosilver (the default phpBB 3.3.x style)
	Original author:	Tom Beddard ( http://www.subblue.com/ )
	Modified by:		Tastenplayer ( https://www.phpbb-skins-by.koliofotis.ch/ )
    --------------------------------------------------------------
*/

@import url("../../prosilver/theme/normalize.css?hash=48eb3f89");
@import url("../../prosilver/theme/base.css?hash=3a7fafb1");
@import url("../../prosilver/theme/utilities.css?hash=1034bac8");
@import url("common.css?v=3.3.1.1");
@import url("links.css?v=3.3.1.1");
@import url("content.css?v=3.3.1.1");
@import url("buttons.css?v=3.3.1.1");
@import url("../../prosilver/theme/cp.css?hash=5cc9ac0c");
@import url("forms.css?v=3.3.1.1");
@import url("icons.css?v=3.3.1.1");
@import url("colours.css?v=3.3.1.1");
@import url("responsive.css?v=3.3.1.1");
@import url("blackfog.css?v=3.3.1.1");
More of my styles you can find in my phpBB Style Board & More
Be the best version of yourself rather than a bad copy of someone else!
Excuse me for my English, but I learned the language by speaking to people and not at school.
User avatar
3Di
Former Team Member
Posts: 16052
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milano 🇮🇹 - Frankfurt 🇩🇪
Name: Marco
Contact:

Re: Question about the hashcode in stylesheet

Post by 3Di »

Tastenplayer wrote:
Wed Aug 12, 2020 6:49 am
However, there is still a lack of clarity.
Sorry if we haven't been clear enough, I'll see if I can make it up to you. :|
Tastenplayer wrote:
Wed Aug 12, 2020 6:49 am
SNIP ... I can't just add my own hash to these files, I suppose.
To clarify, ?v=3.3.1.1 is not an hash therefore is not your hash but your querystring, like ?hash=1034bac8 it is, always. We use file hashes for the prosilver style upon a release, but still it is a querystring. Not sure if you understood the reason why it has been implemented but here again...
DavidIQ wrote:
Tue Aug 11, 2020 7:44 pm
... it would be of benefit to add a hash/number/whatever to the import so that frequent visitors see the changes right away but, again, leaving it up to the style author.
I am asking you now, what's your thought about
Tastenplayer wrote:
Wed Aug 12, 2020 6:49 am
Do I have to insert the hash from prosilver there?
To request support for our extensions you can also contact me here: phpBB Studio

Please PM me only to request paid works. Thx. Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
🚀 Looking for a specific feature or alternative option? We will rock you! 🚀
User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 17374
Joined: Thu Jan 06, 2005 1:30 pm
Location: Fishkill, NY
Name: David Colón
Contact:

Re: Question about the hashcode in stylesheet

Post by DavidIQ »

The browser doesn't care if it's a hash or anything else. The point is to tell the browser that something changed and that the stylesheet needs to be reloaded.
Apply to become a Jr. Extension Validator
My extensions | In need of phpBB services? | Was I helpful today?
No unsolicited PMs unless you're planning on asking for paid help.
Post Reply

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