Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sort the URL list #210

Open
ParoTheParrot opened this issue Oct 22, 2014 · 7 comments
Open

Sort the URL list #210

ParoTheParrot opened this issue Oct 22, 2014 · 7 comments

Comments

@ParoTheParrot
Copy link

How is it possible to adjust the sorting? I would like to sort alphabetical instead of according to the modification date.
Hacks are welcome! Perhaps a feature request for a further release?

@nodiscc
Copy link

nodiscc commented Oct 22, 2014

At first glance, I think you have to change krsort($filtered) to uasort($filtered, 'strcasecmp') in index.php. Do a backup! Does this work?

@ParoTheParrot
Copy link
Author

@nodiscc , this works - thanks! BUT only with any searches. the pure listing is still sorted according to the date.
The best solution could be a button to toggle this setting. Perhaps in the gray line at the top ("Links per page").

@nodiscc
Copy link

nodiscc commented Oct 23, 2014

The best solution could be a button to toggle this setting

First we have to make sure it works, including with a blank serach (default view). Then we could add a configuration option in options.php (see https://github.com/shaarli/Shaarli/wiki#configuration) but I don't see how to make this optional without adding complexity to the code (the goal at https://github.com/shaarli/Shaarli this fork was to Keep It Simple).

It's probably better to just document this in the wiki (when it's fully working). @ParoTheParrot please keep us updated if you have something new!

@ParoTheParrot
Copy link
Author

Sorry @nodiscc , it does not work :-(
I took a too quick look at the list. The sorting is different from the default, but I don't really see the logic...
I think uasort isn't the right approach (http://php.net/manual/de/function.uasort.php)

@ParoTheParrot
Copy link
Author

Anyone else here with an idea for alphabetical sorting? TIA!

@ParoTheParrot
Copy link
Author

No one here with an idea?

@nodiscc
Copy link

nodiscc commented Dec 9, 2014

@ParoTheParrot Feel free to ask on https://github.com/shaarli/Shaarli/ (it's an active community fork), and link to this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants