News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Reset all members profile settings

Started by Apnomis, March 08, 2005, 07:11:40 AM

Previous topic - Next topic

Apnomis

I've had a quick search for this, but not really knowing how to word it I didn't get very far.

Basically I'm soon to launch a new theme on my forum, but as part of the overall theme design there are some profile options in the "Look & Layout" section that I want to change, I want these changes to change in every members profile and be default for all susiquent new members.

For example, I want quick moderation buttons to be defaulted on for mods, I want the quick reply box to be defaulted on for everyone, I want the show board summary inside the board option to be defaulted on for everyone (and for guests) etc.

Now I know there is a global reset for themes where you get reset peoples default. But how do you reset options like these and make them the default layout for future members? Does it have to be written into the code of the theme, or is it easier than that?

Thanks.

Fizzy

Well one option would be to modify the default values of the fields in the Database itself.
That way you wouldn't interfere with template coding

eg

In SMF_Members table
select QuickReply
Change Default value to 1
"Reality is merely an illusion, albeit a very persistent one." - A.E.


Fizzy

Oh, and to update all existing records you could run a query like:

UPDATE SMF_members  (that should perfectly match the table holding member details)
SET QuickReply = 1
WHERE  QuickReply = '0';

I think that should do the trick but please backup before attempting to reorganise the database :)
"Reality is merely an illusion, albeit a very persistent one." - A.E.


Ben_S

Quote from: Apnomis on March 08, 2005, 07:11:40 AM
Now I know there is a global reset for themes where you get reset peoples default. But how do you reset options like these and make them the default layout for future members? Does it have to be written into the code of the theme, or is it easier than that?

I think the guest options will do it for future members.
Liverpool FC Forum with 14 million+ posts.

Apnomis

I decided it would be easier to build this into the theme. basically I removed the if statements checking if the users option was selected, so now whether they have it selected or not in their profile it does it anyway!

Also doing it this way has the added advatage of them still be able to customise other themes, and prevent them from turning it off at a later date...

Advertisement: