New Members on front page

how can I have a "New Members" listed on the home page ... such as in this site?

  • I would like to see this also. Maybe have it show up in the Spotlight?

  • Showing 25 newest members:

                   $users = get_entities('user', '', 0, '', 25, 0, false, 0, null);
                    if($users){
                        foreach($users as $user){
                              echo "<div class=\"member_icon\">" . elgg_view("profile/icon",array('entity' => $user, 'size' => 'small')) . "</div>";  
                        }
                    }

    Showing 25 Newest members that have uploaded icons:

                    $users = get_entities_from_metadata('icontime', '', 'user', '', 0, 25);
                    if($users){
                        foreach($users as $user){
                              echo "<div class=\"member_icon\">" . elgg_view("profile/icon",array('entity' => $user, 'size' => 'small')) . "</div>";  
                        }
                    }

    Showing 25 Newest Groups:

                    $groups = get_entities('group', '', 0, '', 25, 0, false, 0, null);
                    if($groups){
                        foreach($groups as $group){
                              echo "<div class=\"member_icon\">" . elgg_view("profile/icon",array('entity' => $group, 'size' => 'small')) . "</div>";  
                        }
                    }

    More helpful info available here: http://community.elgg.org/pg/plugins/traveljunkie/read/2653/custom-index

  • @ Hancock - Thanks for the above info :)

  • Managed to get new members working no problem, trying to get the latest groups to show but no luck so far when using the above code.

    Any ideas

    Thanks :)

  • How to show list of groups ordered by activity, not by create date?

  • What Zyon is suggesting there would be very useful I think.

  • Hancock .... in which file (which is within which directory) should the lines be coded?? thanks

  • for use with custom index mod...wrap the one of your choice in php tags and place within a  div ie:

     

    <div id="new25_members"><?php            $users = get_entities('user', '', 0, '', 25, 0, false, 0, null);
                    if($users){
                        foreach($users as $user){
                              echo "<div class=\"member_icon\">" . elgg_view("profile/icon",array('entity' => $user, 'size' => 'small')) . "</div>"; 
                        }
                    }?></div>

  • works with custom dashboard mod too :)

Beginning Developers

Beginning Developers

This space is for newcomers, who wish to build a new plugin or to customize an existing one to their liking