forum_enable == "no") { // unset if not enabled for this plugin elgg_unregister_widget_type("group_forum_topics"); } if (!empty($user)) { // check multiple admin if (elgg_get_plugin_setting("multiple_admin", "group_tools") == "yes") { // extend group members sidebar list elgg_extend_view("groups/sidebar/members", "group_tools/group_admins", 400); // remove group tool options for group admins if (($page_owner->getOwnerGUID() != $user->getGUID()) && !$user->isAdmin()) { remove_group_tool_option("group_multiple_admin_allow"); } } // invitation management if ($page_owner->canEdit()) { $request_options = array( "type" => "user", "relationship" => "membership_request", "relationship_guid" => $page_owner->getGUID(), "inverse_relationship" => true, "count" => true ); $requests = elgg_get_entities_from_relationship($request_options); $postfix = ""; if (!empty($requests)) { $postfix = " [" . $requests . "]"; } if (!$page_owner->isPublicMembership()) { elgg_register_menu_item("page", array( "name" => "membership_requests", "text" => elgg_echo("groups:membershiprequests") . $postfix, "href" => "groups/requests/" . $page_owner->getGUID(), )); } else { elgg_register_menu_item("page", array( "name" => "membership_requests", "text" => elgg_echo("group_tools:menu:invitations") . $postfix, "href" => "groups/requests/" . $page_owner->getGUID(), )); } } // group mail options if ($page_owner->canEdit() && (elgg_get_plugin_setting("mail", "group_tools") == "yes")) { elgg_register_menu_item("page", array( "name" => "mail", "text" => elgg_echo("group_tools:menu:mail"), "href" => "groups/mail/" . $page_owner->getGUID(), )); } } } if ($page_owner instanceof ElggGroup) { if (!$page_owner->isPublicMembership()) { if (elgg_get_plugin_setting("search_index", "group_tools") != "yes") { // closed groups should be indexed by search engines elgg_extend_view("page/elements/head", "metatags/noindex"); } } // cleanup sidebar elgg_extend_view("page/elements/sidebar", "group_tools/sidebar/cleanup"); } }