Noche
New Member
Noob and newbie
Posts: 108
inherit
155521
0
Dec 15, 2023 6:37:45 GMT -8
Noche
Noob and newbie
108
June 2010
sod
|
Post by Noche on Nov 25, 2023 9:29:20 GMT -8
Hello! I would like to order the two boxes "users online" and "users online in the past 24 hours" I wish to do this in alphabetical order but it would be nice to be able to change it to groups if need be I've found a thread where a code was posted ( here), but it does not work on the newest version of Proboards, and therefore I am asking for help
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,017
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Nov 25, 2023 22:46:33 GMT -8
Hello! I would like to order the two boxes "users online" and "users online in the past 24 hours" I wish to do this in alphabetical order but it would be nice to be able to change it to groups if need be I've found a thread where a code was posted ( here), but it does not work on the newest version of Proboards, and therefore I am asking for help A quick test shows that the code still works. Have you tried it perhaps using a more conventional theme? It is much more likely that there is a change to your forum, which prevents the code from working as intended. By far, the majority of code incompatibilities usually stem from changes made to expected forum structures via template modifications or improper installation. This is why it is best to provide a forum URL when having issues with a code or plugin. If you wish to configure to sort by other criteria then the line to change would be var sortBy = ['css','color'], what that requires is a jQuery method (css in this case) and the parameter to pass to that method ('color' in this case) and an optional third boolean arg specifying to sort in ascending order (default is descending) . It then sorts using the return value of the call. Examples of other configurations: - var sortBy = ['idFromClass','group', true]
sorts by group number in ascending order - var sortBy = ['idFromClass','user']
sort by user ID (numeric) - var sortBy = ['attr','title']
sort by user ID (the one you use to login) - var sortBy = ['html']
sort alphabetically (by display name)
The list could go on... Edit:
I should note that there is a small aesthetic bug in the code when the number of users exceeds 96 in 24Hr box since an "and xx more..." link is created to see the full list and this code removes the "and " because it is not expecting that link. It is a fairly rare event, so it will be addressed once it is encountered again. Edit2:
The code in this post has been updated to recognize the "and xx more..," link when it exists and handle it properly
|
|
Noche
New Member
Noob and newbie
Posts: 108
inherit
155521
0
Dec 15, 2023 6:37:45 GMT -8
Noche
Noob and newbie
108
June 2010
sod
|
Post by Noche on Nov 26, 2023 12:11:54 GMT -8
Thank you for getting back to me!
I have tried on 2 custom themes and the default one and none of them are sorted when the code is in place. I have this in the Main Footer part of the structure?
After clearing my cashe it seems it works on the default theme! Can I do anything to get this to work on custom themes?
I just had to change the class the code was looking for. I'm sorry for the inconvenience!
|
|