XF 2.3 Can we batch update users to follow "System" style setting?

If you're running the default style, "" (null/empty) = system, "default" = light mode, and "alternate" = dark mode for the default style. I'm sure other styles follow the same syntax (light/dark mode and null = system).

I don't know if you can do this in ACP, but this would set everyone to "system".

SQL:
UPDATE `xf_user` SET `style_variation` = '';

Edit: You would have to test by creating a new user whether the default selection is "", "default", or "alternate" to see if it defaults to "" (system) on signup, or to whatever they already selected prior to signup (if they chose dark mode first then it should be "alternate" after they signed up). If it doesn't, you'll need custom development to make it enter "" on signup, because running the query every X hours on a cron job would probably annoy people if they made their selection after signing up.
 
Last edited:
Well when XF released the dark style I immediately was set to it, due to the System setting. So there must be a way to do this for our own users as I doubt they ran a query.

One thought is, if we have only one style enabled (and I disable the old dark style), it will automatically default to System. Perhaps?
 
One thought is, if we have only one style enabled (and I disable the old dark style), it will automatically default to System. Perhaps?
Wouldn't that make it moot? You would essentially have just 1 style with 1 variant so system would have to fall back to the single variation only because there is no alternate.

Unless you're planning on disabling it just to set to system and then reenabling alternate/dark mode just to not run the query.

If that's how it works, it's not intuitive, and there should be a checkbox under "enable variation" that says "default to system".
 
I think @beerForo was saying that he has one style (with a dark and light variant) and the original dark style will be disabled (as it's now a variant in the default style).

But yeah, "System" is the default regardless. People have requested it default to either "Light" or "Dark" but fundamentally that's not an approach we want to take. We strongly feel that "System" should be the default rather than one or the other being forced upon you.

I exclusively use dark mode across all my devices and so if a website can display in Dark mode, I want that the be automatic, rather than me having to explicitly select "Dark".

The other advantage of "System" is your device's "Auto" mode. Not sure how prevalent this is on Android or Windows, but at least on iOS and macOS if I set my system style to "Auto" then I'd get Light mode during the day and Dark mode later in the day. A lot of people prefer this as they find Light mode easier to read, particularly during the day, but prefer the less intense Dark mode during the night.

So, yeah, "System" is the default and probably will be for the foreseeable.
 
But yeah, "System" is the default regardless. People have requested it default to either "Light" or "Dark" but fundamentally that's not an approach we want to take. We strongly feel that "System" should be the default rather than one or the other being forced upon you.
I haven't tested this, but if a user's system was set to light mode, came to XF as a guest, chose to enable dark mode, and then sign up, you're saying that it would default to system?

Seems like it should remember a guest's preference and apply it on sign up rather than flipping back to system where they'd be set to default/light mode again.
 
I didn't say that, no.

But, as it happens, that is the case, and I agree it should remember a guest's preference.
I don't think that merits a suggestion thread, but it should be noted in a future upgrade to store it in the cookie and apply it on sign up.

That could be an irritant to some, not understanding why it flipped back, or even remember how to flip back as there could've been a template edit that moved the switcher (there are already add ons to move it) as they've remained a guest so long that they forgot how/they changed it.
 
I think @beerForo was saying that he has one style (with a dark and light variant) and the original dark style will be disabled (as it's now a variant in the default style).
Precisely. And I wondered if I unticked the user selectability of the dark style if those users, when moved to the light style (with dark variant), would be set to System, so they would not even notice the transition if their systems were set to dark. So that's what I did. I imagine this takes place the next time they log in.
 
Ah yes okay so those already on "Light" (named style) would move to System since variants were added to the style, and those on the other style would do the same, just making the move from style to style. Thanks
 
Yeah we're looking into it
It would also be nice if it was easily possible to have multiple variation choosers on one page (for example footer and navigation) - right now this doesn't work without issues.

Another thing you could consider:
Some users may want to have different variations on different devices, for example light on desktop and dark on mobile.
As it is right now this is only possible when not being logged in.
 
Some users may want to have different variations on different devices, for example light on desktop and dark on mobile.
Why wouldn't they just use "System" in this case?

For example if desktop is set to light mode, mobile is set to dark mode, it would just work.

The use case for mixing and matching seems diminishingly small.
 
Why wouldn't they just use "System" in this case?
Because they like other apps on their smartphone to be Dark, but prefer XenForo to be Light (as on desktop).

The use case for mixing and matching seems diminishingly small.
Yeah, certainly not a large amount, but might be more than expected - that's the reason why we implemented such functionality for our Dark Style in 2.2.

IMHO it would't hurt to have such flexibility, but it's not the end of the day if we have to implement this :)
 
So then they scroll down and select Light.
In this specific case, yes.

That doesn't work for users though who want a time-dependent display on desktop (=System) but prefer always Light on their smartphone that is set to dark (=Light).

I know that sounds somewhat strange, but we got such reports from users.
 
Last edited:
So members that are currently online, I have taken a look at their preferences and some are still on my old dark style that has user selection off. How is this possible?
 
Back
Top Bottom