Why no override files in phpbb and css question

Do not post support requests, bug reports or feature requests. Discuss phpBB here. Non-phpBB related discussion goes in General Discussion!
Scam Warning
User avatar
durangod
Registered User
Posts: 789
Joined: Tue Nov 03, 2009 1:26 pm
Location: USA East Texas
Name: Dave

Why no override files in phpbb and css question

Post by durangod »

I was just curious why there are not override files for both html and css custom changes to keep people from having to modify core files?

I was also curious why so many css files? Is it just for better management, is it to keep one file from being huge or is there an actual technical reason based on the structure of the script?

Thanks :)
Username is short for durango d (durangodave)
Paul
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 28619
Joined: Sat Dec 04, 2004 3:44 pm
Location: The netherlands.
Name: Paul Sohier
Contact:

Re: Why no override files in phpbb and css question

Post by Paul »

You can create a new style that is based on prosilver and that inherits from it, and have your changes in their. You will only need the files in their that you change.
User avatar
durangod
Registered User
Posts: 789
Joined: Tue Nov 03, 2009 1:26 pm
Location: USA East Texas
Name: Dave

Re: Why no override files in phpbb and css question

Post by durangod »

Thanks Paul, yes i see that but then if the style or extension dev upates their stuff then our changes are lost anyway, correct?

Would it be better just for us to create a custom.css file and then have that included by the script, it would mean adding a line to the code but thats better than losing a bunch of css.
Username is short for durango d (durangodave)
User avatar
Lumpy Burgertushie
Registered User
Posts: 69223
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Why no override files in phpbb and css question

Post by Lumpy Burgertushie »

the updates do not touch your custom styles at all.
of course if you delete the styles folder during updates then you will need to reupload your custom style after the file replacement/update.


if there are any changes to the style files that your custom style contains then you would need to do them manually.


robert
Premium phpBB 3.3 Styles by PlanetStyles.net

I am pleased to announce that I have completed the first item on my bucket list. I have the bucket.
User avatar
durangod
Registered User
Posts: 789
Joined: Tue Nov 03, 2009 1:26 pm
Location: USA East Texas
Name: Dave

Re: Why no override files in phpbb and css question

Post by durangod »

Yeah that much i knew, i was just curious if there was a functional reason why they decided not to have override files in the original dev phase.

Yeah it could be a security issue i guess if someone hacked the override, but if they were able to do that they would have access to much more than that anyway. And there are certainly calculated risks in everything we do online. So i was just curious maybe the dev's had a bad experience with a override file in their career and decided not to include them maybe.

WHMCS has language override files for their software and thats handling most peoples whole hosting business so it cant be that insecure to have one. Maybe not for html but at the minimum for css would certainly save all of us alot of time.

And the best thing is that it can be added with no take away from the original script, im thinking just one line of code and one empty file would do it
Username is short for durango d (durangodave)
User avatar
Lumpy Burgertushie
Registered User
Posts: 69223
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Why no override files in phpbb and css question

Post by Lumpy Burgertushie »

been doing this stuff for a long time and I have no idea what you are talking about when you say "override files"

sorry,
robert
Premium phpBB 3.3 Styles by PlanetStyles.net

I am pleased to announce that I have completed the first item on my bucket list. I have the bucket.
User avatar
durangod
Registered User
Posts: 789
Joined: Tue Nov 03, 2009 1:26 pm
Location: USA East Texas
Name: Dave

Re: Why no override files in phpbb and css question

Post by durangod »

Override file is a file the script uses to check for overrides to core code. The file name is coded into the core.

For example: lets say that you wanted to change some core css, you would put your custom css into a override file. That code is executed on top of the core css code. This allows users to put as much custom css as they want in the override file without worry of losing it because that file is not included in the install or updates. The user must create the file name (whatever that is) per instructions after the install.

We used override files alot for language keys.. So if someone wanted to change key 'welcome' => 'hello how are you' to 'how are you today' they would just put this in the override file

'welcome' => 'how are you today';

the core would use that custom data rather than the core language data. The same works for css, html, and some scripts even php but that is rare.

Some scripts out there dont want people touching the core files at all, so they give them the ability to use their own code and override the core code for custom work using override files.

Make sense now :)
Username is short for durango d (durangodave)
User avatar
david63
Registered User
Posts: 20646
Joined: Thu Dec 19, 2002 8:08 am

Re: Why no override files in phpbb and css question

Post by david63 »

I would suggest that you post your suggestion in the Ideas forum
David
Remember: You only know what you know and - you don't know what you don't know!

I now no longer support any of my extensions but they will start to become available here
User avatar
Ger
Registered User
Posts: 2108
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

Re: Why no override files in phpbb and css question

Post by Ger »

You can just override language keys with an extension.

Create a file ./ext/vendor/name/language/en/override_common.php
There you set an array with language keys just like any other extension.

Next, hook into core.user_setup_after and load your language file. Everything you have there will overwrite language keys previously loaded.
My extensions:
Simple CMS, Feed post bot, Avatar Resize, Modbreak, Magic OGP, Live topic update, Modern Quote, Quoted Where (GDPR) and Autoresponder.
Newest: FAQ manager for 3.2

Like my work? Buy me a coffee to keep it coming. :ugeek:

-Don't PM me for support-
User avatar
durangod
Registered User
Posts: 789
Joined: Tue Nov 03, 2009 1:26 pm
Location: USA East Texas
Name: Dave

Re: Why no override files in phpbb and css question

Post by durangod »

OK thanks all :)
Username is short for durango d (durangodave)
User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 18316
Joined: Thu Jan 06, 2005 1:30 pm
Location: Fishkill, NY
Name: David Colón
Contact:

Re: Why no override files in phpbb and css question

Post by DavidIQ »

durangod wrote: Mon Sep 17, 2018 10:13 am Some scripts out there dont want people touching the core files at all, so they give them the ability to use their own code and override the core code for custom work using override files.
Nowadays there's actually little to no need for editing core files. I would say that almost anything that needs customizing can be accomplished through extensions and events including things like changing behavior or what is returned for language keys. Plus adding a CSS override is as easy as adding a CSS file to the same extension that gets appended to the header and override classes there as needed. This is what I do for all clients that need customized style changes for their forums.

Of course if there is something you cannot accomplish with what is already available we'd definitely like to hear about it so we can address it.
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
Lumpy Burgertushie
Registered User
Posts: 69223
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Why no override files in phpbb and css question

Post by Lumpy Burgertushie »

also, this is basically what is already in place with custom styles, child styles and custom css files.

it would always be better to just create a child style for your custom changes to the css and/or the html.

your child style need only have the html files that have changes and you can create a custom css file and put all your css changes in it.

then you simply install that child style on your board and use it instead of prosilver. it will inherit from prosilver all the standard files.

when you update/upgrade you simply replace old files with new ones and then update your child style files if needed.

seems like that is basically what you are talking about with "override files"


robert
Premium phpBB 3.3 Styles by PlanetStyles.net

I am pleased to announce that I have completed the first item on my bucket list. I have the bucket.
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

Re: Why no override files in phpbb and css question

Post by 3Di »

Ger wrote: Mon Sep 17, 2018 12:07 pm You can just override language keys with an extension.
There are also events which allow to create mini-extensions that can override things for "that and this and there", not only language. :)
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
aeneas1
Registered User
Posts: 451
Joined: Wed Jan 27, 2016 5:58 pm

Re: Why no override files in phpbb and css question

Post by aeneas1 »

when you minify a custom.css file (custom.min.css), should you delete the custom.css file (the unminified file)? thanks!
User avatar
david63
Registered User
Posts: 20646
Joined: Thu Dec 19, 2002 8:08 am

Re: Why no override files in phpbb and css question

Post by david63 »

aeneas1 wrote: Tue Dec 04, 2018 2:51 pm when you minify a custom.css file (custom.min.css), should you delete the custom.css file (the unminified file)? thanks!
Not if you ever want to modify that file - although there are online utilities that will "unminify". Also if it part of an extension then both files should be in the extension.
David
Remember: You only know what you know and - you don't know what you don't know!

I now no longer support any of my extensions but they will start to become available here
Post Reply

Return to “phpBB Discussion”