Support » Plugins » wp_grins

Viewing 10 replies - 1 through 10 (of 10 total)
  • Mark (podz)


    Support Maven

    What is it you are stuck on ?
    And with which version of WP ?

    I’ve a question – Is there anyway to sort the grins? I’m not sure what order they are appearing in, but it is always the same order but not the one listed in vars.php or in the smilie directory itself.

    I have a lot of smilies and would like to group them in things like

    standard smilies

    (or, possibly just alphabetize them)

    btw – using wp1.5


    🙂 <- What? No smilies here? 😛

    I know this is an old topic, but has anyone come up with a way to sort smilies (grins) yet? I’ve been searching, but I have no idea how to change the output or array or whatever we need to do.

    I also would like to know if there’s a way to sort grins… I’ve grins from different styles, and I’d like to separate them in groups…

    They are sorted in ascending alphanumeric order (php default) by abbreviation.

    Mine are not… For example, I have an icon named :Jsomething: listed before an icon named :Asomething: …

    Mark (podz)


    Support Maven

    I think Alex means like this ?

    Th e smilies don’t get sorterd by the actual :code: neither by the name of the file itself (“icon.gif”). As you may see at my comments page (, they really don’t get sorted in any particular order….

    Actually, they *do* get sorted. Just not in a way that makes a lot of sense[1]. If you look in vars.php, below the smilies array, you will see this block of code:

    // sorts the smilies' array
    if (!function_exists('smiliescmp')) {
    function smiliescmp ($a, $b) {
    if (strlen($a) == strlen($b)) {
    return strcmp($a, $b);
    return (strlen($a) > strlen($b)) ? -1 : 1;
    uksort($wpsmiliestrans, 'smiliescmp');

    Looks to me like it’s sorting first by the *length* of the string, then alphabetically for strings of the same length. Looking at my smilies confirms that this is what is happening.

    I’m going to try commenting out the sort, and seeing what happens….

    EDIT: Yup. Commenting out that block causes the smilies to be displayed in the order they are listed in vars.php. So for anyone who wants them in a particular order, editing the list should do the job. (This was with 1.5.1)

    [1] To me, anyway

    Thanks lbessant! 🙂

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘wp_grins’ is closed to new replies.