Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: Aaron Nelsen on March 17, 2004, 06:52:16 AM

Title: Adding option in the Additional Preferences section of the profile
Post by: Aaron Nelsen on March 17, 2004, 06:52:16 AM
How would I go about adding the option for users to have the newest messages displayed first? Like in the the Features and Options area of the admin center you can select "View Newest Messages First" but that affects all my users, I just want this to be something each user can enable if they wish.
Title: Re: Adding option in the Additional Preferences section of the profile
Post by: pulpitfire on March 17, 2004, 09:50:02 AM
well, i think you'd need to add a checkbox to your Profile.template.php, and then change

// Calculate the fastest way to get the messages
$ascending = empty($modSettings['viewNewestFirst']);


in Display.php, so it checks for the profile box instead of the modSettings box. :)
Title: Re: Adding option in the Additional Preferences section of the profile
Post by: MrCue on March 17, 2004, 10:12:45 AM
Or check both, so you still have the ability to turn it on should you change your mind one day.
Title: Re: Adding option in the Additional Preferences section of the profile
Post by: [Unknown] on March 17, 2004, 07:53:59 PM
You could make it use theme options, I'll be writing a tutorial on that later.

-[Unknown]