Groups Listing

Anyone know of a plugin that will list groups alphabetically?

  • @jededitor

    The easiest way to do this is... go to engine/lib/entities.php. check out the function list_entities. There you see $entities = get_entities(".....") ... below that just add  sort($entities);  and you should get what you were asking for.

    P.S : Not sure if this is the "Right" way of doing it..but it works!

  • @Ravish - If that's working for you it's coincidence.  get_entities() returns an array of ElggEntity objects, and sort() doesn't know what element to sort the objects on.

    It's (usually) always best to sort in MySQL instead of PHP.  1.7's API makes this easy by accepting an 'order_by' parameter to elgg_get_entities().  You will probably need to send an additional join clause to join the groups table with the entities table on guid.


  • Way past time to upgrade.  1.5 is unsupported and full of serious bugs, including major security issues.

  • @Brett - so you are saying the 1.5.1 upgrade didn't work?

  • I'm saying 1.5 is a dead branch.  I released 1.5.1 because there was no policy at the time on which versions were maintained with security releases.  1.5.1 was the official EOL for the 1.5 branch, which still contains numerous bugs and is no longer supported in any way.

  • @Brett well some of us rewrote bits of the code to remove the security bugs so it should hold us for while. Personally ( and I am sure this applies to lots of others still using 1.5) I am loath to upgrade any further till the mods & themes thing settles down into a 'standard' and we don't have to monkey with them everytime there is an upgrade. All of this doesn't alter my opinion that ELGG is the only decent community software available.

  • The upgrade from 1.5 to 1.6 had only one significant change for plugins: jQuery was updated to 1.3.2. The vast majority of plugins required absolutely no changes.

    The upgrade from 1.6 to 1.7 had only one significant change for plugins: the action token now required rather than being optional.

    Those two upgrades were quite easy and required almost no changes to plugins. As with any open source package, it always takes a few months for the plugins to get updated for the newest release. This in-between time causes a lot of angst because people want to run the newest version but many plugins have not been updated.

    One problem with waiting a long time to upgrade from a particular version is a lot of the knowledge about the upgrade process disappears (because of people forgetting the information or because of turnover in the community). The upgrade process becomes more difficult the longer you wait - less knowledge/help available and more changes (if you waited for 1.8, you'd have the changes from 1.5 to 1.6 to 1.7 to 1.8 all in one upgrade).

    I don't doubt that the upgrade will be difficult if you have customized the Elgg core, but I recommend upgrading to 1.6 and pulling out your customizations into plugins. Then the upgrade to 1.7 should be quite easy.