Advertisement:

Author Topic: Adding option in the Additional Preferences section of the profile  (Read 5480 times)

Offline Aaron Nelsen

  • Jr. Member
  • **
  • Posts: 113
  • Gender: Male
    • Hijinks Inc.
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.

Offline pulpitfire

  • Sophist Member
  • *****
  • Posts: 1,132
  • Gender: Male
  • This is what the php parser looks like.
    • Pulpitfire Devotionals
Re: Adding option in the Additional Preferences section of the profile
« Reply #1 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

Code: [Select]
// 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. :)

Offline MrCue

  • Full Member
  • ***
  • Posts: 533
  • Gender: Male
  • Chief Architect
    • Installation of SMF
Re: Adding option in the Additional Preferences section of the profile
« Reply #2 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.
I am neither a Pessimist nor an Optimist, Just a Realist.

Eve-Online Forum | View Latest Eve-Online Kills | Site Map | SMF Installation

Offline [Unknown]

  • SMF Friend
  • SMF Master
  • *
  • Posts: 36,102
  • Gender: Male
Re: Adding option in the Additional Preferences section of the profile
« Reply #3 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]