Block removing and editing the standard phpBB default style

Do not post support requests, bug reports or feature requests. Discuss phpBB here. Non-phpBB related discussion goes in General Discussion!
Get Involved
Post Reply
User avatar
warmweer
Registered User
Posts: 2734
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Belt ... well actually Belgium

Block removing and editing the standard phpBB default style

Post by warmweer » Wed Feb 06, 2019 5:00 pm

The title does not imply that the default style should not be edited anymore BUT that an edited standard style should become a new style (and thus get a new style_id).
The reason for this is because I have acquired a taste in fixing broken updates and quite a few of these broken updates were due to edits in prosilver or because prosilver was deleted once and later reinstalled... with style_id <> 1. (and I'm actually fed up of searching for the edits).
With the current system it is easy to copy prosilver, rename it and edit to your heart's delights and use the inheritance( and I'm thinking that even only changed files would be needed in the new style's folder). (something similar to the /all folder)
This will guarantee that style_id remains unchanged (unless someone edits the database directly), the phpBB default style remains unchanged and the style edits are kept seperate (for ease of updating).

It's an idea I've had for more than a week now and I'm sure there are things I haven't thought about (for one, I can't think of any drawbacks yet).

So shoot (I've got thick armour).
Last edited by JimA on Sun Feb 10, 2019 6:36 pm, edited 1 time in total.
Reason: Moved from the ideas section to the Discussion forums
My board's not broken, it just went peculiar

User avatar
Raul [ThE KuKa]
Style Customisations
Style Customisations
Posts: 6516
Joined: Mon Dec 08, 2003 9:24 pm
Location: Spain
Name: Raul Arroyo
Contact:

Re: Block removing and editing the standard phpBB default style

Post by Raul [ThE KuKa] » Wed Feb 06, 2019 6:32 pm

Hello,

As you say... if a user wants to edit the prosilver style, it's true which can simply copy/paste, change the name style, change, style.cfg fil, etc. and ready.

But to all this... :mrgreen:

I don't understand the ID of style style_id, what else? :roll:

Honestly, I don't see any "utility" to what you say.

Best regards.
All unsolicited PMs will be ignored.
:warning: Knowledge Base | Documentation | Board rules | phpBB Styles Rules & Policies :warning:


If you like my styles, translations, etc. and want to show some appreciation, then feel free to Donate with Image
:flag_es: phpBB Spain - Online Since 2003 :heart:



User avatar
warmweer
Registered User
Posts: 2734
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Belt ... well actually Belgium

Re: Block removing and editing the standard phpBB default style

Post by warmweer » Wed Feb 06, 2019 7:16 pm

Raul [ThE KuKa] wrote:
Wed Feb 06, 2019 6:32 pm
Hello,

As you say... if a user wants to edit the prosilver style, it's true which can simply copy/paste, change the name style, change, style.cfg fil, etc. and ready.

But to all this... :mrgreen:

I don't understand the ID of style style_id, what else? :roll:

Honestly, I don't see any "utility" to what you say.

Best regards.
OK, I see that my opening post is unclear. It was not really about editing the standard phpBB style, but only allowing updating to start if the standard style delivered with phpBB (currently prosilver), is present in its unmodified state and active and set as default style.

I have seen updates fail when prosilver has style_id = 2 and another style (usually subsilver-like) has style_id=1 (and is default style).
The point is to try and avoid all update failures due to absence or modification of prosilver.

So, when update is attempted, there could be a test on the presence (and active state/default style) of "prosilver" with style_id = 1 and a check of the unmodified set (CRC-check of the files?). If the test fails, then updating would not be possible (with an explanatory message - like with the requirement test) until prosilver is restored, active and set as default style)

Similarly (and I forgot to mention that) the update test could check that extensions are disabled (sometimes this also causes a failed update).

Apologies for lots of repetitions in the above but it's to make sure it's clear that I have no problem with prosilver being copied and edited, but I'm trying to find a way of eliminating those avoidable failed updates.
My board's not broken, it just went peculiar

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

Re: Block removing and editing the standard phpBB default style

Post by Lumpy Burgertushie » Wed Feb 06, 2019 7:52 pm

I have never seen an update fail because of prosilver not having the ID of 1
even back when we all used the auto update, it still did not depend on the style ID in the database.

I would assume that the old auto update did a simple file diff of the prosilver files and created the needed changes to the files.

It would not need to even know what the style ID was if that is the case.

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
warmweer
Registered User
Posts: 2734
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Belt ... well actually Belgium

Re: Block removing and editing the standard phpBB default style

Post by warmweer » Wed Feb 06, 2019 8:58 pm

Lumpy Burgertushie wrote:
Wed Feb 06, 2019 7:52 pm
I have never seen an update fail because of prosilver not having the ID of 1
even back when we all used the auto update, it still did not depend on the style ID in the database.

I would assume that the old auto update did a simple file diff of the prosilver files and created the needed changes to the files.

It would not need to even know what the style ID was if that is the case.

robert
Just recently (about a week ago I think) I posted in a topic about a failed update (or upgrade). subsilver2 had style_id = 1, prosilver had style_id = 2.
Removing subsilver and changing style_id to 1 for prosilver solved it. (and that was a board with a very easy fix - it wasn't an autoupdate).
About 2 months ago I had a board where prosilver had been removed.

Whether the absence or modification was the cause is not something I can prove. What I can testify to is that I managed to get the update working properly by restoring prosilver with style_id = 1.
It's just something I thought I should mention so that the developers can ascertain whether this could cause update failures.

Actually I was too hasty and this should not have been an "Idea" but a discussion.
Requesting a move (if possible).
My board's not broken, it just went peculiar

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

Re: Block removing and editing the standard phpBB default style

Post by david63 » Wed Feb 06, 2019 10:15 pm

Does this not become irrelevant with the "new" style structure that is currently being developed?
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

Paul
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 25387
Joined: Sat Dec 04, 2004 3:44 pm
Location: The netherlands.
Name: Paul Sohier
Contact:

Re: Block removing and editing the standard phpBB default style

Post by Paul » Wed Feb 06, 2019 10:47 pm

You can't just change a ID of something. This is a generated value, and should stay the same for every row in a table while it exists. If this is really is a issue, then it should be solved in a different way, and not by changing the ID :)
Knock knock
Race condition
Who's there?

My BlogMy Photosmy phpBB Extensionscustom phpBB work & Development

User avatar
warmweer
Registered User
Posts: 2734
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Belt ... well actually Belgium

Re: Block removing and editing the standard phpBB default style

Post by warmweer » Wed Feb 06, 2019 11:08 pm

david63 wrote:
Wed Feb 06, 2019 10:15 pm
Does this not become irrelevant with the "new" style structure that is currently being developed?
Probably yes.
My board's not broken, it just went peculiar

User avatar
warmweer
Registered User
Posts: 2734
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Belt ... well actually Belgium

Re: Block removing and editing the standard phpBB default style

Post by warmweer » Wed Feb 06, 2019 11:23 pm

Paul wrote:
Wed Feb 06, 2019 10:47 pm
You can't just change a ID of something. This is a generated value, and should stay the same for every row in a table while it exists. If this is really is a issue, then it should be solved in a different way, and not by changing the ID :)
That's what I thought also.
But I'll go through the backups I still have (I normally keep them for 1, max 2 weeks) and see if I can find an example.
The only way to achieve that (that I can think of) would be to have prosilver in place (style_id=1), install a second style (style_id=2), uninstall prosilver (there is no more style_id =1), reinstall prosilver (which due to autoincrement would get style_id =3).
How another style would ever get style_id =1 is a mistery to me (unless the styles table was edited manually).
My board's not broken, it just went peculiar

User avatar
canonknipser
Registered User
Posts: 2086
Joined: Thu Sep 08, 2011 4:16 am
Location: Germany
Name: Frank Jakobs
Contact:

Re: Block removing and editing the standard phpBB default style

Post by canonknipser » Thu Feb 07, 2019 1:10 pm

warmweer wrote:
Wed Feb 06, 2019 11:23 pm
How another style would ever get style_id =1
Probably installed phpBB with default subsilver back in ancient times?
Or a host based software installer providing a different theme as a default?

NEVER EVER should any software rely on special values of automated generated values - auto_increment values don't even need to start with 1 or increase by 1

A good way should be to check if prosilver is present on the file system and in the styles table by checking the style name in the table and style.cfg-file. Start the update only if both are present and style.cfg having the correct version number. The update-process then should set prosilver as the active style for the updating user - afaik the style itself can be marked as inactive in the styles table.
Greetings, Frank
phpbb.de support team member
English is not my native language - no support via PM or mail
New arrival - Extensions and scripts for phpBB

User avatar
warmweer
Registered User
Posts: 2734
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Belt ... well actually Belgium

Re: Block removing and editing the standard phpBB default style

Post by warmweer » Fri Feb 08, 2019 10:30 am

canonknipser wrote:
Thu Feb 07, 2019 1:10 pm
warmweer wrote:
Wed Feb 06, 2019 11:23 pm
How another style would ever get style_id =1
Probably installed phpBB with default subsilver back in ancient times?
AFAIR (although it's so long ago I can't be sure) the upgrade from 2.x to 3.0 removed subsilver and introduced prosilver with style_id = 1.
I even think subsilver was stopped completely and subsilver2 was released later.

As to the rest of your post: complete agreement from my side
My board's not broken, it just went peculiar

Post Reply

Return to “phpBB Discussion”