-
- 24,544 Posts
Thanks for the kind words. Glad I could help.
-
- 4 Posts
Hello Team
We need user folder in alphabetically order in file manager can you please let me know how we can do it .
Please find attachment
-
- 15 Posts
Upload to Users ->users subfolder folder tree is displaying alphaorder can you pleas elet me know how we can do it
-
- 24,544 Posts
The forum will not show attached images. You need to upload it somewhere else and put a link to it.
I don't understand the question. Files shown in the MODX File Manager are already shown in alphabetical order by default.
-
- 24,544 Posts
There's really no way to do that without restricting the characters used in the username. MODX uses the order it gets from the server. Any non-alphabetic characters will come before the alphabet characters. In other words, the "_" character in _colette is throwing off the sort.
You could write code that would read the files and sort them with a custom sort, but it would be very tricky, and it wouldn't affect what is shown in the MODX File Manager.
You could possibly write a custom hook for FormIt or a plugin that would remove any non-alpha characters from the file names before the files were saved if that would work for you.
Or you could write some JavaScript that would pop up an error if a user enters invalid characters in a username.
-
- 15 Posts
Hello
Please let me know which file change code and how to install FormIt or a plugin
-
- 24,544 Posts
How are you creating the user files?
-
- 15 Posts
Hello
We are using Upload to Users CMP 1.1.1-pl to create the userfiles folder and we need alpha order folder please let us know how we can do it
-
- 24,544 Posts
Looking at the code of that extra, I don't see any easy way to do it.
It looks like the snippet doesn't invoke any MODX events so there's no way to modify the username there.
You might ask the author by filing an issue here:
https://github.com/goldsky/UploadToUsers/issues. You may need to create a GitHub account to file the issue. Be sure to explain the problem with underscores.
You could add some JavaScript to the registration page that would pop up an error message if the user used any non-alphabetic character in their username, but that wouldn't help you with users who already have one.