Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Currently, smileys are sorted by weight only. This means that the order that they appear in a .pak file is not kept, as they will not get into the DB in that exact row order. By changing the code from "ORDER BY weight" to "ORDER BY weight, id" same-weight items will appear in the order that they were in the .pak file.
An example use is the use of smileys to allow users to post game "builds" - one smiley per option available, in this particular case "Mercenaries" for the game "Atlantica". When using "ORDER BY weight, id" they follow the (deliberate) order in the .pak file.
Comments
Comment #1
Gurpartap Singh CreditAttribution: Gurpartap Singh commentedI tried your change to the included Example package, but to no effect. :S
Comment #2
emdalton CreditAttribution: emdalton commentedI can't get smileys to sort by anything except their text. Is this functionality that changed somewhere along the way?