Groups listed in newbar in alphabetical order.

rik mye Posted in Component Development 8 years ago

Could someone help me achieve this?
I presume it must be the components/OssnGroups/ossn_com.php file but i dont know enough about PHP to sort it.

thanks

                            foreach($groups_user as $group) {
                                            $icon = ossn_site_url("components/OssnGroups/images/group.png");

// ossn_register_sections_menu('newsfeed', array(
$myArray = array (
'text' => $group->title,
'name' => "groups",
'url' => ossn_group_url($group->guid),
'parent' => 'groups',
'icon' => $icon
);// ));

                                            unset($icon);

.......sort function.....
ossn_register_sections_menu('newsfeed', $myArray);
}

Replies