[#5437] [#5430] Sorting Avatars?

8 years 8 months ago #268533 by gjschaller
Replied by gjschaller on topic Sorting Avatars?
That is what I am doing now - I have 6 images that begin with 00-, and the others are just names. The six that begin with 00- are not at the beginning, nor are they grouped in any way - they are randomly sorted, it seems.

The ordering is consistent between the frontend and the backend, if that helps.

Geoffrey Schaller
Technical Officer
www.knightrealms.com

Please Log in to join the conversation.

8 years 8 months ago #268536 by krileon
Replied by krileon on topic Sorting Avatars?
My guess is the cPanel file manager is automatically sorting them. PHP readdir sorting is entirely based off the filesystem order, which probably isn't alphabetically.

Try "sort" in place of "ksort" as it'll redo the indexes as the display is using a for loop instead of foreach loop, which is why asort doesn't appear to do anything since the indexes remained the same.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

8 years 8 months ago - 8 years 8 months ago #268539 by gjschaller
Replied by gjschaller on topic Sorting Avatars?
Plain old "Sort" did the trick. Thank you!

Is there a way to prevent this from being overwritten when CB upgrades?

Geoffrey Schaller
Technical Officer
www.knightrealms.com

Please Log in to join the conversation.

8 years 8 months ago #268563 by krileon
Replied by krileon on topic Sorting Avatars?
I added a bug ticket to change ksort to sort in the core so it'll always be sorted alphabetically regardless of the filesystem sorting.

forge.joomlapolis.com/issues/5437


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.332 seconds

Facebook Twitter LinkedIn