members.php 1014 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /**
  3. * Group members sidebar
  4. *
  5. * @package ElggGroups
  6. *
  7. * @uses $vars["entity"] Group entity
  8. * @uses $vars["limit"] The number of members to display
  9. */
  10. $group = elgg_extract("entity", $vars);
  11. if (!empty($group) && elgg_instanceof($group, "group")) {
  12. if ($group->getPrivateSetting("group_tools:cleanup:members") != "yes") {
  13. $limit = elgg_extract("limit", $vars, 14);
  14. $all_link = elgg_view("output/url", array(
  15. "href" => "groups/members/" . $group->getGUID(),
  16. "text" => elgg_echo("groups:members:more"),
  17. "is_trusted" => true,
  18. ));
  19. $body = elgg_list_entities_from_relationship(array(
  20. "relationship" => "member",
  21. "relationship_guid" => $group->getGUID(),
  22. "inverse_relationship" => true,
  23. "types" => "user",
  24. "limit" => $limit,
  25. "list_type" => "gallery",
  26. "gallery_class" => "elgg-gallery-users",
  27. "pagination" => false
  28. ));
  29. $body .= "<div class='center mts'>$all_link</div>";
  30. // echo elgg_view_module("aside", elgg_echo("groups:members"), $body);
  31. }
  32. }