Question about the hashcode in stylesheet

For support and discussion related to templates and themes in phpBB 3.3.
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 »

Couldn't you create that automatically :?:

:idea:
If you change the style, you usually empty the cash in the ACP. If the hash value has changed, add a randomly generated number to it. There would have to be a function to update this in the stylesheet.css. I think there is a way to do this.
Regards wintstar

There are people who say I have no idea what I'm writing about, and I don't understand anything. Let them write, because they look in the mirror and write about their own selves.
My board - My atelier - Css Hash Tool - Memories of phpBB 3.0.14
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 »

phpBB releases got just ONE querystring per file (a CRC32 hash in this case) which is provided with the shipped prosilver style.

It is upon the style authors to provide their own querystrings if those authors want their users to have no problems like purge their own browser's cache. ;)

Again, a querystring can be whatever you like it to be, like: ?_my_awesome_imho_style_v3.9.2.3.4.5.6
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
wintstar
Registered User
Posts: 329
Joined: Sat Mar 07, 2009 12:39 pm

Re: Question about the hashcode in stylesheet

Post by wintstar »

Then no randomly generated number. Then update the hash value. Could there be a way to insert this in the core as a new function. There should be a way to add the changed hash value to stylesheet.css. So automatically as core function when changing the hash value of the css files. A new stylesheet.css could be generated by hash value changes.
Regards wintstar

There are people who say I have no idea what I'm writing about, and I don't understand anything. Let them write, because they look in the mirror and write about their own selves.
My board - My atelier - Css Hash Tool - Memories of phpBB 3.0.14
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 »

That's done with the phpBB releases' builds with a PHP script which runs on a Shell (CLI), but just for prosilver, it is a prosilver stuff only.

Again, all of this is not related to style authors, details have been explained to death already.
I do not think there should be something more to add, IMHO.

No randomly generated number, it is a querystring. Do what you want if you want... just prepend the ? in case you want to use it.
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
wintstar
Registered User
Posts: 329
Joined: Sat Mar 07, 2009 12:39 pm

Re: Question about the hashcode in stylesheet

Post by wintstar »

A new stylesheet.css could be generated by hash value changes.
I have added this to my previous post. I mean this idea as a new feature in one of the next versions. I will write this as an idea in phpBB Ideas. This is probably the wrong place here and will be misunderstood.
Regards wintstar

There are people who say I have no idea what I'm writing about, and I don't understand anything. Let them write, because they look in the mirror and write about their own selves.
My board - My atelier - Css Hash Tool - Memories of phpBB 3.0.14
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 »

wintstar wrote: โ†‘
Wed Aug 12, 2020 10:37 am
A new stylesheet.css could be generated by hash value changes.
I have added this to my previous post. I mean this idea as a new feature in one of the next versions. I will write this as an idea in phpBB Ideas. This is probably the wrong place here and will be misunderstood.
Again, that's just for prosilver and the phpBB releases. It is a builds' script.

If you want something like that your best bet is to think about it as an extension.

Anyway, let me say this time we're making a drama out of nothing.
All is clear, you authors are exempt if you want or follow the directions given if you so wish, your choice.

Enough said. :)

I promised myself that I would not respond in this specific topic but unfortunately I am Italian :P .
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
wintstar
Registered User
Posts: 329
Joined: Sat Mar 07, 2009 12:39 pm

Re: Question about the hashcode in stylesheet

Post by wintstar »

I don't see it as an extension. I see it as a useful new feature at the core. This should work for all additional installed styles that are not child styles. Now in 3.3.1 the hash value has been added, so if something has been changed in the css files, something must be changed in the stylesheet.css. And why shouldn't this happen automatically as a core function, why as an extension?
Regards wintstar

There are people who say I have no idea what I'm writing about, and I don't understand anything. Let them write, because they look in the mirror and write about their own selves.
My board - My atelier - Css Hash Tool - Memories of phpBB 3.0.14
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 »

3Di wrote: โ†‘
Wed Aug 12, 2020 10:43 am
Again, that's just for prosilver and the phpBB releases. It is a builds' script.
phpBB has just one style ATM, prosilver.
In phpBB 4.0.0 AFAIK this kind of stuff will be removed.

Anyway, just to stay on topic: feel free to open your idea. ;)
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
wintstar
Registered User
Posts: 329
Joined: Sat Mar 07, 2009 12:39 pm

Re: Question about the hashcode in stylesheet

Post by wintstar »

It will still be a long journey until then. And what about in the time until then?
viewtopic.php?f=436&t=2563406
Regards wintstar

There are people who say I have no idea what I'm writing about, and I don't understand anything. Let them write, because they look in the mirror and write about their own selves.
My board - My atelier - Css Hash Tool - Memories of phpBB 3.0.14
User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 17375
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 »

If you don't want to go through the ~15 seconds needed to update the querystring values in the import statements of your stylesheet then the simple solution would be to just include each stylesheet individually in the header just like the others are so that whenever a cache purge happens the assets_version querystring parameter will be updated.
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: 1305
Joined: Fri Dec 12, 2008 9:08 pm
Location: Manchester, UK
Contact:

Re: Question about the hashcode in stylesheet

Post by eeji »

Why does this seem so difficult? If the query string changes, the browser reloads the stylesheet. If your style changes, change the query string. It doesn't matter what the query string is, so long as it's different to the previous style versions. You can use absolutely anything you want to, it will still pass validation and the style css will still refresh.
My phpBB styles: phpbbstyles.oo.gd
My board: iansvivarium.com
User avatar
Hanakin
Front-End Dev Team Lead
Front-End Dev Team Lead
Posts: 1018
Joined: Wed Dec 30, 2009 8:14 am
Name: Michael Miday
Contact:

Re: Question about the hashcode in stylesheet

Post by Hanakin »

We did change what/how the hash is put there going forward with the default style. It will no longer be a version number but an auto generated hash for each build. So in other words if we make changes to a specific file for a release that file will get a new auto generated hash. This should not affect or change anything said here by David. Just do not want anyone to question if it did.
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 »

Hanakin wrote: โ†‘
Wed Aug 12, 2020 9:13 pm
We did change what/how the hash is put there going forward with the default style. It will no longer be a version number but an auto generated hash for each build. So in other words if we make changes to a specific file for a release that file will get a new auto generated hash. This should not affect or change anything said here by David. Just do not want anyone to question if it did.
That's exactly what is already happening since 3.3.1 and the reason of this topic. It is an auto generated hash for each build.
Let's not create confusion here please, we already had hard times with this. Thanks.

About this thing that will change in 4.0.x has been already said as well, let's focus on 3.3.x.
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! ๐Ÿš€
Post Reply

Return to โ€œ[3.3.x] Styles Support & Discussionโ€