• Resolved sagund07

    (@sagund07)


    Hello again,

    if I sort a playerlist by the name of a player than the sorting goes from “A to Z” followed by “a to z”.
    If I make my tables sortable and click on the Name column head than the tables sort correctly from A/a to Z/z.

    Is it possible to sort the table by name from A/a to Z/z by default?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Roch

    (@rochesterj)

    Hi!

    Thanks for getting in touch!

    You’d need to edit the table sorting component for that. I think the easiest way is to have all names in just one format (all lowercase is ideal as we can change the uppercase styling via CSS)

    Kind Regards,
    -Roch

    Thread Starter sagund07

    (@sagund07)

    Hi,

    thanks for your reply. Yes, I could make it this way. The only problem is, that some players names start lowercase or have multiple upper case letters at the beginning of their usernames.

    I’ll take a look at the table sorting component if there is another solution.

    Roch

    (@rochesterj)

    Hi!

    That could be an issue indeed. Another idea is switch all letters to uppercase via CSS so this would be less noticeable. But indeed it is limited in some terms

    Kind Regards,
    -Roch

    Thread Starter sagund07

    (@sagund07)

    Hey,

    thanks for your help.

    I fixed it by just changing one word in the class-sp-player-list.php file ??

    Line 587
    $output = strcasecmp( sp_array_value( $a, 'name', null ), sp_array_value( $b, 'name', null ) );

    I changed strcmp to strcasecmp and now it works fine.

    • This reply was modified 8 years, 4 months ago by sagund07.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Playerlist sort by name: case sensitive’ is closed to new replies.