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!
Anti-Spam Guide
User avatar
durangod
Registered User
Posts: 677
Joined: Tue Nov 03, 2009 1:26 pm

Why no override files in phpbb and css question

Post by durangod » Sun Sep 16, 2018 3:37 pm

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 :)

User avatar
Paul
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 24808
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 » Sun Sep 16, 2018 3:42 pm

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.
Knock knock
Race condition
Who's there?

My BlogMy Photosmy phpBB Extensionscustom phpBB work & Development

User avatar
durangod
Registered User
Posts: 677
Joined: Tue Nov 03, 2009 1:26 pm

Re: Why no override files in phpbb and css question

Post by durangod » Sun Sep 16, 2018 3:45 pm

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.

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

Re: Why no override files in phpbb and css question

Post by Lumpy Burgertushie » Sun Sep 16, 2018 5:19 pm

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
I am available for custom work on a donation basis. Please send me a PM with your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

OK, so what's the speed of dark?

User avatar
durangod
Registered User
Posts: 677
Joined: Tue Nov 03, 2009 1:26 pm

Re: Why no override files in phpbb and css question

Post by durangod » Sun Sep 16, 2018 10:40 pm

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

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

Re: Why no override files in phpbb and css question

Post by Lumpy Burgertushie » Mon Sep 17, 2018 7:02 am

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
I am available for custom work on a donation basis. Please send me a PM with your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

OK, so what's the speed of dark?

User avatar
durangod
Registered User
Posts: 677
Joined: Tue Nov 03, 2009 1:26 pm

Re: Why no override files in phpbb and css question

Post by durangod » Mon Sep 17, 2018 10:13 am

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 :)

User avatar
david63
Jr. Extension Validator
Posts: 15070
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: Why no override files in phpbb and css question

Post by david63 » Mon Sep 17, 2018 10:50 am

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!
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
Ger
Recognised Extension Developer
Posts: 1792
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 » Mon Sep 17, 2018 12:07 pm

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:
-Available for custom work-

User avatar
durangod
Registered User
Posts: 677
Joined: Tue Nov 03, 2009 1:26 pm

Re: Why no override files in phpbb and css question

Post by durangod » Mon Sep 17, 2018 1:28 pm

OK thanks all :)

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 16788
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 » Mon Sep 17, 2018 1:31 pm

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: 65328
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Why no override files in phpbb and css question

Post by Lumpy Burgertushie » Mon Sep 17, 2018 3:49 pm

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
I am available for custom work on a donation basis. Please send me a PM with your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

OK, so what's the speed of dark?

User avatar
3Di
Registered User
Posts: 13141
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: Why no override files in phpbb and css question

Post by 3Di » Mon Sep 17, 2018 5:44 pm

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. :)
:game_die: The new Dice Roller extension for phpBB 3.2 is out! :game_die:

Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
Extensions, Scripts, MOD porting, Update/Upgrades
My development's activity º PhpStorm's proud user

aeneas1
Registered User
Posts: 429
Joined: Wed Jan 27, 2016 5:58 pm

Re: Why no override files in phpbb and css question

Post by aeneas1 » 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!

User avatar
david63
Jr. Extension Validator
Posts: 15070
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: Why no override files in phpbb and css question

Post by david63 » Tue Dec 04, 2018 3:25 pm

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

Post Reply

Return to “phpBB Discussion”

Who is online

Users browsing this forum: JimA and 23 guests