DevelopersPL / DevAAC

DevAAC for TFS 1.0
https://developerspl.github.io/DevAAC
MIT License
29 stars 16 forks source link

Loading players with group_id > 1 in highscores and top 5. #22

Open djseban opened 9 years ago

djseban commented 9 years ago

Hi,

It would be nice to add configurable loading of highscores in DevAAC. For example, in config.php we add: define('MAX_GROUP_ID_IN_HIGHSCORES', 1) and highscores page alongside with Top 5 Players will no longer load players with group_id greater than 1.

My best

DSpeichert commented 9 years ago

It can be easily done by modifying the line at https://github.com/DevelopersPL/DevAAC/blob/master/public_html/modules/players/players.js#L90 from

highExperience: { params: {sort: '-experience', limit: 5}, isArray: true, cache: true },

to something like this:

highExperience: { params: {sort: 'group_id,-experience', limit: 5}, isArray: true, cache: true },
gesior commented 7 years ago

It's not a real fix... so Tutors and Senior Tutors won't be visible in highscores?

DSpeichert commented 7 years ago

I'm not sure what exactly you are trying to achieve. Detailed change suggestions and/or pull requests are welcome.