MyBB Community Forums

Full Version: themes will revert to default if changing options
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hello,

mybb latest version, updated 3 weeks ago but problem is present since ever (4 years at least)

I have a forum with multiple groups and for each groups, I have a different theme

one of the theme is set to default, however, as soon as a user from any group make a change to his profile (ex:  the time-zone) the theme will change to the default one

while before they did not have the choice to change, then, with the default theme, they are presented with a drop down menu and can revert to their correct theme

this is not a major issue as the themes do not change the access to the users, but it is something that should not normally happen

any help is welcome

thanks
When you say they didn't have the choice to change, do you mean the option was removed from the template? If the option isn't there it will default to setting the value to 0 so will reset the user's selected theme. Did you just remove the <select> field from the template? It'll need to be replaced with a hidden field instead.
Hello reup,

If the theme selector is not present in the profile page, you have to add a hidden field with the user theme information in your
<input type="hidden" name="style" value="{$user['style']}" />

Template: usercp_options
thank you both for the replies

I will apply your solutions immediately and see if that fix my issue

applied and tested, the solution was perfect.

thanks