Skip to:
Content

BuddyPress.org

Changeset 2352


Ignore:
Timestamp:
01/19/2010 11:27:58 AM (15 years ago)
Author:
apeatling
Message:

Removing "Group News" setting since the new activity stream updates replaces this with a much more intuitive interface. Fixes #1525

Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-groups.php

    r2345 r2352  
    697697                    return false;
    698698
    699                 if ( !groups_edit_base_group_details( $_POST['group-id'], $_POST['group-name'], $_POST['group-desc'], $_POST['group-news'], (int)$_POST['group-notify-members'] ) ) {
     699                if ( !groups_edit_base_group_details( $_POST['group-id'], $_POST['group-name'], $_POST['group-desc'], (int)$_POST['group-notify-members'] ) ) {
    700700                    bp_core_add_message( __( 'There was an error updating group details, please try again.', 'buddypress' ), 'error' );
    701701                } else {
     
    726726        // If the edit form has been submitted, save the edited details
    727727        if ( isset( $_POST['save'] ) ) {
    728             $enable_wire = ( isset($_POST['group-show-wire'] ) ) ? 1 : 0;
    729728            $enable_forum = ( isset($_POST['group-show-forum'] ) ) ? 1 : 0;
    730729            $enable_photos = ( isset($_POST['group-show-photos'] ) ) ? 1 : 0;
     
    738737                return false;
    739738
    740             if ( !groups_edit_group_settings( $_POST['group-id'], $enable_wire, $enable_forum, $enable_photos, $photos_admin_only, $status ) ) {
     739            if ( !groups_edit_group_settings( $_POST['group-id'], $enable_forum, $enable_photos, $photos_admin_only, $status ) ) {
    741740                bp_core_add_message( __( 'There was an error updating group settings, please try again.', 'buddypress' ), 'error' );
    742741            } else {
     
    10971096            }
    10981097
    1099             if ( !$bp->groups->new_group_id = groups_create_group( array( 'group_id' => $bp->groups->new_group_id, 'name' => $_POST['group-name'], 'description' => $_POST['group-desc'], 'news' => $_POST['group-news'], 'slug' => groups_check_slug( sanitize_title($_POST['group-name']) ), 'date_created' => time() ) ) ) {
     1098            if ( !$bp->groups->new_group_id = groups_create_group( array( 'group_id' => $bp->groups->new_group_id, 'name' => $_POST['group-name'], 'description' => $_POST['group-desc'], 'slug' => groups_check_slug( sanitize_title($_POST['group-name']) ), 'date_created' => time() ) ) ) {
    11001099                bp_core_add_message( __( 'There was an error saving group details, please try again.', 'buddypress' ), 'error' );
    11011100                bp_core_redirect( $bp->root_domain . '/' . $bp->groups->slug . '/create/step/' . $bp->groups->current_create_step . '/' );
     
    11081107        if ( 'group-settings' == $bp->groups->current_create_step ) {
    11091108            $group_status = 'public';
    1110             $group_enable_wire = 1;
    11111109            $group_enable_forum = 1;
    1112 
    1113             if ( !isset($_POST['group-show-wire']) )
    1114                 $group_enable_wire = 0;
    11151110
    11161111            if ( !isset($_POST['group-show-forum']) ) {
     
    11281123                $group_status = 'hidden';
    11291124
    1130             if ( !$bp->groups->new_group_id = groups_create_group( array( 'group_id' => $bp->groups->new_group_id, 'status' => $group_status, 'enable_wire' => $group_enable_wire, 'enable_forum' => $group_enable_forum ) ) ) {
     1125            if ( !$bp->groups->new_group_id = groups_create_group( array( 'group_id' => $bp->groups->new_group_id, 'status' => $group_status, 'enable_forum' => $group_enable_forum ) ) ) {
    11311126                bp_core_add_message( __( 'There was an error saving group details, please try again.', 'buddypress' ), 'error' );
    11321127                bp_core_redirect( $bp->root_domain . '/' . $bp->groups->slug . '/create/step/' . $bp->groups->current_create_step . '/' );
     
    14781473     *  'name'
    14791474     *  'description'
    1480      *  'news'
    14811475     *  'slug'
    14821476     *  'status'
    1483      *  'enable_wire'
    14841477     *  'enable_forum'
    14851478     *  'date_created'
     
    15021495        $group->description = $description;
    15031496
    1504     if ( isset( $news ) )
    1505         $group->news = $news;
    1506 
    15071497    if ( isset( $slug ) && groups_check_slug( $slug ) )
    15081498        $group->slug = $slug;
     
    15121502            $group->status = $status;
    15131503    }
    1514 
    1515     if ( isset( $enable_wire ) )
    1516         $group->enable_wire = $enable_wire;
    1517     else if ( !$group_id && !isset( $enable_wire ) )
    1518         $group->enable_wire = 1;
    15191504
    15201505    if ( isset( $enable_forum ) )
     
    15461531}
    15471532
    1548 function groups_edit_base_group_details( $group_id, $group_name, $group_desc, $group_news, $notify_members ) {
     1533function groups_edit_base_group_details( $group_id, $group_name, $group_desc, $notify_members ) {
    15491534    global $bp;
    15501535
     
    15551540    $group->name = $group_name;
    15561541    $group->description = $group_desc;
    1557     $group->news = $group_news;
    15581542
    15591543    if ( !$group->save() )
     
    15701554}
    15711555
    1572 function groups_edit_group_settings( $group_id, $enable_wire, $enable_forum, $enable_photos, $photos_admin_only, $status ) {
     1556function groups_edit_group_settings( $group_id, $enable_forum, $enable_photos, $photos_admin_only, $status ) {
    15731557    global $bp;
    15741558
    15751559    $group = new BP_Groups_Group( $group_id, false, false );
    1576     $group->enable_wire = $enable_wire;
    15771560    $group->enable_forum = $enable_forum;
    15781561    $group->enable_photos = $enable_photos;
  • trunk/bp-groups/bp-groups-classes.php

    r2351 r2352  
    77    var $slug;
    88    var $description;
    9     var $news;
    109    var $status;
    11     var $enable_wire;
    1210    var $enable_forum;
    1311    var $date_created;
     
    1816    var $total_member_count;
    1917    var $random_members;
    20     var $latest_wire_posts;
    2118
    2219    function bp_groups_group( $id = null, $single = false, $get_user_dataset = true ) {
     
    4340            $this->slug = $group->slug;
    4441            $this->description = stripslashes($group->description);
    45             $this->news = stripslashes($group->news);
    4642            $this->status = $group->status;
    47             $this->enable_wire = $group->enable_wire;
    4843            $this->enable_forum = $group->enable_forum;
    4944            $this->date_created = strtotime($group->date_created);
     
    7570        $this->slug = apply_filters( 'groups_group_slug_before_save', $this->slug, $this->id );
    7671        $this->description = apply_filters( 'groups_group_description_before_save', $this->description, $this->id );
    77         $this->news = apply_filters( 'groups_group_news_before_save', $this->news, $this->id );
    78         $this->status = apply_filters( 'groups_group_status_before_save', $this->status, $this->id );
    79         $this->enable_wire = apply_filters( 'groups_group_enable_wire_before_save', $this->enable_wire, $this->id );
     72        $this->status = apply_filters( 'groups_group_status_before_save', $this->status, $this->id );
    8073        $this->enable_forum = apply_filters( 'groups_group_enable_forum_before_save', $this->enable_forum, $this->id );
    8174        $this->date_created = apply_filters( 'groups_group_date_created_before_save', $this->date_created, $this->id );
     
    9083                    slug = %s,
    9184                    description = %s,
    92                     news = %s,
    9385                    status = %s,
    94                     enable_wire = %d,
    9586                    enable_forum = %d,
    9687                    date_created = FROM_UNIXTIME(%d)
     
    10293                    $this->slug,
    10394                    $this->description,
    104                     $this->news,
    10595                    $this->status,
    106                     $this->enable_wire,
    10796                    $this->enable_forum,
    10897                    $this->date_created,
     
    116105                    slug,
    117106                    description,
    118                     news,
    119107                    status,
    120                     enable_wire,
    121108                    enable_forum,
    122109                    date_created
    123110                ) VALUES (
    124                     %d, %s, %s, %s, %s, %s, %d, %d, FROM_UNIXTIME(%d)
     111                    %d, %s, %s, %s, %s, %d, FROM_UNIXTIME(%d)
    125112                )",
    126113                    $this->creator_id,
     
    128115                    $this->slug,
    129116                    $this->description,
    130                     $this->news,
    131117                    $this->status,
    132                     $this->enable_wire,
    133118                    $this->enable_forum,
    134119                    $this->date_created
  • trunk/bp-groups/bp-groups-filters.php

    r2268 r2352  
    66add_filter( 'bp_get_the_site_group_description', 'wptexturize' );
    77add_filter( 'bp_get_the_site_group_description_excerpt', 'wptexturize' );
    8 add_filter( 'bp_get_group_news', 'wptexturize' );
    98add_filter( 'bp_get_group_name', 'wptexturize' );
    109add_filter( 'bp_get_the_site_group_name', 'wptexturize' );
     
    1211add_filter( 'bp_get_group_description', 'convert_smilies' );
    1312add_filter( 'bp_get_group_description_excerpt', 'convert_smilies' );
    14 add_filter( 'bp_get_group_news', 'convert_smilies' );
    1513add_filter( 'bp_get_the_site_group_description', 'convert_smilies' );
    1614add_filter( 'bp_get_the_site_group_description_excerpt', 'convert_smilies' );
     
    1816add_filter( 'bp_get_group_description', 'convert_chars' );
    1917add_filter( 'bp_get_group_description_excerpt', 'convert_chars' );
    20 add_filter( 'bp_get_group_news', 'convert_chars' );
    2118add_filter( 'bp_get_group_name', 'convert_chars' );
    2219add_filter( 'bp_get_the_site_group_name', 'convert_chars' );
     
    2623add_filter( 'bp_get_group_description', 'wpautop' );
    2724add_filter( 'bp_get_group_description_excerpt', 'wpautop' );
    28 add_filter( 'bp_get_group_news', 'wpautop' );
    2925add_filter( 'bp_get_the_site_group_description', 'wpautop' );
    3026add_filter( 'bp_get_the_site_group_description_excerpt', 'wpautop' );
     
    3228add_filter( 'bp_get_group_description', 'make_clickable' );
    3329add_filter( 'bp_get_group_description_excerpt', 'make_clickable' );
    34 add_filter( 'bp_get_group_news', 'make_clickable' );
    3530
    3631add_filter( 'bp_get_group_name', 'wp_filter_kses', 1 );
     
    3833add_filter( 'bp_get_group_description', 'wp_filter_kses', 1 );
    3934add_filter( 'bp_get_group_description_excerpt', 'wp_filter_kses', 1 );
    40 add_filter( 'bp_get_group_news', 'wp_filter_kses', 1 );
    4135add_filter( 'bp_get_the_site_group_name', 'wp_filter_kses', 1 );
    4236add_filter( 'bp_get_the_site_group_description', 'wp_filter_kses', 1 );
     
    4438add_filter( 'groups_group_name_before_save', 'wp_filter_kses', 1 );
    4539add_filter( 'groups_group_description_before_save', 'wp_filter_kses', 1 );
    46 add_filter( 'groups_group_news_before_save', 'wp_filter_kses', 1 );
    4740
    4841add_filter( 'bp_get_group_description', 'stripslashes' );
    4942add_filter( 'bp_get_group_description_excerpt', 'stripslashes' );
    50 add_filter( 'bp_get_group_news', 'stripslashes' );
    5143add_filter( 'bp_get_group_name', 'stripslashes' );
    5244
     
    5547add_filter( 'groups_group_name_before_save', 'force_balance_tags' );
    5648add_filter( 'groups_group_description_before_save', 'force_balance_tags' );
    57 add_filter( 'groups_group_news_before_save', 'force_balance_tags' );
    5849
    5950add_filter( 'bp_get_total_group_count', 'number_format' );
  • trunk/bp-groups/bp-groups-templatetags.php

    r2350 r2352  
    244244}
    245245
    246 function bp_group_has_news( $group = false ) {
    247     global $groups_template;
    248 
    249     if ( !$group )
    250         $group =& $groups_template->group;
    251 
    252     if ( empty( $group->news ) )
    253         return false;
    254 
    255     return true;
    256 }
    257246
    258247function bp_group_id( $deprecated = true, $deprecated2 = false ) {
     
    468457    }
    469458
    470 function bp_group_news( $deprecated = false ) {
    471     echo bp_get_group_news();
    472 }
    473     function bp_get_group_news( $group = false ) {
    474         global $groups_template;
    475 
    476         if ( !$group )
    477             $group =& $groups_template->group;
    478 
    479         return apply_filters( 'bp_get_group_news', stripslashes($groups_template->group->news) );
    480     }
    481 
    482 function bp_group_news_editable( $deprecated = false ) {
    483     echo bp_get_group_news_editable();
    484 }
    485     function bp_get_group_news_editable( $group = false ) {
    486         global $groups_template;
    487 
    488         if ( !$group )
    489             $group =& $groups_template->group;
    490 
    491         return apply_filters( 'bp_get_group_news_editable', $group->news );
    492     }
    493459
    494460function bp_group_public_status( $deprecated = false ) {
     
    15851551    }
    15861552
    1587 function bp_new_group_news() {
    1588     echo bp_get_new_group_news();
    1589 }
    1590     function bp_get_new_group_news() {
    1591         global $bp;
    1592         return apply_filters( 'bp_get_new_group_news', $bp->groups->current_group->news );
    1593     }
    1594 
    15951553function bp_new_group_enable_forum() {
    15961554    echo bp_get_new_group_enable_forum();
  • trunk/bp-themes/bp-default/groups/create.php

    r2338 r2352  
    2929                    <label for="group-desc"><?php _e('* Group Description', 'buddypress') ?> <? _e( '(required)', 'buddypress' )?></label>
    3030                    <textarea name="group-desc" id="group-desc"><?php bp_new_group_description() ?></textarea>
    31 
    32                     <label for="group-news"><?php _e('Recent News', 'buddypress') ?></label>
    33                     <textarea name="group-news" id="group-news"><?php bp_new_group_news() ?></textarea>
    3431
    3532                    <?php do_action( 'bp_after_group_details_creation_step' ); /* Deprecated -> */ do_action( 'groups_custom_group_fields_editable' ); ?>
  • trunk/bp-themes/bp-default/style.css

    r2311 r2352  
    88Tags: buddypress, two-columns, custom-header, white, blue
    99
    10 ** IMPORTANT **
     10** IMPORTANT - DO NOT COPY THIS THEME **
    1111If you want to make a custom theme based on this theme, DO NOT copy and edit it. By
    1212doing this you will make upgrades and maintainence much harder for yourself.
  • trunk/bp-themes/bp-sn-parent/groups/create.php

    r2069 r2352  
    2525                <label for="group-desc"><?php _e('* Group Description', 'buddypress') ?> <? _e( '(required)', 'buddypress' )?></label>
    2626                <textarea name="group-desc" id="group-desc"><?php bp_new_group_description() ?></textarea>
    27 
    28                 <label for="group-news"><?php _e('Recent News', 'buddypress') ?></label>
    29                 <textarea name="group-news" id="group-news"><?php bp_new_group_news() ?></textarea>
    3027
    3128                <?php do_action( 'bp_after_group_details_creation_step' ); /* Deprecated -> */ do_action( 'groups_custom_group_fields_editable' ); ?>
  • trunk/bp-themes/bp-sn-parent/style.css

    r2311 r2352  
    77Author URI: http://buddypress.org
    88
    9 ** IMPORTANT **
     9** IMPORTANT - DO NOT COPY THIS THEME **
    1010If you want to make a custom theme based on this theme, DO NOT copy and edit it. By
    1111doing this you will make upgrades and maintainence much harder for yourself.
Note: See TracChangeset for help on using the changeset viewer.