<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[BuddyPress][4524] trunk: Adds toggle for who can send group invitations, in order to make the option more consistent and configurable throughout BP.</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg > ul, #logmsg > ol { margin-left: 0; margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd>4524</dd>
<dt>Author</dt> <dd>boonebgorges</dd>
<dt>Date</dt> <dd>2011-06-16 20:08:45 +0000 (Thu, 16 Jun 2011)</dd>
</dl>
<h3>Log Message</h3>
<pre>Adds toggle for who can send group invitations, in order to make the option more consistent and configurable throughout BP. Fixes #2005. Props DJPaul for help cleaning up the patches.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkbpgroupsbpgroupsactionsphp">trunk/bp-groups/bp-groups-actions.php</a></li>
<li><a href="#trunkbpgroupsbpgroupsfunctionsphp">trunk/bp-groups/bp-groups-functions.php</a></li>
<li><a href="#trunkbpgroupsbpgroupsloaderphp">trunk/bp-groups/bp-groups-loader.php</a></li>
<li><a href="#trunkbpgroupsbpgroupsscreensphp">trunk/bp-groups/bp-groups-screens.php</a></li>
<li><a href="#trunkbpgroupsbpgroupstemplatephp">trunk/bp-groups/bp-groups-template.php</a></li>
<li><a href="#trunkbpthemesbpdefault_incajaxphp">trunk/bp-themes/bp-default/_inc/ajax.php</a></li>
<li><a href="#trunkbpthemesbpdefaultgroupscreatephp">trunk/bp-themes/bp-default/groups/create.php</a></li>
<li><a href="#trunkbpthemesbpdefaultgroupssingleadminphp">trunk/bp-themes/bp-default/groups/single/admin.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkbpgroupsbpgroupsactionsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-groups/bp-groups-actions.php (4523 => 4524)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-groups/bp-groups-actions.php        2011-06-16 13:08:54 UTC (rev 4523)
+++ trunk/bp-groups/bp-groups-actions.php        2011-06-16 20:08:45 UTC (rev 4524)
</span><span class="lines">@@ -101,6 +101,13 @@
</span><span class="cx">                                 bp_core_add_message( __( 'There was an error saving group details, please try again.', 'buddypress' ), 'error' );
</span><span class="cx">                                 bp_core_redirect( bp_get_root_domain() . '/' . $bp->groups->root_slug . '/create/step/' . $bp->groups->current_create_step . '/' );
</span><span class="cx">                         }
</span><ins>+                        
+                        // Set the invite status                        
+                        // Checked against a whitelist for security
+                        $allowed_invite_status = apply_filters( 'groups_allowed_invite_status', array( 'members', 'mods', 'admins' ) );
+                        $invite_status         = in_array( $_POST['group-invite-status'], (array)$allowed_invite_status ) ? $_POST['group-invite-status'] : 'members';
+                        
+                        groups_update_groupmeta( $bp->groups->new_group_id, 'invite_status', $invite_status );
</ins><span class="cx">                 }
</span><span class="cx">
</span><span class="cx">                 if ( 'group-invites' == $bp->groups->current_create_step )
</span></span></pre></div>
<a id="trunkbpgroupsbpgroupsfunctionsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-groups/bp-groups-functions.php (4523 => 4524)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-groups/bp-groups-functions.php        2011-06-16 13:08:54 UTC (rev 4523)
+++ trunk/bp-groups/bp-groups-functions.php        2011-06-16 20:08:45 UTC (rev 4524)
</span><span class="lines">@@ -118,7 +118,7 @@
</span><span class="cx">         return true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-function groups_edit_group_settings( $group_id, $enable_forum, $status ) {
</del><ins>+function groups_edit_group_settings( $group_id, $enable_forum, $status, $invite_status = false ) {
</ins><span class="cx">         global $bp;
</span><span class="cx">
</span><span class="cx">         $group = new BP_Groups_Group( $group_id );
</span><span class="lines">@@ -144,6 +144,10 @@
</span><span class="cx">                 }
</span><span class="cx">         }
</span><span class="cx">
</span><ins>+        // Set the invite status
+        if ( $invite_status )
+                groups_update_groupmeta( $group->id, 'invite_status', $invite_status );
+
</ins><span class="cx">         groups_update_groupmeta( $group->id, 'last_activity', bp_core_current_time() );
</span><span class="cx">         do_action( 'groups_settings_updated', $group->id );
</span><span class="cx">
</span></span></pre></div>
<a id="trunkbpgroupsbpgroupsloaderphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-groups/bp-groups-loader.php (4523 => 4524)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-groups/bp-groups-loader.php        2011-06-16 13:08:54 UTC (rev 4523)
+++ trunk/bp-groups/bp-groups-loader.php        2011-06-16 20:08:45 UTC (rev 4524)
</span><span class="lines">@@ -338,19 +338,17 @@
</span><span class="cx">                                 'item_css_id' => 'members'
</span><span class="cx">                         );
</span><span class="cx">
</span><del>-                        if ( is_user_logged_in() && groups_is_user_member( $bp->loggedin_user->id, $this->current_group->id ) ) {
-                                if ( bp_is_active( 'friends' ) ) {
-                                        $sub_nav[] = array(
-                                                'name' => __( 'Send Invites', 'buddypress' ),
-                                                'slug' => 'send-invites',
-                                                'parent_url' => $group_link,
-                                                'parent_slug' => $this->current_group->slug,
-                                                'screen_function' => 'groups_screen_group_invite',
-                                                'item_css_id' => 'invite',
-                                                'position' => 70,
-                                                'user_has_access' => $this->current_group->user_has_access
-                                        );
-                                }
</del><ins>+                        if ( bp_is_active( 'friends' ) && bp_groups_user_can_send_invites() ) {
+                                $sub_nav[] = array(
+                                        'name' => __( 'Send Invites', 'buddypress' ),
+                                        'slug' => 'send-invites',
+                                        'parent_url' => $group_link,
+                                        'parent_slug' => $this->current_group->slug,
+                                        'screen_function' => 'groups_screen_group_invite',
+                                        'item_css_id' => 'invite',
+                                        'position' => 70,
+                                        'user_has_access' => $this->current_group->user_has_access
+                                );
</ins><span class="cx">                         }
</span><span class="cx">
</span><span class="cx">                         parent::_setup_nav( $main_nav, $sub_nav );
</span></span></pre></div>
<a id="trunkbpgroupsbpgroupsscreensphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-groups/bp-groups-screens.php (4523 => 4524)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-groups/bp-groups-screens.php        2011-06-16 13:08:54 UTC (rev 4523)
+++ trunk/bp-groups/bp-groups-screens.php        2011-06-16 20:08:45 UTC (rev 4524)
</span><span class="lines">@@ -505,14 +505,20 @@
</span><span class="cx">                 // If the edit form has been submitted, save the edited details
</span><span class="cx">                 if ( isset( $_POST['save'] ) ) {
</span><span class="cx">                         $enable_forum = ( isset($_POST['group-show-forum'] ) ) ? 1 : 0;
</span><ins>+                        
+                        // Checked against a whitelist for security
</ins><span class="cx">                         $allowed_status = apply_filters( 'groups_allowed_status', array( 'public', 'private', 'hidden' ) );
</span><span class="cx">                         $status = ( in_array( $_POST['group-status'], (array)$allowed_status ) ) ? $_POST['group-status'] : 'public';
</span><ins>+                        
+                        // Checked against a whitelist for security
+                        $allowed_invite_status = apply_filters( 'groups_allowed_invite_status', array( 'members', 'mods', 'admins' ) );
+                        $invite_status         = in_array( $_POST['group-invite-status'], (array)$allowed_invite_status ) ? $_POST['group-invite-status'] : 'members';
</ins><span class="cx">
</span><span class="cx">                         // Check the nonce
</span><span class="cx">                         if ( !check_admin_referer( 'groups_edit_group_settings' ) )
</span><span class="cx">                                 return false;
</span><span class="cx">
</span><del>-                        if ( !groups_edit_group_settings( $_POST['group-id'], $enable_forum, $status ) ) {
</del><ins>+                        if ( !groups_edit_group_settings( $_POST['group-id'], $enable_forum, $status, $invite_status ) ) {
</ins><span class="cx">                                 bp_core_add_message( __( 'There was an error updating group settings, please try again.', 'buddypress' ), 'error' );
</span><span class="cx">                         } else {
</span><span class="cx">                                 bp_core_add_message( __( 'Group settings were successfully updated.', 'buddypress' ) );
</span></span></pre></div>
<a id="trunkbpgroupsbpgroupstemplatephp"></a>
<div class="modfile"><h4>Modified: trunk/bp-groups/bp-groups-template.php (4523 => 4524)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-groups/bp-groups-template.php        2011-06-16 13:08:54 UTC (rev 4523)
+++ trunk/bp-groups/bp-groups-template.php        2011-06-16 20:08:45 UTC (rev 4524)
</span><span class="lines">@@ -859,6 +859,123 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><ins>+ * Get the 'checked' value, if needed, for a given invite_status on the group create/admin screens
+ *
+ * @package BuddyPress
+ * @subpackage Groups Template
+ * @since 1.3
+ *
+ * @param str $setting The setting you want to check against ('members', 'mods', or 'admins')
+ * @param obj $group (optional) The group whose status you want to check
+ */
+function bp_group_show_invite_status_setting( $setting, $group = false ) {
+        $group_id = isset( $group->id ) ? $group->id : false;
+        
+        $invite_status = bp_group_get_invite_status( $group_id );
+        
+        if ( $setting == $invite_status )
+                echo ' checked="checked"';
+}
+
+/**
+ * Get the invite status of a group
+ *
+ * 'invite_status' became part of BuddyPress in BP 1.3. In order to provide backward compatibility,
+ * groups without a status set will default to 'members', ie all members in a group can send
+ * invitations. Filter 'bp_group_invite_status_fallback' to change this fallback behavior.
+ *
+ * This function can be used either in or out of the loop.
+ *
+ * @package BuddyPress
+ * @subpackage Groups Template
+ * @since 1.3
+ *
+ * @param int $group_id (optional) The id of the group whose status you want to check
+ * @return mixed Returns false when no group can be found. Otherwise returns the group invite
+ * status, from among 'members', 'mods', and 'admins'
+ */
+function bp_group_get_invite_status( $group_id = false ) {
+        global $bp, $groups_template;
+                
+        if ( !$group_id ) {
+                if ( isset( $bp->groups->current_group->id ) ) {
+                        // Default to the current group first
+                        $group_id = $bp->groups->current_group->id;
+                } else if ( isset( $groups_template->group->id ) ) {
+                        // Then see if we're in the loop
+                        $group_id = $groups_template->group->id;
+                } else {
+                        return false;
+                }
+        }
+        
+        $invite_status = groups_get_groupmeta( $group_id, 'invite_status' );
+
+        // Backward compatibility. When 'invite_status' is not set, fall back to a default value
+        if ( !$invite_status ) {
+                $invite_status = apply_filters( 'bp_group_invite_status_fallback', 'members' );
+        }
+
+        return apply_filters( 'bp_group_get_invite_status', $invite_status, $group_id );
+}
+
+/**
+ * Can the logged-in user send invitations in the specified group?
+ *
+ * @package BuddyPress
+ * @subpackage Groups Template
+ * @since 1.3
+ *
+ * @param int $group_id (optional) The id of the group whose status you want to check
+ * @return bool $can_send_invites
+ */
+function bp_groups_user_can_send_invites( $group_id = false ) {
+        global $bp;
+
+        $can_send_invites = false;
+        $invite_status = false;
+        
+        if ( is_user_logged_in() ) {
+                if ( is_super_admin() ) {
+                        // Super admins can always send invitations
+                        $can_send_invites = true;
+
+                } else {
+                        // If no $group_id is provided, default to the current group id
+                        if ( !$group_id )
+                                $group_id = isset( $bp->groups->current_group->id ) ? $bp->groups->current_group->id : 0;
+
+                        // If no group has been found, bail
+                        if ( !$group_id )
+                                return false;
+
+                        $invite_status = bp_group_get_invite_status( $group_id );
+                        if ( !$invite_status )
+                                return false;
+
+                        switch ( $invite_status ) {
+                                case 'admins' :
+                                        if ( groups_is_user_admin( bp_loggedin_user_id(), $group_id ) )
+                                                $can_send_invites = true;
+                                        break;
+
+                                case 'mods' :
+                                        if ( groups_is_user_mod( bp_loggedin_user_id(), $group_id ) || groups_is_user_admin( bp_loggedin_user_id(), $group_id ) )
+                                                $can_send_invites = true;
+                                        break;
+
+                                case 'members' :
+                                        if ( groups_is_user_member( bp_loggedin_user_id(), $group_id ) )
+                                                $can_send_invites = true;
+                                        break;
+                        }
+                }
+        }
+
+        return apply_filters( 'bp_groups_user_can_send_invites', $can_send_invites, $group_id, $invite_status );
+}
+
+/**
</ins><span class="cx"> * Since BuddyPress 1.0, this generated the group settings admin/member screen.
</span><span class="cx"> * As of BuddyPress 1.3 (r4489), and because this function outputs HTML, it was moved into /bp-default/groups/single/admin.php.
</span><span class="cx"> *
</span></span></pre></div>
<a id="trunkbpthemesbpdefault_incajaxphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/_inc/ajax.php (4523 => 4524)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/_inc/ajax.php        2011-06-16 13:08:54 UTC (rev 4523)
+++ trunk/bp-themes/bp-default/_inc/ajax.php        2011-06-16 20:08:45 UTC (rev 4524)
</span><span class="lines">@@ -353,7 +353,7 @@
</span><span class="cx">         if ( !$_POST['friend_id'] || !$_POST['friend_action'] || !$_POST['group_id'] )
</span><span class="cx">                 return false;
</span><span class="cx">
</span><del>-        if ( !groups_is_user_admin( $bp->loggedin_user->id, $_POST['group_id'] ) )
</del><ins>+        if ( !bp_groups_user_can_send_invites( $_POST['group_id'] ) )
</ins><span class="cx">                 return false;
</span><span class="cx">
</span><span class="cx">         if ( !friends_check_friendship( $bp->loggedin_user->id, $_POST['friend_id'] ) )
</span></span></pre></div>
<a id="trunkbpthemesbpdefaultgroupscreatephp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/groups/create.php (4523 => 4524)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/groups/create.php        2011-06-16 13:08:54 UTC (rev 4523)
+++ trunk/bp-themes/bp-default/groups/create.php        2011-06-16 20:08:45 UTC (rev 4524)
</span><span class="lines">@@ -106,6 +106,31 @@
</span><span class="cx">                                                 </label>
</span><span class="cx">                                         </div>
</span><span class="cx">
</span><ins>+                                        <hr />
+                                        
+                                        <h4><?php _e( 'Group Invitations', 'buddypress' ); ?></h4>
+
+                                        <p><?php _e( 'Which members of this group are allowed to invite others?', 'buddypress' ) ?></p>
+                                
+                                        <div class="radio">
+                                                <label>
+                                                        <input type="radio" name="group-invite-status" value="members"<?php bp_group_show_invite_status_setting( 'members' ) ?> />
+                                                        <strong><?php _e( 'All group members', 'buddypress' ) ?></strong>
+                                                </label>
+                                
+                                                <label>
+                                                        <input type="radio" name="group-invite-status" value="mods"<?php bp_group_show_invite_status_setting( 'mods' ) ?> />
+                                                        <strong><?php _e( 'Group admins and mods only', 'buddypress' ) ?></strong>
+                                                </label>
+                                                
+                                                <label>
+                                                        <input type="radio" name="group-invite-status" value="admins"<?php bp_group_show_invite_status_setting( 'admins' ) ?> />
+                                                        <strong><?php _e( 'Group admins only', 'buddypress' ) ?></strong>
+                                                </label>
+                                        </div>
+                                
+                                        <hr />
+
</ins><span class="cx">                                         <?php do_action( 'bp_after_group_settings_creation_step' ); ?>
</span><span class="cx">
</span><span class="cx">                                         <?php wp_nonce_field( 'groups_create_save_group-settings' ); ?>
</span></span></pre></div>
<a id="trunkbpthemesbpdefaultgroupssingleadminphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/groups/single/admin.php (4523 => 4524)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/groups/single/admin.php        2011-06-16 13:08:54 UTC (rev 4523)
+++ trunk/bp-themes/bp-default/groups/single/admin.php        2011-06-16 20:08:45 UTC (rev 4524)
</span><span class="lines">@@ -57,7 +57,7 @@
</span><span class="cx">
</span><span class="cx">         <div class="radio">
</span><span class="cx">                 <label>
</span><del>-                        <input type="radio" name="group-status" value="public"<?php bp_group_show_status_setting('public') ?> />
</del><ins>+                        <input type="radio" name="group-status" value="public"<?php bp_group_show_status_setting( 'public' ) ?> />
</ins><span class="cx">                         <strong><?php _e( 'This is a public group', 'buddypress' ) ?></strong>
</span><span class="cx">                         <ul>
</span><span class="cx">                                 <li><?php _e( 'Any site member can join this group.', 'buddypress' ) ?></li>
</span><span class="lines">@@ -67,7 +67,7 @@
</span><span class="cx">                 </label>
</span><span class="cx">
</span><span class="cx">                 <label>
</span><del>-                        <input type="radio" name="group-status" value="private"<?php bp_group_show_status_setting('private') ?> />
</del><ins>+                        <input type="radio" name="group-status" value="private"<?php bp_group_show_status_setting( 'private' ) ?> />
</ins><span class="cx">                         <strong><?php _e( 'This is a private group', 'buddypress' ) ?></strong>
</span><span class="cx">                         <ul>
</span><span class="cx">                                 <li><?php _e( 'Only users who request membership and are accepted can join the group.', 'buddypress' ) ?></li>
</span><span class="lines">@@ -77,7 +77,7 @@
</span><span class="cx">                 </label>
</span><span class="cx">
</span><span class="cx">                 <label>
</span><del>-                        <input type="radio" name="group-status" value="hidden"<?php bp_group_show_status_setting('hidden') ?> />
</del><ins>+                        <input type="radio" name="group-status" value="hidden"<?php bp_group_show_status_setting( 'hidden' ) ?> />
</ins><span class="cx">                         <strong><?php _e( 'This is a hidden group', 'buddypress' ) ?></strong>
</span><span class="cx">                         <ul>
</span><span class="cx">                                 <li><?php _e( 'Only users who are invited can join the group.', 'buddypress' ) ?></li>
</span><span class="lines">@@ -87,6 +87,31 @@
</span><span class="cx">                 </label>
</span><span class="cx">         </div>
</span><span class="cx">
</span><ins>+        <hr />
+        
+        <h4><?php _e( 'Group Invitations', 'buddypress' ); ?></h4>
+
+        <p><?php _e( 'Which members of this group are allowed to invite others?', 'buddypress' ) ?></p>
+
+        <div class="radio">
+                <label>
+                        <input type="radio" name="group-invite-status" value="members"<?php bp_group_show_invite_status_setting( 'members' ) ?> />
+                        <strong><?php _e( 'All group members', 'buddypress' ) ?></strong>
+                </label>
+
+                <label>
+                        <input type="radio" name="group-invite-status" value="mods"<?php bp_group_show_invite_status_setting( 'mods' ) ?> />
+                        <strong><?php _e( 'Group admins and mods only', 'buddypress' ) ?></strong>
+                </label>
+                
+                <label>
+                        <input type="radio" name="group-invite-status" value="admins"<?php bp_group_show_invite_status_setting( 'admins' ) ?> />
+                        <strong><?php _e( 'Group admins only', 'buddypress' ) ?></strong>
+                </label>
+         </div>
+
+        <hr />
+
</ins><span class="cx">         <?php do_action( 'bp_after_group_settings_admin' ); ?>
</span><span class="cx">
</span><span class="cx">         <p><input type="submit" value="<?php _e( 'Save Changes', 'buddypress' ) ?> &rarr;" id="save" name="save" /></p>
</span></span></pre>
</div>
</div>
</body>
</html>