Our community has several hundred Profile Pics, as we use photos of people that we edit and assign ourselves, from our event photos.
Is there a way to sort the Profile Pics on the "Edit My Profile" page (and in the Admin area)? Even if it's just by file name, we can locate them MUCH faster, or name them with "00-" or such for special cases.
You mean sort the gallery images? It uses readdir, which returns them in whatever order they are stored in the filesystem. This is usually by name. I think it could be handy to have sorting, filtering, and paging functionality for the gallery images, but unlikely anytime soon as we don't want to add more features to the already very legacy field code. Once we refactor the fields code entirely we can look into adding more features like this. For now I've added a feature ticket so it's not forgotten.
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.
Thank you for the ticket, that will be awesome once it's implemented.
I have a series of images that begin with 00- and 01-, and they are not in the front, or even grouped, so something is amiss. Would this be a setting with readdir, that my host (SiteGround) might be able to help with?
Change the ksort usage to whatever you like to adjust the sorting. Current usage is sorting by key, which is the index, but the index is just an integer based off the order the file appears in the filesystem so should still sort by filesystem order. Regardless you can change the ksort to asort and should probably display how you're wanting.
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.
Changed from ksort to asort on line 3636, and the ordering of the images in the gallery has not changed, even after flushing the Joomla & PageSpeed cache.
How is it sorting them then? It's probably sorting alphabetically based off what the server thinks it should be. asort is alphabetical and ksort is key, which will be the filesystem ordering since the index is based off the order given by the filesystem. If it's in reverse then use arsort. Beyond that I can't suggest anything further as we do not support core edits and won't be looking into this further until we get to that ticket.
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.