start.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. /* au group activity tabs
  3. * adds tabs to show ingroup, out of group activities for members
  4. * and per-member activity, and general activity stats
  5. */
  6. require_once(dirname(__FILE__) . "/lib/functions.php");
  7. require_once(dirname(__FILE__) . "/lib/hooks.php");
  8. function aga_init() {
  9. //activity page - replaces the default for groups with one offering more control
  10. elgg_register_page_handler('group_activity_plus','aga_page_handler');
  11. //intercept pagesetup so that we can get the group ID
  12. elgg_register_event_handler('pagesetup','system','aga_menu_setup');
  13. //allow group admins to control visibility of stats page (default determined by admin setting)
  14. if (elgg_get_plugin_setting('aga_defaultstatsvisibility')=='yes'){$truefalse=true;}else{$truefalse=false;}
  15. add_group_tool_option("aga_stats",elgg_echo("aga:statsenable"),$truefalse);
  16. if (elgg_get_plugin_setting('aga_defaultmembervisibility')=='yes'){$truefalse=true;}else{$truefalse=false;}
  17. //allow group admins to control visibility of members page
  18. add_group_tool_option("aga_members",elgg_echo("aga:membersenable"),$truefalse);
  19. }
  20. elgg_register_event_handler('init', 'system', 'aga_init');