Skip to:
Content

BuddyPress.org

Changeset 2925


Ignore:
Timestamp:
04/15/2010 11:59:40 AM (15 years ago)
Author:
apeatling
Message:

Merging 1.2 branch with trunk.

Location:
trunk
Files:
22 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-activity/bp-activity-notifications.php

    r2719 r2925  
    1313
    1414    foreach( (array)$usernames as $username ) {
    15         if ( !$receiver_user_id = bp_core_get_userid($username) )
     15        if ( !$receiver_user_id = bp_core_get_userid( $username ) )
    1616            continue;
    1717
    1818        // Now email the user with the contents of the message (if they have enabled email notifications)
    19         if ( 'no' != get_usermeta( $user_id, 'notification_activity_new_mention' ) ) {
     19        if ( 'no' != get_usermeta( $receiver_user_id, 'notification_activity_new_mention' ) ) {
    2020            $poster_name = bp_core_get_user_displayname( $poster_user_id );
    2121
  • trunk/bp-blogs.php

    r2863 r2925  
    340340        bp_blogs_remove_post( $post_id, $blog_id );
    341341
     342    bp_blogs_update_blogmeta( $blog_id, 'last_activity', gmdate( "Y-m-d H:i:s" ) );
     343
    342344    do_action( 'bp_blogs_new_blog_post', $post_id, $post, $user_id );
    343345}
     
    348350
    349351    $comment = get_comment($comment_id);
     352
     353    if ( !$is_approved )
     354        return false;
     355
    350356    $comment->post = get_post( $comment->comment_post_ID );
    351357
     
    380386    }
    381387
     388    bp_blogs_update_blogmeta( $blog_id, 'last_activity', gmdate( "Y-m-d H:i:s" ) );
     389
    382390    return $recorded_comment;
    383391}
  • trunk/bp-core.php

    r2919 r2925  
    460460        }
    461461
    462         do_action( 'bp_core_action_set_spammer_status', $errors );
     462        do_action( 'bp_core_action_delete_user', $errors );
    463463
    464464        if ( $errors )
     
    494494        'search_terms' => false, // Limit to users that match these search terms
    495495
     496        'include' => false, // Pass comma separated list of user_ids to limit to only these users
    496497        'per_page' => 20, // The number of results to return per page
    497498        'page' => 1, // The page to return if limiting per page
     
    502503    extract( $params, EXTR_SKIP );
    503504
    504     return apply_filters( 'bp_core_get_users', BP_Core_User::get_users( $type, $per_page, $page, $user_id, $search_terms, $populate_extras ), &$params );
     505    return apply_filters( 'bp_core_get_users', BP_Core_User::get_users( $type, $per_page, $page, $user_id, $include, $search_terms, $populate_extras ), &$params );
    505506}
    506507
     
    914915    global $wpdb;
    915916
    916     if ( !empty( $username ) )
    917         return apply_filters( 'bp_core_get_userid', $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM " . CUSTOM_USER_TABLE . " WHERE user_login = %s", $username ) ) );
     917    if ( empty( $username ) )
     918        return false;
     919
     920    return apply_filters( 'bp_core_get_userid', $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM " . CUSTOM_USER_TABLE . " WHERE user_login = %s", $username ) ) );
    918921}
    919922
     
    937940    return apply_filters( 'bp_core_get_userid_from_nicename', $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM " . CUSTOM_USER_TABLE . " WHERE user_nicename = %s", $user_nicename ) ) );
    938941}
    939 
    940942
    941943/**
     
    14301432        return $number;
    14311433
    1432     return apply_filters( 'bp_core_bp_core_number_format', number_format( $number, $decimals ), $number, $decimals );
     1434    return apply_filters( 'bp_core_number_format', number_format( $number, $decimals ), $number, $decimals );
    14331435}
    14341436
     
    14771479            unset( $site_path[2] );
    14781480
    1479             $site_path = '/' . implode( '/', $site_path ) . '/';
     1481            if ( !count( $site_path ) )
     1482                $site_path = '/';
     1483            else
     1484                $site_path = '/' . implode( '/', $site_path ) . '/';
    14801485        }
    14811486    }
     
    14831488    return apply_filters( 'bp_core_get_site_path', $site_path );
    14841489}
    1485 
    14861490/**
    14871491 * bp_core_get_site_options()
     
    16061610 * @package BuddyPress Core
    16071611 * @global $bp The global BuddyPress settings variable created in bp_core_setup_globals()
    1608  * @uses check_admin_referer() Checks for a valid security nonce.
    16091612 * @uses is_site_admin() Checks to see if the user is a site administrator.
    1610  * @uses wpmu_delete_user() Deletes a user from the system.
     1613 * @uses wpmu_delete_user() Deletes a user from the system on multisite installs.
     1614 * @uses wp_delete_user() Deletes a user from the system on singlesite installs.
     1615 * @uses get_site_option Checks if account deletion is allowed
    16111616 */
    16121617function bp_core_delete_account( $user_id = false ) {
     
    16201625        return false;
    16211626
    1622     /* Site admins should not be allowed to be deleted */
    1623     if ( bp_core_is_multisite() && is_site_admin( bp_core_get_username( $user_id ) ) )
    1624         return false;
    1625 
    1626     if ( bp_core_is_multisite() && function_exists('wpmu_delete_user') ) {
     1627    /* Specifically handle multi-site environment */
     1628    if ( bp_core_is_multisite() ) {
     1629        /* Site admins cannot be deleted */
     1630        if ( is_site_admin( bp_core_get_username( $user_id ) ) )
     1631            return false;
     1632
    16271633        require_once( ABSPATH . '/wp-admin/includes/mu.php' );
    16281634        require_once( ABSPATH . '/wp-admin/includes/user.php' );
     
    16311637    }
    16321638
     1639    /* Single site user deletion */
    16331640    require_once( ABSPATH . '/wp-admin/includes/user.php' );
    16341641    return wp_delete_user( $user_id );
     
    17411748    ?>
    17421749
    1743 <!-- Generated in <?php timer_stop(1); ?> seconds. (<?php echo get_num_queries(); ?> q) -->
     1750<!-- Generated in <?php timer_stop(1); ?> seconds. -->
    17441751
    17451752    <?php
     
    18121819    $user = get_userdatabylogin( $username );
    18131820
    1814     if ( (int)$user->spam )
     1821    if ( ( bp_core_is_multisite() && (int)$user->spam ) || 1 == (int)$user->user_status )
    18151822        bp_core_redirect( $bp->root_domain );
    18161823    else
  • trunk/bp-core/bp-core-avatars.php

    r2729 r2925  
    155155        }
    156156
     157        if ( is_ssl() )
     158            $host = 'https://secure.gravatar.com/avatar/';
     159        else
     160            $host = 'http://www.gravatar.com/avatar/';
     161
    157162        $email = apply_filters( 'bp_core_gravatar_email', $email, $item_id, $object );
    158         $gravatar = apply_filters( 'bp_gravatar_url', 'http://www.gravatar.com/avatar/' ) . md5( $email ) . '?d=' . $default_grav . '&amp;s=' . $grav_size;
     163        $gravatar = apply_filters( 'bp_gravatar_url', $host ) . md5( $email ) . '?d=' . $default_grav . '&amp;s=' . $grav_size;
    159164
    160165        return apply_filters( 'bp_core_fetch_avatar', "<img src='{$gravatar}' alt='{$alt}' class='{$class}'{$css_id}{$html_width}{$html_height} />", $params );
     
    389394        if ( !$path = get_option( 'upload_path' ) )
    390395            $path = WP_CONTENT_DIR . '/uploads';
     396        else
     397            $path = ABSPATH . $path;
    391398    }
    392399
  • trunk/bp-core/bp-core-classes.php

    r2920 r2925  
    107107    /* Static Functions */
    108108
    109     function get_users( $type, $limit = null, $page = 1, $user_id = false, $search_terms = false, $populate_extras = true ) {
     109    function get_users( $type, $limit = null, $page = 1, $user_id = false, $include = false, $search_terms = false, $populate_extras = true ) {
    110110        global $wpdb, $bp;
    111111
     
    137137
    138138        if ( 'online' == $type )
    139             $sql['where_online'] = "AND DATE_ADD( um.meta_value, INTERVAL 5 MINUTE ) >= NOW()";
     139            $sql['where_online'] = "AND DATE_ADD( um.meta_value, INTERVAL 5 MINUTE ) >= UTC_TIMESTAMP()";
    140140
    141141        if ( 'alphabetical' == $type )
    142142            $sql['where_alpha'] = "AND pd.field_id = 1";
    143143
    144         if ( $user_id && bp_is_active( 'friends' ) ) {
     144        if ( $include ) {
     145            if ( is_array( $include ) )
     146                $uids = $wpdb->escape( implode( ',', (array)$include ) );
     147            else
     148                $uids = $wpdb->escape( $include );
     149
     150            if ( !empty( $uids ) )
     151                $sql['where_users'] = "AND u.ID IN ({$uids})";
     152        }
     153
     154        else if ( $user_id && function_exists( 'friends_install' ) ) {
    145155            $friend_ids = friends_get_friend_user_ids( $user_id );
    146156            $friend_ids = $wpdb->escape( implode( ',', (array)$friend_ids ) );
     
    254264    }
    255265
    256     function get_specific_users( $user_ids, $limit = null, $page = 1, $populate_extras = true ) {
    257         global $wpdb, $bp;
    258 
    259         if ( $limit && $page )
    260             $pag_sql = $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) );
    261 
    262         $user_sql = " AND user_id IN ( " . $wpdb->escape( $user_ids ) . " ) ";
    263         $status_sql = bp_core_get_status_sql();
    264 
    265         $total_users_sql = apply_filters( 'bp_core_get_specific_users_count_sql', $wpdb->prepare( "SELECT COUNT(DISTINCT ID) FROM " . CUSTOM_USER_TABLE . " WHERE {$status_sql} AND ID IN ( " . $wpdb->escape( $user_ids ) . " ) " ), $wpdb->escape( $user_ids ) );
    266         $paged_users_sql = apply_filters( 'bp_core_get_specific_users_count_sql', $wpdb->prepare( "SELECT DISTINCT ID as id, user_registered, user_nicename, user_login, user_email FROM " . CUSTOM_USER_TABLE . " WHERE {$status_sql} AND ID IN ( " . $wpdb->escape( $user_ids ) . " ) {$pag_sql}" ), $wpdb->escape( $user_ids ) );
    267 
    268         $total_users = $wpdb->get_var( $total_users_sql );
    269         $paged_users = $wpdb->get_results( $paged_users_sql );
    270 
    271         /***
    272          * Lets fetch some other useful data in a separate queries, this will be faster than querying the data for every user in a list.
    273          * We can't add these to the main query above since only users who have this information will be returned (since the much of the data is in usermeta and won't support any type of directional join)
    274          */
    275 
    276         /* Add additional data to the returned results */
    277         if ( $populate_extras )
    278             $paged_users = BP_Core_User::get_user_extras( &$paged_users, &$user_ids );
    279 
    280 
    281         return array( 'users' => $paged_users, 'total' => $total_users );
    282     }
    283 
    284266    function search_users( $search_terms, $limit = null, $page = 1, $populate_extras = true ) {
    285267        global $wpdb, $bp;
     
    321303        /* Fetch the user's full name */
    322304        if ( bp_is_active( 'xprofile' ) && 'alphabetical' != $type ) {
     305            /* Ensure xprofile globals are set */
     306            if ( !defined( 'BP_XPROFILE_FULLNAME_FIELD_NAME' ) )
     307                xprofile_setup_globals();
     308
    323309            $names = $wpdb->get_results( $wpdb->prepare( "SELECT pd.user_id as id, pd.value as fullname FROM {$bp->profile->table_name_fields} pf, {$bp->profile->table_name_data} pd WHERE pf.id = pd.field_id AND pf.name = %s AND pd.user_id IN ( {$user_ids} )", BP_XPROFILE_FULLNAME_FIELD_NAME ) );
    324310            for ( $i = 0; $i < count( $paged_users ); $i++ ) {
  • trunk/bp-core/bp-core-signup.php

    r2909 r2925  
    361361     * Now generate an activation key and send an email to the user so they can activate their account
    362362     * and validate their email address. Multisite installs send their own email, so this is only for single blog installs.
     363     *
     364     * To disable sending activation emails you can user the filter 'bp_core_signup_send_activation_key' and return false.
    363365     */
    364     if ( !bp_core_is_multisite() ) {
    365         $activation_key = wp_hash( $user_id );
    366         update_usermeta( $user_id, 'activation_key', $activation_key );
    367         bp_core_signup_send_validation_email( $user_id, $user_email, $activation_key );
     366    if ( apply_filters( 'bp_core_signup_send_activation_key', true ) ) {
     367        if ( !bp_core_is_multisite() ) {
     368            $activation_key = wp_hash( $user_id );
     369            update_usermeta( $user_id, 'activation_key', $activation_key );
     370            bp_core_signup_send_validation_email( $user_id, $user_email, $activation_key );
     371        }
    368372    }
    369373
  • trunk/bp-core/bp-core-templatetags.php

    r2920 r2925  
    2727        if ( isset( $_REQUEST['letter'] ) && '' != $_REQUEST['letter'] ) {
    2828            $this->members = BP_Core_User::get_users_by_letter( $_REQUEST['letter'], $this->pag_num, $this->pag_page, $populate_extras );
    29         }
    30         else if ( false !== $include ) {
    31             $this->members = BP_Core_User::get_specific_users( $include, $this->pag_num, $this->pag_page, $populate_extras );
    32         }
    33         else {
    34             $this->members = bp_core_get_users( array( 'type' => $this->type, 'per_page' => $this->pag_num, 'page' => $this->pag_page, 'user_id' => $user_id, 'search_terms' => $search_terms, 'populate_extras' => $populate_extras ) );
     29        } else {
     30            $this->members = bp_core_get_users( array( 'type' => $this->type, 'per_page' => $this->pag_num, 'page' => $this->pag_page, 'user_id' => $user_id, 'include' => $include, 'search_terms' => $search_terms, 'populate_extras' => $populate_extras ) );
    3531        }
    3632
     
    159155    }
    160156
     157    /* Make sure we return no members if we looking at friendship requests and there are none. */
     158    if ( empty( $include ) && $bp->friends->slug == $bp->current_component && 'requests' == $bp->current_action )
     159        return false;
     160
    161161    $members_template = new BP_Core_Members_Template( $type, $page, $per_page, $max, $user_id, $search_terms, $include, (bool)$populate_extras );
    162 
    163     return $members_template->has_members();
     162    return apply_filters( 'bp_has_members', $members_template->has_members(), &$members_template );
    164163}
    165164
  • trunk/bp-core/bp-core-wpabstraction.php

    r2842 r2925  
    6969
    7070if ( !function_exists( 'is_site_admin' ) ) {
    71     function is_site_admin() {
     71    function is_site_admin( $user_id = false ) {
    7272        if ( current_user_can( 'manage_options' ) )
    7373            return true;
  • trunk/bp-forums.php

    r2919 r2925  
    441441        $post_position = $post->post_position;
    442442
    443     $post = bb_insert_post( array( 'post_id' => $post_id, 'topic_id' => $topic_id, 'post_text' => stripslashes( trim( $post_text ) ), 'post_time' => $post_time, 'poster_id' => $poster_id, 'poster_ip' => $poster_ip, 'post_status' => $post_status, 'post_position' => $post_position ) );
    444 
    445     if ( $post )
     443    $post_id = bb_insert_post( array( 'post_id' => $post_id, 'topic_id' => $topic_id, 'post_text' => stripslashes( trim( $post_text ) ), 'post_time' => $post_time, 'poster_id' => $poster_id, 'poster_ip' => $poster_ip, 'post_status' => $post_status, 'post_position' => $post_position ) );
     444
     445    if ( $post_id )
    446446        do_action( 'bp_forums_new_post', $post_id );
    447447
    448     return $post;
     448    return $post_id;
    449449}
    450450
  • trunk/bp-friends.php

    r2863 r2925  
    595595    global $bp;
    596596
    597     if ( isset($_GET['new']) )
    598         bp_core_delete_notifications_for_user_by_type( $bp->displayed_user->id, $bp->friends->id, 'friendship_accepted' );
     597    if ( isset( $_GET['new'] ) )
     598        bp_core_delete_notifications_for_user_by_type( $bp->loggedin_user->id, $bp->friends->id, 'friendship_accepted' );
    599599}
    600600add_action( 'bp_activity_screen_my_activity', 'friends_clear_friend_notifications' );
  • trunk/bp-groups.php

    r2919 r2925  
    492492
    493493    if ( $bp->is_single_item ) {
     494        /* Refresh the group member count meta */
     495        groups_update_groupmeta( $bp->groups->current_group->id, 'total_member_count', groups_get_total_member_count( $bp->groups->current_group->id ) );
     496
    494497        do_action( 'groups_screen_group_members', $bp->groups->current_group->id );
    495498        bp_core_load_template( apply_filters( 'groups_template_group_members', 'groups/single/home' ) );
     
    16501653}
    16511654
     1655function groups_get_total_member_count( $group_id ) {
     1656    return BP_Groups_Group::get_total_member_count( $group_id );
     1657}
     1658
    16521659/*** Group Fetching, Filtering & Searching  *************************************/
    16531660
  • trunk/bp-groups/bp-groups-classes.php

    r2919 r2925  
    498498        return $wpdb->get_var( "SELECT COUNT(t.topic_id) FROM {$bbdb->topics} AS t, {$bp->groups->table_name} AS g LEFT JOIN {$bp->groups->table_name_groupmeta} AS gm ON g.id = gm.group_id WHERE (gm.meta_key = 'forum_id' AND gm.meta_value = t.forum_id) AND g.status = 'public' AND t.topic_status = '0' AND t.topic_sticky != '2' {$extra_sql} " );
    499499    }
     500
     501    function get_total_member_count( $group_id ) {
     502        global $wpdb, $bp;
     503
     504        return $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(id) FROM {$bp->groups->table_name_members} WHERE group_id = %d AND is_confirmed = 1 AND is_banned = 0", $group_id ) );
     505    }
    500506}
    501507
  • trunk/bp-loader.php

    r2863 r2925  
    77Version: 1.3-bleeding
    88Author URI: http://buddypress.org/developers/
    9 Site Wide Only: true
     9Network: true
    1010*/
    1111
  • trunk/bp-messages/bp-messages-notifications.php

    r2719 r2925  
    3434', 'buddypress' ), $sender_name, $subject, $content, $message_link );
    3535
    36         $content .= sprintf( __( 'To disable these notifications please log in and go to: %s', 'buddypress' ), $settings_link );
     36        $email_content .= sprintf( __( 'To disable these notifications please log in and go to: %s', 'buddypress' ), $settings_link );
    3737
    3838        /* Send the message */
  • trunk/bp-themes/bp-default/_inc/global.js

    r2842 r2925  
    11// AJAX Functions
    2 var j = jQuery;
     2var jq = jQuery;
    33
    44// Global variable to prevent multiple AJAX requests
    55var bp_ajax_request = null;
    66
    7 j(document).ready( function() {
     7jq(document).ready( function() {
    88    /**** Page Load Actions *******************************************************/
    99
    1010    /* Hide Forums Post Form */
    11     if ( j('div.forums').length )
    12         j('div#new-topic-post').hide();
     11    if ( jq('div.forums').length )
     12        jq('div#new-topic-post').hide();
    1313
    1414    /* Activity filter and scope set */
     
    2020
    2121    /* @mention Compose Scrolling */
    22     if ( j.query.get('r') ) {
    23         if ( j('textarea#whats-new').length ) {
    24             j.scrollTo( j('textarea#whats-new'), 500, { offset:-125, easing:'easeout' } );
    25             j('textarea#whats-new').focus();
     22    if ( jq.query.get('r') ) {
     23        if ( jq('textarea#whats-new').length ) {
     24            jq.scrollTo( jq('textarea#whats-new'), 500, { offset:-125, easing:'easeout' } );
     25            jq('textarea#whats-new').focus();
    2626        }
    2727    }
    2828
    2929    /* @mention username help button display */
    30     if ( j( 'span.highlight span' ).length )
    31         j( 'span.highlight span' ).toggle();
     30    if ( jq( 'span.highlight span' ).length )
     31        jq( 'span.highlight span' ).toggle();
    3232
    3333    /**** Activity Posting ********************************************************/
    3434
    3535    /* New posts */
    36     j("input#aw-whats-new-submit").click( function() {
    37         var button = j(this);
     36    jq("input#aw-whats-new-submit").click( function() {
     37        var button = jq(this);
    3838        var form = button.parent().parent().parent().parent();
    3939
    4040        form.children().each( function() {
    41             if ( j.nodeName(this, "textarea") || j.nodeName(this, "input") )
    42                 j(this).attr( 'disabled', 'disabled' );
    43         });
    44 
    45         j( 'form#' + form.attr('id') + ' span.ajax-loader' ).show();
     41            if ( jq.nodeName(this, "textarea") || jq.nodeName(this, "input") )
     42                jq(this).attr( 'disabled', 'disabled' );
     43        });
     44
     45        jq( 'form#' + form.attr('id') + ' span.ajax-loader' ).show();
    4646
    4747        /* Remove any errors */
    48         j('div.error').remove();
     48        jq('div.error').remove();
    4949        button.attr('disabled','disabled');
    5050
    5151        /* Default POST values */
    5252        var object = '';
    53         var item_id = j("#whats-new-post-in").val();
    54         var content = j("textarea#whats-new").val();
     53        var item_id = jq("#whats-new-post-in").val();
     54        var content = jq("textarea#whats-new").val();
    5555
    5656        /* Set object for non-profile posts */
    5757        if ( item_id > 0 ) {
    58             object = j("#whats-new-post-object").val();
    59         }
    60 
    61         j.post( ajaxurl, {
     58            object = jq("#whats-new-post-object").val();
     59        }
     60
     61        jq.post( ajaxurl, {
    6262            action: 'post_update',
    6363            'cookie': encodeURIComponent(document.cookie),
    64             '_wpnonce_post_update': j("input#_wpnonce_post_update").val(),
     64            '_wpnonce_post_update': jq("input#_wpnonce_post_update").val(),
    6565            'content': content,
    6666            'object': object,
     
    6969        function(response)
    7070        {
    71             j( 'form#' + form.attr('id') + ' span.ajax-loader' ).hide();
     71            jq( 'form#' + form.attr('id') + ' span.ajax-loader' ).hide();
    7272
    7373            form.children().each( function() {
    74                 if ( j.nodeName(this, "textarea") || j.nodeName(this, "input") )
    75                     j(this).attr( 'disabled', '' );
     74                if ( jq.nodeName(this, "textarea") || jq.nodeName(this, "input") )
     75                    jq(this).attr( 'disabled', '' );
    7676            });
    7777
     
    7979            if ( response[0] + response[1] == '-1' ) {
    8080                form.prepend( response.substr( 2, response.length ) );
    81                 j( 'form#' + form.attr('id') + ' div.error').hide().fadeIn( 200 );
     81                jq( 'form#' + form.attr('id') + ' div.error').hide().fadeIn( 200 );
    8282                button.attr("disabled", '');
    8383            } else {
    84                 if ( 0 == j("ul.activity-list").length ) {
    85                     j("div.error").slideUp(100).remove();
    86                     j("div#message").slideUp(100).remove();
    87                     j("div.activity").append( '<ul id="activity-stream" class="activity-list item-list">' );
     84                if ( 0 == jq("ul.activity-list").length ) {
     85                    jq("div.error").slideUp(100).remove();
     86                    jq("div#message").slideUp(100).remove();
     87                    jq("div.activity").append( '<ul id="activity-stream" class="activity-list item-list">' );
    8888                }
    8989
    90                 j("ul.activity-list").prepend(response);
    91                 j("ul.activity-list li:first").addClass('new-update');
    92                 j("li.new-update").hide().slideDown( 300 );
    93                 j("li.new-update").removeClass( 'new-update' );
    94                 j("textarea#whats-new").val('');
     90                jq("ul.activity-list").prepend(response);
     91                jq("ul.activity-list li:first").addClass('new-update');
     92                jq("li.new-update").hide().slideDown( 300 );
     93                jq("li.new-update").removeClass( 'new-update' );
     94                jq("textarea#whats-new").val('');
    9595
    9696                /* Re-enable the submit button after 8 seconds. */
     
    103103
    104104    /* List tabs event delegation */
    105     j('div.activity-type-tabs').click( function(event) {
    106         var target = j(event.target).parent();
     105    jq('div.activity-type-tabs').click( function(event) {
     106        var target = jq(event.target).parent();
    107107
    108108        if ( event.target.nodeName == 'STRONG' || event.target.nodeName == 'SPAN' )
     
    112112
    113113        /* Reset the page */
    114         j.cookie( 'bp-activity-oldestpage', 1, {path: '/'} );
     114        jq.cookie( 'bp-activity-oldestpage', 1, {path: '/'} );
    115115
    116116        /* Activity Stream Tabs */
    117117        var scope = target.attr('id').substr( 9, target.attr('id').length );
    118         var filter = j("#activity-filter-select select").val();
     118        var filter = jq("#activity-filter-select select").val();
    119119
    120120        if ( scope == 'mentions' )
    121             j( 'li#' + target.attr('id') + ' a strong' ).remove();
     121            jq( 'li#' + target.attr('id') + ' a strong' ).remove();
    122122
    123123        bp_activity_request(scope, filter, target);
     
    127127
    128128    /* Activity filter select */
    129     j('#activity-filter-select select').change( function() {
    130         var selected_tab = j( 'div.activity-type-tabs li.selected' );
     129    jq('#activity-filter-select select').change( function() {
     130        var selected_tab = jq( 'div.activity-type-tabs li.selected' );
    131131
    132132        if ( !selected_tab.length )
     
    135135            var scope = selected_tab.attr('id').substr( 9, selected_tab.attr('id').length );
    136136
    137         var filter = j(this).val();
     137        var filter = jq(this).val();
    138138
    139139        bp_activity_request(scope, filter);
     
    143143
    144144    /* Stream event delegation */
    145     j('div.activity').click( function(event) {
    146         var target = j(event.target);
     145    jq('div.activity').click( function(event) {
     146        var target = jq(event.target);
    147147
    148148        /* Favoriting activity stream items */
     
    154154            target.addClass('loading');
    155155
    156             j.post( ajaxurl, {
     156            jq.post( ajaxurl, {
    157157                action: 'activity_mark_' + type,
    158158                'cookie': encodeURIComponent(document.cookie),
     
    163163
    164164                target.fadeOut( 100, function() {
    165                     j(this).html(response);
    166                     j(this).fadeIn(100);
     165                    jq(this).html(response);
     166                    jq(this).fadeIn(100);
    167167                });
    168168
    169169                if ( 'fav' == type ) {
    170                     if ( !j('div.item-list-tabs li#activity-favorites').length )
    171                         j('div.item-list-tabs ul li#activity-mentions').before( '<li id="activity-favorites"><a href="#">' + bp_terms_my_favs + ' (<span>0</span>)</a></li>');
     170                    if ( !jq('div.item-list-tabs li#activity-favorites').length )
     171                        jq('div.item-list-tabs ul li#activity-mentions').before( '<li id="activity-favorites"><a href="#">' + bp_terms_my_favs + ' (<span>0</span>)</a></li>');
    172172
    173173                    target.removeClass('fav');
    174174                    target.addClass('unfav');
    175175
    176                     j('div.item-list-tabs ul li#activity-favorites span').html( Number( j('div.item-list-tabs ul li#activity-favorites span').html() ) + 1 );
     176                    jq('div.item-list-tabs ul li#activity-favorites span').html( Number( jq('div.item-list-tabs ul li#activity-favorites span').html() ) + 1 );
    177177                } else {
    178178                    target.removeClass('unfav');
    179179                    target.addClass('fav');
    180180
    181                     j('div.item-list-tabs ul li#activity-favorites span').html( Number( j('div.item-list-tabs ul li#activity-favorites span').html() ) - 1 );
    182 
    183                     if ( !Number( j('div.item-list-tabs ul li#activity-favorites span').html() ) ) {
    184                         if ( j('div.item-list-tabs ul li#activity-favorites').hasClass('selected') )
     181                    jq('div.item-list-tabs ul li#activity-favorites span').html( Number( jq('div.item-list-tabs ul li#activity-favorites span').html() ) - 1 );
     182
     183                    if ( !Number( jq('div.item-list-tabs ul li#activity-favorites span').html() ) ) {
     184                        if ( jq('div.item-list-tabs ul li#activity-favorites').hasClass('selected') )
    185185                            bp_activity_request( null, null );
    186186
    187                         j('div.item-list-tabs ul li#activity-favorites').remove();
     187                        jq('div.item-list-tabs ul li#activity-favorites').remove();
    188188                    }
    189189                }
    190190
    191                 if ( 'activity-favorites' == j( 'div.item-list-tabs li.selected').attr('id') )
     191                if ( 'activity-favorites' == jq( 'div.item-list-tabs li.selected').attr('id') )
    192192                    target.parent().parent().parent().slideUp(100);
    193193            });
     
    207207            target.addClass('loading');
    208208
    209             j.post( ajaxurl, {
     209            jq.post( ajaxurl, {
    210210                action: 'delete_activity',
    211211                'cookie': encodeURIComponent(document.cookie),
     
    229229        /* Load more updates at the end of the page */
    230230        if ( target.parent().attr('class') == 'load-more' ) {
    231             j("li.load-more").addClass('loading');
    232 
    233             if ( null == j.cookie('bp-activity-oldestpage') )
    234                 j.cookie('bp-activity-oldestpage', 1, {path: '/'} );
    235 
    236             var oldest_page = ( j.cookie('bp-activity-oldestpage') * 1 ) + 1;
    237 
    238             j.post( ajaxurl, {
     231            jq("li.load-more").addClass('loading');
     232
     233            if ( null == jq.cookie('bp-activity-oldestpage') )
     234                jq.cookie('bp-activity-oldestpage', 1, {path: '/'} );
     235
     236            var oldest_page = ( jq.cookie('bp-activity-oldestpage') * 1 ) + 1;
     237
     238            jq.post( ajaxurl, {
    239239                action: 'activity_get_older_updates',
    240240                'cookie': encodeURIComponent(document.cookie),
     
    243243            function(response)
    244244            {
    245                 j("li.load-more").removeClass('loading');
    246                 j.cookie( 'bp-activity-oldestpage', oldest_page, {path: '/'} );
    247                 j("ul.activity-list").append(response.contents);
     245                jq("li.load-more").removeClass('loading');
     246                jq.cookie( 'bp-activity-oldestpage', oldest_page, {path: '/'} );
     247                jq("ul.activity-list").append(response.contents);
    248248
    249249                target.parent().hide();
     
    257257
    258258    /* Hide all activity comment forms */
    259     j('form.ac-form').hide();
     259    jq('form.ac-form').hide();
    260260
    261261    /* Hide excess comments */
    262     if ( j('div.activity-comments').length )
     262    if ( jq('div.activity-comments').length )
    263263        bp_dtheme_hide_comments();
    264264
    265265    /* Activity list event delegation */
    266     j('div.activity').click( function(event) {
    267         var target = j(event.target);
     266    jq('div.activity').click( function(event) {
     267        var target = jq(event.target);
    268268
    269269        /* Comment / comment reply links */
     
    277277            var a_id = ids[2]
    278278            var c_id = target.attr('href').substr( 10, target.attr('href').length );
    279             var form = j( '#ac-form-' + a_id );
    280 
    281             var form = j( '#ac-form-' + ids[2] );
     279            var form = jq( '#ac-form-' + a_id );
     280
     281            var form = jq( '#ac-form-' + ids[2] );
    282282
    283283            form.css( 'display', 'none' );
    284284            form.removeClass('root');
    285             j('.ac-form').hide();
     285            jq('.ac-form').hide();
    286286
    287287            /* Hide any error messages */
    288288            form.children('div').each( function() {
    289                 if ( j(this).hasClass( 'error' ) )
    290                     j(this).hide();
     289                if ( jq(this).hasClass( 'error' ) )
     290                    jq(this).hide();
    291291            });
    292292
    293293            if ( ids[1] != 'comment' ) {
    294                 j('div.activity-comments li#acomment-' + c_id).append( form );
     294                jq('div.activity-comments li#acomment-' + c_id).append( form );
    295295            } else {
    296                 j('li#activity-' + a_id + ' div.activity-comments').append( form );
     296                jq('li#activity-' + a_id + ' div.activity-comments').append( form );
    297297            }
    298298
     
    301301
    302302            form.slideDown( 200 );
    303             j.scrollTo( form, 500, { offset:-100, easing:'easeout' } );
    304             j('#ac-form-' + ids[2] + ' textarea').focus();
     303            jq.scrollTo( form, 500, { offset:-100, easing:'easeout' } );
     304            jq('#ac-form-' + ids[2] + ' textarea').focus();
    305305
    306306            return false;
     
    321321
    322322            /* Hide any error messages */
    323             j( 'form#' + form + ' div.error').hide();
     323            jq( 'form#' + form + ' div.error').hide();
    324324            form.addClass('loading');
    325325            target.css('disabled', 'disabled');
    326326
    327             j.post( ajaxurl, {
     327            jq.post( ajaxurl, {
    328328                action: 'new_activity_comment',
    329329                'cookie': encodeURIComponent(document.cookie),
    330                 '_wpnonce_new_activity_comment': j("input#_wpnonce_new_activity_comment").val(),
     330                '_wpnonce_new_activity_comment': jq("input#_wpnonce_new_activity_comment").val(),
    331331                'comment_id': comment_id,
    332332                'form_id': form_id[2],
    333                 'content': j('form#' + form.attr('id') + ' textarea').val()
     333                'content': jq('form#' + form.attr('id') + ' textarea').val()
    334334            },
    335335            function(response)
     
    356356                        }
    357357                    );
    358                     j( 'form#' + form + ' textarea').val('');
     358                    jq( 'form#' + form + ' textarea').val('');
    359359
    360360                    /* Increase the "Reply (X)" button count */
    361                     j('li#activity-' + form_id[2] + ' a.acomment-reply span').html( Number( j('li#activity-' + form_id[2] + ' a.acomment-reply span').html() ) + 1 );
     361                    jq('li#activity-' + form_id[2] + ' a.acomment-reply span').html( Number( jq('li#activity-' + form_id[2] + ' a.acomment-reply span').html() ) + 1 );
    362362
    363363                    /* Re-enable the submit button after 5 seconds. */
     
    385385
    386386            /* Remove any error messages */
    387             j('div.activity-comments ul div.error').remove();
     387            jq('div.activity-comments ul div.error').remove();
    388388
    389389            /* Reset the form position */
    390390            comment_li.parents('div.activity-comments').append(form);
    391391
    392             j.post( ajaxurl, {
     392            jq.post( ajaxurl, {
    393393                action: 'delete_activity_comment',
    394394                'cookie': encodeURIComponent(document.cookie),
     
    402402                    comment_li.prepend( response.substr( 2, response.length ) ).hide().fadeIn( 200 );
    403403                } else {
    404                     var children = j( 'li#' + comment_li.attr('id') + ' ul' ).children('li');
     404                    var children = jq( 'li#' + comment_li.attr('id') + ' ul' ).children('li');
    405405                    var child_count = 0;
    406                     j(children).each( function() {
    407                         if ( !j(this).is(':hidden') )
     406                    jq(children).each( function() {
     407                        if ( !jq(this).is(':hidden') )
    408408                            child_count++;
    409409                    });
     
    412412                    /* Decrease the "Reply (X)" button count */
    413413                    var parent_li = comment_li.parents('ul#activity-stream > li');
    414                     j('li#' + parent_li.attr('id') + ' a.acomment-reply span').html( j('li#' + parent_li.attr('id') + ' a.acomment-reply span').html() - ( 1 + child_count ) );
     414                    jq('li#' + parent_li.attr('id') + ' a.acomment-reply span').html( jq('li#' + parent_li.attr('id') + ' a.acomment-reply span').html() - ( 1 + child_count ) );
    415415                }
    416416            });
     
    434434
    435435    /* Escape Key Press for cancelling comment forms */
    436     j(document).keydown( function(e) {
     436    jq(document).keydown( function(e) {
    437437        e = e || window.event;
    438438        if (e.target)
     
    451451        if ( keyCode == 27 ) {
    452452            if (element.tagName == 'TEXTAREA') {
    453                 if ( j(element).attr('class') == 'ac-input' )
    454                     j(element).parent().parent().parent().slideUp( 200 );
     453                if ( jq(element).attr('class') == 'ac-input' )
     454                    jq(element).parent().parent().parent().slideUp( 200 );
    455455            }
    456456        }
     
    459459    /**** @mention username help tooltip **************************************/
    460460
    461     j('span.highlight span').click( function() {
    462         if ( !j('div.help').length ) {
    463             j(this).parent().after( '<div id="message" class="info help"><p>' + bp_terms_mention_explain + '</p></div>' );
    464             j('div.help').hide().slideDown(200);
     461    jq('span.highlight span').click( function() {
     462        if ( !jq('div.help').length ) {
     463            jq(this).parent().after( '<div id="message" class="info help"><p>' + bp_terms_mention_explain + '</p></div>' );
     464            jq('div.help').hide().slideDown(200);
    465465        } else {
    466             j('div.help').hide().remove();
     466            jq('div.help').hide().remove();
    467467        }
    468468    })
     
    471471
    472472    /* The search form on all directory pages */
    473     j('div.dir-search').click( function(event) {
    474         if ( j(this).hasClass('no-ajax') )
     473    jq('div.dir-search').click( function(event) {
     474        if ( jq(this).hasClass('no-ajax') )
    475475            return;
    476476
    477         var target = j(event.target);
     477        var target = jq(event.target);
    478478
    479479        if ( target.attr('type') == 'submit' ) {
    480             var css_id = j('div.item-list-tabs li.selected').attr('id').split( '-' );
     480            var css_id = jq('div.item-list-tabs li.selected').attr('id').split( '-' );
    481481            var object = css_id[0];
    482482
    483             bp_filter_request( object, j.cookie('bp-' + object + '-filter'), j.cookie('bp-' + object + '-scope') , 'div.' + object, target.parent().children('label').children('input').val(), 1, j.cookie('bp-' + object + '-extras') );
     483            bp_filter_request( object, jq.cookie('bp-' + object + '-filter'), jq.cookie('bp-' + object + '-scope') , 'div.' + object, target.parent().children('label').children('input').val(), 1, jq.cookie('bp-' + object + '-extras') );
    484484
    485485            return false;
     
    490490
    491491    /* When a navigation tab is clicked - e.g. | All Groups | My Groups | */
    492     j('div.item-list-tabs').click( function(event) {
    493         if ( j(this).hasClass('no-ajax') )
     492    jq('div.item-list-tabs').click( function(event) {
     493        if ( jq(this).hasClass('no-ajax') )
    494494            return;
    495495
    496         var target = j(event.target).parent();
     496        var target = jq(event.target).parent();
    497497
    498498        if ( 'LI' == event.target.parentNode.nodeName && !target.hasClass('last') ) {
     
    504504
    505505            var scope = css_id[1];
    506             var filter = j("#" + object + "-order-select select").val();
    507             var search_terms = j("#" + object + "_search").val();
    508 
    509             bp_filter_request( object, filter, scope, 'div.' + object, search_terms, 1, j.cookie('bp-' + object + '-extras') );
     506            var filter = jq("#" + object + "-order-select select").val();
     507            var search_terms = jq("#" + object + "_search").val();
     508
     509            bp_filter_request( object, filter, scope, 'div.' + object, search_terms, 1, jq.cookie('bp-' + object + '-extras') );
    510510
    511511            return false;
     
    514514
    515515    /* When the filter select box is changed re-query */
    516     j('li.filter select').change( function() {
    517         if ( j('div.item-list-tabs li.selected').length )
    518             var el = j('div.item-list-tabs li.selected');
     516    jq('li.filter select').change( function() {
     517        if ( jq('div.item-list-tabs li.selected').length )
     518            var el = jq('div.item-list-tabs li.selected');
    519519        else
    520             var el = j(this);
     520            var el = jq(this);
    521521
    522522        var css_id = el.attr('id').split('-');
    523523        var object = css_id[0];
    524524        var scope = css_id[1];
    525         var filter = j(this).val();
     525        var filter = jq(this).val();
    526526        var search_terms = false;
    527527
    528         if ( j('div.dir-search input').length )
    529             search_terms = j('div.dir-search input').val();
     528        if ( jq('div.dir-search input').length )
     529            search_terms = jq('div.dir-search input').val();
    530530
    531531        if ( 'friends' == object )
    532532            object = 'members';
    533533
    534         bp_filter_request( object, filter, scope, 'div.' + object, search_terms, 1, j.cookie('bp-' + object + '-extras') );
     534        bp_filter_request( object, filter, scope, 'div.' + object, search_terms, 1, jq.cookie('bp-' + object + '-extras') );
    535535
    536536        return false;
     
    538538
    539539    /* All pagination links run through this function */
    540     j('div#content').click( function(event) {
    541         var target = j(event.target);
     540    jq('div#content').click( function(event) {
     541        var target = jq(event.target);
    542542
    543543        if ( target.hasClass('button') )
     
    548548                return false;
    549549
    550             if ( j('div.item-list-tabs li.selected').length )
    551                 var el = j('div.item-list-tabs li.selected');
     550            if ( jq('div.item-list-tabs li.selected').length )
     551                var el = jq('div.item-list-tabs li.selected');
    552552            else
    553                 var el = j('li.filter select');
     553                var el = jq('li.filter select');
    554554
    555555            var page_number = 1;
     
    558558            var search_terms = false;
    559559
    560             if ( j('div.dir-search input').length )
    561                 search_terms = j('div.dir-search input').val();
    562 
    563             if ( j(target).hasClass('next') )
    564                 var page_number = Number( j('div.pagination span.current').html() ) + 1;
    565             else if ( j(target).hasClass('prev') )
    566                 var page_number = Number( j('div.pagination span.current').html() ) - 1;
     560            if ( jq('div.dir-search input').length )
     561                search_terms = jq('div.dir-search input').val();
     562
     563            if ( jq(target).hasClass('next') )
     564                var page_number = Number( jq('div.pagination span.current').html() ) + 1;
     565            else if ( jq(target).hasClass('prev') )
     566                var page_number = Number( jq('div.pagination span.current').html() ) - 1;
    567567            else
    568                 var page_number = Number( j(target).html() );
    569 
    570             bp_filter_request( object, j.cookie('bp-' + object + '-filter'), j.cookie('bp-' + object + '-scope'), 'div.' + object, search_terms, page_number, j.cookie('bp-' + object + '-extras') );
     568                var page_number = Number( jq(target).html() );
     569
     570            bp_filter_request( object, jq.cookie('bp-' + object + '-filter'), jq.cookie('bp-' + object + '-scope'), 'div.' + object, search_terms, page_number, jq.cookie('bp-' + object + '-extras') );
    571571
    572572            return false;
     
    578578
    579579    /* Hit the "New Topic" button on the forums directory page */
    580     j('a#new-topic-button').click( function() {
    581         if ( !j('div#new-topic-post').length )
    582             return false;
    583 
    584         if ( j('div#new-topic-post').is(":visible") )
    585             j('div#new-topic-post').slideUp(200);
     580    jq('a#new-topic-button').click( function() {
     581        if ( !jq('div#new-topic-post').length )
     582            return false;
     583
     584        if ( jq('div#new-topic-post').is(":visible") )
     585            jq('div#new-topic-post').slideUp(200);
    586586        else
    587             j('div#new-topic-post').slideDown(200);
     587            jq('div#new-topic-post').slideDown(200);
    588588
    589589        return false;
     
    591591
    592592    /* Cancel the posting of a new forum topic */
    593     j('input#submit_topic_cancel').click( function() {
    594         if ( !j('div#new-topic-post').length )
    595             return false;
    596 
    597         j('div#new-topic-post').slideUp(200);
     593    jq('input#submit_topic_cancel').click( function() {
     594        if ( !jq('div#new-topic-post').length )
     595            return false;
     596
     597        jq('div#new-topic-post').slideUp(200);
    598598        return false;
    599599    });
    600600
    601601    /* Clicking a forum tag */
    602     j('div#forum-directory-tags a').click( function() {
    603         bp_filter_request( 'forums', 'tags', j.cookie('bp-forums-scope'), 'div.forums', j(this).html().replace( /&nbsp;/g, '-' ), 1, j.cookie('bp-forums-extras') );
     602    jq('div#forum-directory-tags a').click( function() {
     603        bp_filter_request( 'forums', 'tags', jq.cookie('bp-forums-scope'), 'div.forums', jq(this).html().replace( /&nbsp;/g, '-' ), 1, jq.cookie('bp-forums-extras') );
    604604        return false;
    605605    });
     
    608608
    609609    /* Select a user from the list of friends and add them to the invite list */
    610     j("div#invite-list input").click( function() {
    611         j('.ajax-loader').toggle();
    612 
    613         var friend_id = j(this).val();
    614 
    615         if ( j(this).attr('checked') == true )
     610    jq("div#invite-list input").click( function() {
     611        jq('.ajax-loader').toggle();
     612
     613        var friend_id = jq(this).val();
     614
     615        if ( jq(this).attr('checked') == true )
    616616            var friend_action = 'invite';
    617617        else
    618618            var friend_action = 'uninvite';
    619619
    620         j('div.item-list-tabs li.selected').addClass('loading');
    621 
    622         j.post( ajaxurl, {
     620        jq('div.item-list-tabs li.selected').addClass('loading');
     621
     622        jq.post( ajaxurl, {
    623623            action: 'groups_invite_user',
    624624            'friend_action': friend_action,
    625625            'cookie': encodeURIComponent(document.cookie),
    626             '_wpnonce': j("input#_wpnonce_invite_uninvite_user").val(),
     626            '_wpnonce': jq("input#_wpnonce_invite_uninvite_user").val(),
    627627            'friend_id': friend_id,
    628             'group_id': j("input#group_id").val()
     628            'group_id': jq("input#group_id").val()
    629629        },
    630630        function(response)
    631631        {
    632             if ( j("#message") )
    633                 j("#message").hide();
    634 
    635             j('.ajax-loader').toggle();
     632            if ( jq("#message") )
     633                jq("#message").hide();
     634
     635            jq('.ajax-loader').toggle();
    636636
    637637            if ( friend_action == 'invite' ) {
    638                 j('#friend-list').append(response);
     638                jq('#friend-list').append(response);
    639639            } else if ( friend_action == 'uninvite' ) {
    640                 j('#friend-list li#uid-' + friend_id).remove();
    641             }
    642 
    643             j('div.item-list-tabs li.selected').removeClass('loading');
     640                jq('#friend-list li#uid-' + friend_id).remove();
     641            }
     642
     643            jq('div.item-list-tabs li.selected').removeClass('loading');
    644644        });
    645645    });
    646646
    647647    /* Remove a user from the list of users to invite to a group */
    648     j("#friend-list li a.remove").live('click', function() {
    649         j('.ajax-loader').toggle();
    650 
    651         var friend_id = j(this).attr('id');
     648    jq("#friend-list li a.remove").live('click', function() {
     649        jq('.ajax-loader').toggle();
     650
     651        var friend_id = jq(this).attr('id');
    652652        friend_id = friend_id.split('-');
    653653        friend_id = friend_id[1];
    654654
    655         j.post( ajaxurl, {
     655        jq.post( ajaxurl, {
    656656            action: 'groups_invite_user',
    657657            'friend_action': 'uninvite',
    658658            'cookie': encodeURIComponent(document.cookie),
    659             '_wpnonce': j("input#_wpnonce_invite_uninvite_user").val(),
     659            '_wpnonce': jq("input#_wpnonce_invite_uninvite_user").val(),
    660660            'friend_id': friend_id,
    661             'group_id': j("input#group_id").val()
     661            'group_id': jq("input#group_id").val()
    662662        },
    663663        function(response)
    664664        {
    665             j('.ajax-loader').toggle();
    666             j('#friend-list li#uid-' + friend_id).remove();
    667             j('#invite-list input#f-' + friend_id).attr('checked', false);
     665            jq('.ajax-loader').toggle();
     666            jq('#friend-list li#uid-' + friend_id).remove();
     667            jq('#invite-list input#f-' + friend_id).attr('checked', false);
    668668        });
    669669
     
    674674
    675675    /* Accept and Reject friendship request buttons */
    676     j("ul#friend-list a.accept, ul#friend-list a.reject").click( function() {
    677         var button = j(this);
    678         var li = j(this).parents('ul#friend-list li');
    679         var action_div = j(this).parents('li div.action');
     676    jq("ul#friend-list a.accept, ul#friend-list a.reject").click( function() {
     677        var button = jq(this);
     678        var li = jq(this).parents('ul#friend-list li');
     679        var action_div = jq(this).parents('li div.action');
    680680
    681681        var id = li.attr('id').substr( 11, li.attr('id').length );
     
    685685            nonce = nonce[1];
    686686
    687         if ( j(this).hasClass('accepted') || j(this).hasClass('rejected') )
    688             return false;
    689 
    690         if ( j(this).hasClass('accept') ) {
     687        if ( jq(this).hasClass('accepted') || jq(this).hasClass('rejected') )
     688            return false;
     689
     690        if ( jq(this).hasClass('accept') ) {
    691691            var action = 'accept_friendship';
    692692            action_div.children('a.reject').css( 'visibility', 'hidden' );
     
    698698        button.addClass('loading');
    699699
    700         j.post( ajaxurl, {
     700        jq.post( ajaxurl, {
    701701            action: action,
    702702            'cookie': encodeURIComponent(document.cookie),
     
    712712            } else {
    713713                button.fadeOut( 100, function() {
    714                     if ( j(this).hasClass('accept') ) {
    715                         j(this).html( bp_terms_accepted ).fadeIn(50);
    716                         j(this).addClass('accepted');
     714                    if ( jq(this).hasClass('accept') ) {
     715                        jq(this).html( bp_terms_accepted ).fadeIn(50);
     716                        jq(this).addClass('accepted');
    717717                    } else {
    718                         j(this).html( bp_terms_rejected ).fadeIn(50);
    719                         j(this).addClass('rejected');
     718                        jq(this).html( bp_terms_rejected ).fadeIn(50);
     719                        jq(this).addClass('rejected');
    720720                    }
    721721                });
     
    727727
    728728    /* Add / Remove friendship buttons */
    729     j("div.friendship-button a").live('click', function() {
    730         j(this).parent().addClass('loading');
    731         var fid = j(this).attr('id');
     729    jq("div.friendship-button a").live('click', function() {
     730        jq(this).parent().addClass('loading');
     731        var fid = jq(this).attr('id');
    732732        fid = fid.split('-');
    733733        fid = fid[1];
    734734
    735         var nonce = j(this).attr('href');
     735        var nonce = jq(this).attr('href');
    736736        nonce = nonce.split('?_wpnonce=');
    737737        nonce = nonce[1].split('&');
    738738        nonce = nonce[0];
    739739
    740         var thelink = j(this);
    741 
    742         j.post( ajaxurl, {
     740        var thelink = jq(this);
     741
     742        jq.post( ajaxurl, {
    743743            action: 'addremove_friend',
    744744            'cookie': encodeURIComponent(document.cookie),
     
    752752
    753753            if ( action == 'add' ) {
    754                 j(parentdiv).fadeOut(200,
     754                jq(parentdiv).fadeOut(200,
    755755                    function() {
    756756                        parentdiv.removeClass('add_friend');
     
    762762
    763763            } else if ( action == 'remove' ) {
    764                 j(parentdiv).fadeOut(200,
     764                jq(parentdiv).fadeOut(200,
    765765                    function() {
    766766                        parentdiv.removeClass('remove_friend');
     
    777777    /** Group Join / Leave Buttons **************************************/
    778778
    779     j("div.group-button a").live('click', function() {
    780         var gid = j(this).parent().attr('id');
     779    jq("div.group-button a").live('click', function() {
     780        var gid = jq(this).parent().attr('id');
    781781        gid = gid.split('-');
    782782        gid = gid[1];
    783783
    784         var nonce = j(this).attr('href');
     784        var nonce = jq(this).attr('href');
    785785        nonce = nonce.split('?_wpnonce=');
    786786        nonce = nonce[1].split('&');
    787787        nonce = nonce[0];
    788788
    789         var thelink = j(this);
    790 
    791         j.post( ajaxurl, {
     789        var thelink = jq(this);
     790
     791        jq.post( ajaxurl, {
    792792            action: 'joinleave_group',
    793793            'cookie': encodeURIComponent(document.cookie),
     
    799799            var parentdiv = thelink.parent();
    800800
    801             if ( !j('body.directory').length )
     801            if ( !jq('body.directory').length )
    802802                location.href = location.href;
    803803            else {
    804                 j(parentdiv).fadeOut(200,
     804                jq(parentdiv).fadeOut(200,
    805805                    function() {
    806806                        parentdiv.fadeIn(200).html(response);
     
    814814    /** Button disabling ************************************************/
    815815
    816     j('div.pending').click(function() {
     816    jq('div.pending').click(function() {
    817817        return false;
    818818    });
     
    820820    /** Alternate Highlighting ******************************************/
    821821
    822     j('table tr, div.message-box, ul#topic-post-list li').each( function(i) {
     822    jq('table tr, div.message-box, ul#topic-post-list li').each( function(i) {
    823823        if ( i % 2 != 1 )
    824             j(this).addClass('alt');
     824            jq(this).addClass('alt');
    825825    });
    826826
     
    828828
    829829    /* AJAX send reply functionality */
    830     j("input#send_reply_button").click(
     830    jq("input#send_reply_button").click(
    831831        function() {
    832             j('form#send-reply span.ajax-loader').toggle();
    833 
    834             j.post( ajaxurl, {
     832            jq('form#send-reply span.ajax-loader').toggle();
     833
     834            jq.post( ajaxurl, {
    835835                action: 'messages_send_reply',
    836836                'cookie': encodeURIComponent(document.cookie),
    837                 '_wpnonce': j("input#send_message_nonce").val(),
    838 
    839                 'content': j("#message_content").val(),
    840                 'send_to': j("input#send_to").val(),
    841                 'subject': j("input#subject").val(),
    842                 'thread_id': j("input#thread_id").val()
     837                '_wpnonce': jq("input#send_message_nonce").val(),
     838
     839                'content': jq("#message_content").val(),
     840                'send_to': jq("input#send_to").val(),
     841                'subject': jq("input#subject").val(),
     842                'thread_id': jq("input#thread_id").val()
    843843            },
    844844            function(response)
    845845            {
    846846                if ( response[0] + response[1] == "-1" ) {
    847                     j('form#send-reply').prepend( response.substr( 2, response.length ) );
     847                    jq('form#send-reply').prepend( response.substr( 2, response.length ) );
    848848                } else {
    849                     j('form#send-reply div#message').remove();
    850                     j("#message_content").val('');
    851                     j('form#send-reply').before( response );
    852 
    853                     j("div.new-message").hide().slideDown( 200, function() {
    854                         j('div.new-message').removeClass('new-message');
     849                    jq('form#send-reply div#message').remove();
     850                    jq("#message_content").val('');
     851                    jq('form#send-reply').before( response );
     852
     853                    jq("div.new-message").hide().slideDown( 200, function() {
     854                        jq('div.new-message').removeClass('new-message');
    855855                    });
    856856
    857                     j('div.message-box').each( function(i) {
    858                         j(this).removeClass('alt');
     857                    jq('div.message-box').each( function(i) {
     858                        jq(this).removeClass('alt');
    859859                        if ( i % 2 != 1 )
    860                             j(this).addClass('alt');
     860                            jq(this).addClass('alt');
    861861                    });
    862862                }
    863                 j('form#send-reply span.ajax-loader').toggle();
     863                jq('form#send-reply span.ajax-loader').toggle();
    864864            });
    865865
     
    869869
    870870    /* Marking private messages as read and unread */
    871     j("a#mark_as_read, a#mark_as_unread").click(function() {
     871    jq("a#mark_as_read, a#mark_as_unread").click(function() {
    872872        var checkboxes_tosend = '';
    873         var checkboxes = j("#message-threads tr td input[type='checkbox']");
    874 
    875         if ( 'mark_as_unread' == j(this).attr('id') ) {
     873        var checkboxes = jq("#message-threads tr td input[type='checkbox']");
     874
     875        if ( 'mark_as_unread' == jq(this).attr('id') ) {
    876876            var currentClass = 'read'
    877877            var newClass = 'unread'
     
    890890
    891891        checkboxes.each( function(i) {
    892             if(j(this).is(':checked')) {
    893                 if ( j('tr#m-' + j(this).attr('value')).hasClass(currentClass) ) {
    894                     checkboxes_tosend += j(this).attr('value');
    895                     j('tr#m-' + j(this).attr('value')).removeClass(currentClass);
    896                     j('tr#m-' + j(this).attr('value')).addClass(newClass);
    897                     var thread_count = j('tr#m-' + j(this).attr('value') + ' td span.unread-count').html();
    898 
    899                     j('tr#m-' + j(this).attr('value') + ' td span.unread-count').html(unreadCount);
    900                     j('tr#m-' + j(this).attr('value') + ' td span.unread-count').css('display', unreadCountDisplay);
    901                     var inboxcount = j('a#user-messages strong').html().substr( 1, j('a#user-messages strong').html().length );
     892            if(jq(this).is(':checked')) {
     893                if ( jq('tr#m-' + jq(this).attr('value')).hasClass(currentClass) ) {
     894                    checkboxes_tosend += jq(this).attr('value');
     895                    jq('tr#m-' + jq(this).attr('value')).removeClass(currentClass);
     896                    jq('tr#m-' + jq(this).attr('value')).addClass(newClass);
     897                    var thread_count = jq('tr#m-' + jq(this).attr('value') + ' td span.unread-count').html();
     898
     899                    jq('tr#m-' + jq(this).attr('value') + ' td span.unread-count').html(unreadCount);
     900                    jq('tr#m-' + jq(this).attr('value') + ' td span.unread-count').css('display', unreadCountDisplay);
     901                    var inboxcount = jq('a#user-messages strong').html().substr( 1, jq('a#user-messages strong').html().length );
    902902                    var inboxcount = inboxcount.substr( 0, inboxcount.length - 1 );
    903903
     
    905905                        inboxcount = 0;
    906906                    if ( parseInt(inboxcount) == inboxCount ) {
    907                         j('a#user-messages strong').css('display', unreadCountDisplay);
    908                         j('a#user-messages strong').html( '(' + unreadCount + ')' );
     907                        jq('a#user-messages strong').css('display', unreadCountDisplay);
     908                        jq('a#user-messages strong').html( '(' + unreadCount + ')' );
    909909                    } else {
    910910                        if ( 'read' == currentClass )
    911                             j('a#user-messages strong').html('(' + ( parseInt(inboxcount) + 1 ) + ')');
     911                            jq('a#user-messages strong').html('(' + ( parseInt(inboxcount) + 1 ) + ')');
    912912                        else
    913                             j('a#user-messages strong').html('(' + ( parseInt(inboxcount) - thread_count ) + ')');
     913                            jq('a#user-messages strong').html('(' + ( parseInt(inboxcount) - thread_count ) + ')');
    914914                    }
    915915
     
    920920            }
    921921        });
    922         j.post( ajaxurl, {
     922        jq.post( ajaxurl, {
    923923            action: action,
    924924            'thread_ids': checkboxes_tosend
     
    928928
    929929    /* Selecting unread and read messages in inbox */
    930     j("select#message-type-select").change(
     930    jq("select#message-type-select").change(
    931931        function() {
    932             var selection = j("select#message-type-select").val();
    933             var checkboxes = j("td input[type='checkbox']");
     932            var selection = jq("select#message-type-select").val();
     933            var checkboxes = jq("td input[type='checkbox']");
    934934            checkboxes.each( function(i) {
    935935                checkboxes[i].checked = "";
     
    938938            switch(selection) {
    939939                case 'unread':
    940                     var checkboxes = j("tr.unread td input[type='checkbox']");
     940                    var checkboxes = jq("tr.unread td input[type='checkbox']");
    941941                break;
    942942                case 'read':
    943                     var checkboxes = j("tr.read td input[type='checkbox']");
     943                    var checkboxes = jq("tr.read td input[type='checkbox']");
    944944                break;
    945945            }
     
    957957
    958958    /* Bulk delete messages */
    959     j("a#delete_inbox_messages").click( function() {
     959    jq("a#delete_inbox_messages").click( function() {
    960960        checkboxes_tosend = '';
    961         checkboxes = j("#message-threads tr td input[type='checkbox']");
    962 
    963         j('div#message').remove();
    964         j(this).addClass('loading');
    965 
    966         j(checkboxes).each( function(i) {
    967             if( j(this).is(':checked') )
    968                 checkboxes_tosend += j(this).attr('value') + ',';
     961        checkboxes = jq("#message-threads tr td input[type='checkbox']");
     962
     963        jq('div#message').remove();
     964        jq(this).addClass('loading');
     965
     966        jq(checkboxes).each( function(i) {
     967            if( jq(this).is(':checked') )
     968                checkboxes_tosend += jq(this).attr('value') + ',';
    969969        });
    970970
    971971        if ( '' == checkboxes_tosend ) {
    972             j(this).removeClass('loading');
    973             return false;
    974         }
    975 
    976         j.post( ajaxurl, {
     972            jq(this).removeClass('loading');
     973            return false;
     974        }
     975
     976        jq.post( ajaxurl, {
    977977            action: 'messages_delete',
    978978            'thread_ids': checkboxes_tosend
    979979        }, function(response) {
    980980            if ( response[0] + response[1] == "-1" ) {
    981                 j('#message-threads').prepend( response.substr( 2, response.length ) );
     981                jq('#message-threads').prepend( response.substr( 2, response.length ) );
    982982            } else {
    983                 j('#message-threads').before( '<div id="message" class="updated"><p>' + response + '</p></div>' );
    984 
    985                 j(checkboxes).each( function(i) {
    986                     if( j(this).is(':checked') )
    987                         j(this).parent().parent().fadeOut(150);
     983                jq('#message-threads').before( '<div id="message" class="updated"><p>' + response + '</p></div>' );
     984
     985                jq(checkboxes).each( function(i) {
     986                    if( jq(this).is(':checked') )
     987                        jq(this).parent().parent().fadeOut(150);
    988988                });
    989989            }
    990990
    991             j('div#message').hide().slideDown(150);
    992             j("a#delete_inbox_messages").removeClass('loading');
     991            jq('div#message').hide().slideDown(150);
     992            jq("a#delete_inbox_messages").removeClass('loading');
    993993        });
    994994        return false;
     
    996996
    997997    /* Close site wide notices in the sidebar */
    998     j("a#close-notice").click( function() {
    999         j(this).addClass('loading');
    1000         j('div#sidebar div.error').remove();
    1001 
    1002         j.post( ajaxurl, {
     998    jq("a#close-notice").click( function() {
     999        jq(this).addClass('loading');
     1000        jq('div#sidebar div.error').remove();
     1001
     1002        jq.post( ajaxurl, {
    10031003            action: 'messages_close_notice',
    1004             'notice_id': j('.notice').attr('rel').substr( 2, j('.notice').attr('rel').length )
     1004            'notice_id': jq('.notice').attr('rel').substr( 2, jq('.notice').attr('rel').length )
    10051005        },
    10061006        function(response) {
    1007             j("a#close-notice").removeClass('loading');
     1007            jq("a#close-notice").removeClass('loading');
    10081008
    10091009            if ( response[0] + response[1] == '-1' ) {
    1010                 j('.notice').prepend( response.substr( 2, response.length ) );
    1011                 j( 'div#sidebar div.error').hide().fadeIn( 200 );
     1010                jq('.notice').prepend( response.substr( 2, response.length ) );
     1011                jq( 'div#sidebar div.error').hide().fadeIn( 200 );
    10121012            } else {
    1013                 j('.notice').slideUp( 100 );
     1013                jq('.notice').slideUp( 100 );
    10141014            }
    10151015        });
     
    10181018
    10191019    /* Admin Bar Javascript */
    1020     j("#wp-admin-bar ul.main-nav li").mouseover( function() {
    1021         j(this).addClass('sfhover');
    1022     });
    1023 
    1024     j("#wp-admin-bar ul.main-nav li").mouseout( function() {
    1025         j(this).removeClass('sfhover');
     1020    jq("#wp-admin-bar ul.main-nav li").mouseover( function() {
     1021        jq(this).addClass('sfhover');
     1022    });
     1023
     1024    jq("#wp-admin-bar ul.main-nav li").mouseout( function() {
     1025        jq(this).removeClass('sfhover');
    10261026    });
    10271027
    10281028    /* Clear BP cookies on logout */
    1029     j('a.logout').click( function() {
    1030         j.cookie('bp-activity-scope', null, {path: '/'});
    1031         j.cookie('bp-activity-filter', null, {path: '/'});
    1032         j.cookie('bp-activity-oldestpage', null, {path: '/'});
     1029    jq('a.logout').click( function() {
     1030        jq.cookie('bp-activity-scope', null, {path: '/'});
     1031        jq.cookie('bp-activity-filter', null, {path: '/'});
     1032        jq.cookie('bp-activity-oldestpage', null, {path: '/'});
    10331033
    10341034        var objects = [ 'members', 'groups', 'blogs', 'forums' ];
    1035         j(objects).each( function(i) {
    1036             j.cookie('bp-' + objects[i] + '-scope', null, {path: '/'} );
    1037             j.cookie('bp-' + objects[i] + '-filter', null, {path: '/'} );
    1038             j.cookie('bp-' + objects[i] + '-extras', null, {path: '/'} );
     1035        jq(objects).each( function(i) {
     1036            jq.cookie('bp-' + objects[i] + '-scope', null, {path: '/'} );
     1037            jq.cookie('bp-' + objects[i] + '-filter', null, {path: '/'} );
     1038            jq.cookie('bp-' + objects[i] + '-extras', null, {path: '/'} );
    10391039        });
    10401040    });
     
    10441044function bp_init_activity() {
    10451045    /* Reset the page */
    1046     j.cookie( 'bp-activity-oldestpage', 1, {path: '/'} );
    1047 
    1048     if ( null != j.cookie('bp-activity-filter') && j('#activity-filter-select').length )
    1049         j('#activity-filter-select select option[value=' + j.cookie('bp-activity-filter') + ']').attr( 'selected', 'selected' );
     1046    jq.cookie( 'bp-activity-oldestpage', 1, {path: '/'} );
     1047
     1048    if ( null != jq.cookie('bp-activity-filter') && jq('#activity-filter-select').length )
     1049        jq('#activity-filter-select select option[value=' + jq.cookie('bp-activity-filter') + ']').attr( 'selected', 'selected' );
    10501050
    10511051    /* Activity Tab Set */
    1052     if ( null != j.cookie('bp-activity-scope') && j('div.activity-type-tabs').length ) {
    1053         j('div.activity-type-tabs li').each( function() {
    1054             j(this).removeClass('selected');
    1055         });
    1056         j('li#activity-' + j.cookie('bp-activity-scope') + ', div.item-list-tabs li.current').addClass('selected');
     1052    if ( null != jq.cookie('bp-activity-scope') && jq('div.activity-type-tabs').length ) {
     1053        jq('div.activity-type-tabs li').each( function() {
     1054            jq(this).removeClass('selected');
     1055        });
     1056        jq('li#activity-' + jq.cookie('bp-activity-scope') + ', div.item-list-tabs li.current').addClass('selected');
    10571057    }
    10581058}
     
    10601060/* Setup object scope and filter based on the current cookie settings for the object. */
    10611061function bp_init_objects(objects) {
    1062     j(objects).each( function(i) {
    1063         if ( null != j.cookie('bp-' + objects[i] + '-filter') && j('li#' + objects[i] + '-order-select select').length )
    1064             j('li#' + objects[i] + '-order-select select option[value=' + j.cookie('bp-' + objects[i] + '-filter') + ']').attr( 'selected', 'selected' );
    1065 
    1066         if ( null != j.cookie('bp-' + objects[i] + '-scope') && j('div.' + objects[i]).length ) {
    1067             j('div.item-list-tabs li').each( function() {
    1068                 j(this).removeClass('selected');
     1062    jq(objects).each( function(i) {
     1063        if ( null != jq.cookie('bp-' + objects[i] + '-filter') && jq('li#' + objects[i] + '-order-select select').length )
     1064            jq('li#' + objects[i] + '-order-select select option[value=' + jq.cookie('bp-' + objects[i] + '-filter') + ']').attr( 'selected', 'selected' );
     1065
     1066        if ( null != jq.cookie('bp-' + objects[i] + '-scope') && jq('div.' + objects[i]).length ) {
     1067            jq('div.item-list-tabs li').each( function() {
     1068                jq(this).removeClass('selected');
    10691069            });
    1070             j('div.item-list-tabs li#' + objects[i] + '-' + j.cookie('bp-' + objects[i] + '-scope') + ', div.item-list-tabs#object-nav li.current').addClass('selected');
     1070            jq('div.item-list-tabs li#' + objects[i] + '-' + jq.cookie('bp-' + objects[i] + '-scope') + ', div.item-list-tabs#object-nav li.current').addClass('selected');
    10711071        }
    10721072    });
     
    10781078        return false;
    10791079
    1080     if ( j.query.get('s') )
    1081         search_terms = j.query.get('s');
     1080    if ( jq.query.get('s') )
     1081        search_terms = jq.query.get('s');
    10821082
    10831083    if ( null == scope )
     
    10851085
    10861086    /* Save the settings we want to remain persistent to a cookie */
    1087     j.cookie( 'bp-' + object + '-scope', scope, {path: '/'} );
    1088     j.cookie( 'bp-' + object + '-filter', filter, {path: '/'} );
    1089     j.cookie( 'bp-' + object + '-extras', extras, {path: '/'} );
     1087    jq.cookie( 'bp-' + object + '-scope', scope, {path: '/'} );
     1088    jq.cookie( 'bp-' + object + '-filter', filter, {path: '/'} );
     1089    jq.cookie( 'bp-' + object + '-extras', extras, {path: '/'} );
    10901090
    10911091    /* Set the correct selected nav and filter */
    1092     j('div.item-list-tabs li').each( function() {
    1093         j(this).removeClass('selected');
    1094     });
    1095     j('div.item-list-tabs li#' + object + '-' + scope + ', div.item-list-tabs#object-nav li.current').addClass('selected');
    1096     j('div.item-list-tabs li.selected').addClass('loading');
    1097     j('div.item-list-tabs select option[value=' + filter + ']').attr( 'selected', 'selected' );
     1092    jq('div.item-list-tabs li').each( function() {
     1093        jq(this).removeClass('selected');
     1094    });
     1095    jq('div.item-list-tabs li#' + object + '-' + scope + ', div.item-list-tabs#object-nav li.current').addClass('selected');
     1096    jq('div.item-list-tabs li.selected').addClass('loading');
     1097    jq('div.item-list-tabs select option[value=' + filter + ']').attr( 'selected', 'selected' );
    10981098
    10991099    if ( 'friends' == object )
     
    11031103        bp_ajax_request.abort();
    11041104
    1105     bp_ajax_request = j.post( ajaxurl, {
     1105    bp_ajax_request = jq.post( ajaxurl, {
    11061106        action: object + '_filter',
    11071107        'cookie': encodeURIComponent(document.cookie),
     
    11151115    function(response)
    11161116    {
    1117         j(target).fadeOut( 100, function() {
    1118             j(this).html(response);
    1119             j(this).fadeIn(100);
     1117        jq(target).fadeOut( 100, function() {
     1118            jq(this).html(response);
     1119            jq(this).fadeIn(100);
    11201120        });
    1121         j('div.item-list-tabs li.selected').removeClass('loading');
     1121        jq('div.item-list-tabs li.selected').removeClass('loading');
    11221122    });
    11231123}
     
    11261126function bp_activity_request(scope, filter) {
    11271127    /* Save the type and filter to a session cookie */
    1128     j.cookie( 'bp-activity-scope', scope, {path: '/'} );
    1129     j.cookie( 'bp-activity-filter', filter, {path: '/'} );
    1130     j.cookie( 'bp-activity-oldestpage', 1 );
     1128    jq.cookie( 'bp-activity-scope', scope, {path: '/'} );
     1129    jq.cookie( 'bp-activity-filter', filter, {path: '/'} );
     1130    jq.cookie( 'bp-activity-oldestpage', 1 );
    11311131
    11321132    /* Remove selected and loading classes from tabs */
    1133     j('div.item-list-tabs li').each( function() {
    1134         j(this).removeClass('selected loading');
     1133    jq('div.item-list-tabs li').each( function() {
     1134        jq(this).removeClass('selected loading');
    11351135    });
    11361136    /* Set the correct selected nav and filter */
    1137     j('li#activity-' + scope + ', div.item-list-tabs li.current').addClass('selected');
    1138     j('div#object-nav.item-list-tabs li.selected, div.activity-type-tabs li.selected').addClass('loading');
    1139     j('#activity-filter-select select option[value=' + filter + ']').attr( 'selected', 'selected' );
     1137    jq('li#activity-' + scope + ', div.item-list-tabs li.current').addClass('selected');
     1138    jq('div#object-nav.item-list-tabs li.selected, div.activity-type-tabs li.selected').addClass('loading');
     1139    jq('#activity-filter-select select option[value=' + filter + ']').attr( 'selected', 'selected' );
    11401140
    11411141    /* Reload the activity stream based on the selection */
    1142     j('.widget_bp_activity_widget h2 span.ajax-loader').show();
     1142    jq('.widget_bp_activity_widget h2 span.ajax-loader').show();
    11431143
    11441144    if ( bp_ajax_request )
    11451145        bp_ajax_request.abort();
    11461146
    1147     bp_ajax_request = j.post( ajaxurl, {
     1147    bp_ajax_request = jq.post( ajaxurl, {
    11481148        action: 'activity_widget_filter',
    11491149        'cookie': encodeURIComponent(document.cookie),
    1150         '_wpnonce_activity_filter': j("input#_wpnonce_activity_filter").val(),
     1150        '_wpnonce_activity_filter': jq("input#_wpnonce_activity_filter").val(),
    11511151        'scope': scope,
    11521152        'filter': filter
     
    11541154    function(response)
    11551155    {
    1156         j('.widget_bp_activity_widget h2 span.ajax-loader').hide();
    1157 
    1158         j('div.activity').fadeOut( 100, function() {
    1159             j(this).html(response.contents);
    1160             j(this).fadeIn(100);
     1156        jq('.widget_bp_activity_widget h2 span.ajax-loader').hide();
     1157
     1158        jq('div.activity').fadeOut( 100, function() {
     1159            jq(this).html(response.contents);
     1160            jq(this).fadeIn(100);
    11611161        });
    11621162
    11631163        /* Update the feed link */
    11641164        if ( null != response.feed_url )
    1165             j('.directory div#subnav li.feed a, .home-page div#subnav li.feed a').attr('href', response.feed_url);
    1166 
    1167         j('div.item-list-tabs li.selected').removeClass('loading');
     1165            jq('.directory div#subnav li.feed a, .home-page div#subnav li.feed a').attr('href', response.feed_url);
     1166
     1167        jq('div.item-list-tabs li.selected').removeClass('loading');
    11681168
    11691169        /* Selectively hide comments */
     
    11751175/* Hide long lists of activity comments, only show the latest five root comments. */
    11761176function bp_dtheme_hide_comments() {
    1177     var comments_divs = j('div.activity-comments');
     1177    var comments_divs = jq('div.activity-comments');
    11781178
    11791179    if ( !comments_divs.length )
     
    11811181
    11821182    comments_divs.each( function() {
    1183         if ( j(this).children('ul').children('li').length < 5 ) return;
    1184 
    1185         var comments_div = j(this);
     1183        if ( jq(this).children('ul').children('li').length < 5 ) return;
     1184
     1185        var comments_div = jq(this);
    11861186        var parent_li = comments_div.parents('ul#activity-stream > li');
    1187         var comment_lis = j(this).children('ul').children('li');
     1187        var comment_lis = jq(this).children('ul').children('li');
    11881188        var comment_count = ' ';
    11891189
    1190         if ( j('li#' + parent_li.attr('id') + ' a.acomment-reply span').length )
    1191             var comment_count = j('li#' + parent_li.attr('id') + ' a.acomment-reply span').html();
     1190        if ( jq('li#' + parent_li.attr('id') + ' a.acomment-reply span').length )
     1191            var comment_count = jq('li#' + parent_li.attr('id') + ' a.acomment-reply span').html();
    11921192
    11931193        comment_lis.each( function(i) {
    11941194            /* Show the latest 5 root comments */
    11951195            if ( i < comment_lis.length - 5 ) {
    1196                 j(this).addClass('hidden');
    1197                 j(this).toggle();
     1196                jq(this).addClass('hidden');
     1197                jq(this).toggle();
    11981198
    11991199                if ( !i )
    1200                     j(this).before( '<li class="show-all"><a href="#' + parent_li.attr('id') + '/show-all/" title="' + bp_terms_show_all_comments + '">' + bp_terms_show_all + ' ' + comment_count + ' ' + bp_terms_comments + '</a></li>' );
     1200                    jq(this).before( '<li class="show-all"><a href="#' + parent_li.attr('id') + '/show-all/" title="' + bp_terms_show_all_comments + '">' + bp_terms_show_all + ' ' + comment_count + ' ' + bp_terms_comments + '</a></li>' );
    12011201            }
    12021202        });
  • trunk/bp-themes/bp-default/blogs/create.php

    r2428 r2925  
    11<?php get_header() ?>
    22
    3     <?php do_action( 'bp_before_directory_groups_content' ) ?>
     3    <?php do_action( 'bp_before_directory_blogs_content' ) ?>
    44
    55    <div id="content">
     
    3131    <?php locate_template( array( 'sidebar.php' ), true ) ?>
    3232
    33     <?php do_action( 'bp_after_directory_groups_content' ) ?>
     33    <?php do_action( 'bp_after_directory_blogs_content' ) ?>
    3434
    3535<?php get_footer() ?>
  • trunk/bp-themes/bp-default/forums/forums-loop.php

    r2712 r2925  
    3131            <th id="th-postcount"><?php _e( 'Posts', 'buddypress' ) ?></th>
    3232            <th id="th-freshness"><?php _e( 'Freshness', 'buddypress' ) ?></th>
     33
     34            <?php do_action( 'bp_directory_forums_extra_cell_head' ) ?>
     35
    3336        </tr>
    3437
  • trunk/bp-themes/bp-default/forums/index.php

    r2908 r2925  
    11<?php get_header() ?>
    2 
    3     <?php do_action( 'bp_before_directory_forums_content' ) ?>
    42
    53    <div id="content">
     
    75
    86        <form action="" method="post" id="forums-search-form" class="dir-form">
     7
    98            <h3><?php _e( 'Group Forums Directory', 'buddypress' ) ?><?php if ( is_user_logged_in() ) : ?> &nbsp;<a class="button" href="#new-topic" id="new-topic-button"><?php _e( 'New Topic', 'buddypress' ) ?></a><?php endif; ?></h3>
     9
     10            <?php do_action( 'bp_before_directory_forums_content' ) ?>
    1011
    1112            <div id="forums-dir-search" class="dir-search">
  • trunk/bp-themes/bp-default/groups/index.php

    r2908 r2925  
    1515            <div class="item-list-tabs">
    1616                <ul>
    17                     <li class="selected" id="groups-all"><a href="<?php bp_root_domain() ?>"><?php printf( __( 'All Groups (%s)', 'buddypress' ), bp_get_total_group_count() ) ?></a></li>
     17                    <li class="selected" id="groups-all"><a href="<?php echo bp_get_root_domain() . '/' . BP_GROUPS_SLUG ?>"><?php printf( __( 'All Groups (%s)', 'buddypress' ), bp_get_total_group_count() ) ?></a></li>
    1818
    1919                    <?php if ( is_user_logged_in() && bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ) : ?>
  • trunk/bp-themes/bp-default/members/single/home.php

    r2695 r2925  
    1515                        <?php bp_get_displayed_user_nav() ?>
    1616
    17                         <?php do_action( 'bp_members_directory_member_types' ) ?>
     17                        <?php do_action( 'bp_member_options_nav' ) ?>
    1818                    </ul>
    1919                </div>
  • trunk/bp-themes/bp-default/sidebar.php

    r2631 r2925  
    3838        </p>
    3939
    40         <form name="login-form" id="sidebar-login-form" class="standard-form" action="<?php echo site_url( 'wp-login.php', 'login' ) ?>" method="post">
     40        <form name="login-form" id="sidebar-login-form" class="standard-form" action="<?php echo site_url( 'wp-login.php', 'login_post' ) ?>" method="post">
    4141            <label><?php _e( 'Username', 'buddypress' ) ?><br />
    4242            <input type="text" name="log" id="sidebar-user-login" class="input" value="<?php echo attribute_escape(stripslashes($user_login)); ?>" /></label>
  • trunk/readme.txt

    r2842 r2925  
    22Contributors: apeatling
    33Tags: buddypress, social networking, activity, profiles, messaging, friends, groups, forums, microblogging, twitter, facebook, mingle, social, community, networks, networking, cms
    4 Requires at least: WordPress 2.9.1
    5 Tested up to: WordPress 2.9.2
    6 Stable tag: 1.2.2
     4Requires at least: 2.9.1
     5Tested up to: 2.9.2
     6Stable tag: 1.2.3
    77
    88== Description ==
     
    2121
    2222More and more WordPress with BuddyPress powered sites are popping up. You can take a look at some of the best sites on the <a href="http://buddypress.org/demo/">BuddyPress demo page</a> or the <a href="http://wordpress.org/showcase/flavor/buddypress/">BuddyPress section of the WordPress showcase</a>.
     23
     24<h4>Plugins: Adding So Much More</h4>
     25
     26BuddyPress boasts an ever growing array of new features developed by the awesome plugin development community. Some of most popular BuddyPress plugins currently available are:
     27
     28*   <a href="http://wordpress.org/extend/plugins/wp-fb-autoconnect">WP-FB-AutoConnect</a> - allow your users to instantly log in to your site using their Facebook credentials.
     29*   <a href="http://wordpress.org/extend/plugins/buddypress-like">BuddyPress Like</a> - add a "like" button to site activity.
     30*   <a href="http://wordpress.org/extend/plugins/buddypress-links">BuddyPress Links</a> - rich media embedding for your BuddyPress powered site.
     31*   <a href="http://wordpress.org/extend/plugins/tweetstream">BuddyPress Tweetstream</a> - allow your users to sync and post to their Twitter stream.
     32*   <a href="http://wordpress.org/extend/plugins/facestream">BuddyPress Facestream</a> - allow your users to sync and post to their Facebook stream.
     33*   <a href="http://wordpress.org/extend/plugins/bp-album">BuddyPress Album+</a> - allow your users to upload photos and create albums.
     34*   <a href="http://wordpress.org/extend/plugins/buddypress-group-documents">BuddyPress Group Documents</a> - add file upload and document repositories to your groups.
     35*   <a href="http://wordpress.org/extend/plugins/bp-profile-privacy">BuddyPress Profile Privacy</a> - allow your users to set privacy options on their profile data.
     36*   <a href="http://wordpress.org/extend/plugins/welcome-pack">BuddyPress Welcome Pack</a> - set defaults for new users, auto join them to groups or send welcome messages.
     37*   <a href="http://wordpress.org/extend/plugins/bp-groupblog">BuddyPress Group Blog</a> (WordPress MU only) - allow your groups to include a fully functional WordPress blog.
     38*   <a href="http://wordpress.org/extend/plugins/buddypress-group-wiki/">BuddyPress Group Wiki</a> - add wiki functionality to your groups so all members can contribute to pages.
     39
     40There are already more than 125 BuddyPress plugins available, the list is growing every day. For a full list of plugins, please visit the <a href="http://buddypress.org/extend/plugins/">BuddyPress.org plugins page</a>. You can also install any of these plugins automatically through the plugin installer menu inside of your WordPress installation.
    2341
    2442<h4>More Information</h4>
     
    4462= Can I use my existing WordPress theme? =
    4563
    46 Yes you can. First install and activate BuddyPress, then download and activate the <a href="http://wordpress.org/extend/plugins/bp-template-pack/">template extension pack</a>. This plugin will run you through the process step-by-step.
     64Of course! First install and activate BuddyPress, then download and activate the <a href="http://wordpress.org/extend/plugins/bp-template-pack/">template extension pack</a>. This plugin will run you through the process step-by-step.
     65
     66Be sure to also try out the default theme bundled with BuddyPress. It provides all the awesome features of a standard WordPress blog, but also integrates the BuddyPress features both seamlessly and beautfully. It's also really easy to modify with custom header support, widget support and via a <a href="http://codex.buddypress.org/how-to-guides/building-a-buddypress-child-theme/">child theme</a>.
    4767
    4868= Will this work on standard WordPress and WordPress MU? =
     
    6686BuddyPress subversion trunk can be found at: http://svn.buddypress.org/trunk/
    6787
     88== Screenshots ==
     89
     901. **Activity Streams** - Global, personal and group activity streams with threaded commenting, direct posting, favoriting and @mentions. All with full RSS feed and email notification support.
     912. **Extended Profiles** - Fully editable profile fields allow you to define the fields users can fill in to describe themselves. Tailor profile fields to suit your audience.
     923. **Extensible Groups** - Powerful public, private or hidden groups allow your users to break the discussion down into specific topics. Extend groups with your own custom features using the group extension API.
     934. **Friend Connections** - Let your users make connections so they can track the activity of others, or filter on only those users they care about the most.
     945. **Private Messaging** - Private messaging will allow your users to talk to each other directly, and in private. Not just limited to one on one discussions, your users can send messages to multiple recipients.
     956. **Discussion Forums** - Full powered discussion forums built directly into groups allow for more conventional in-depth conversations.
     967. **WordPress Blogging** - Start a blog built on the best blogging software in the world. Even allow each of your users to start their own full powered WordPress blog (with WordPress MU). Track new posts and comments across your site.
     97
     98== Languages ==
     99
     100BuddyPress is available in more than 20 languages. For more information about BuddyPress in your language please select a langauge site from the list below. Is your language missing? Please send a message to the <a href="http://lists.automattic.com/mailman/listinfo/wp-polyglots">WP-Polygots</a> mailing list and request for your language to be set up.
     101
     102*   <a href="http://br.buddypress.org/">Brasil</a>
     103*   <a href="http://ca.buddypress.org/">Català</a>
     104*   <a href="http://de.buddypress.org/">Deutsch</a>
     105*   <a href="http://es.buddypress.org/">Español</a>
     106*   <a href="http://fr.buddypress.org/">Français</a>
     107*   <a href="http://id.buddypress.org/">Indonesia</a>
     108*   <a href="http://it.buddypress.org/">Italia</a>
     109*   <a href="http://lv.buddypress.org/">Latviešu valodā</a>
     110*   <a href="http://nl.buddypress.org/">Nederland</a>
     111*   <a href="http://pl.buddypress.org/">Polska</a>
     112*   <a href="http://pt.buddypress.org/">Portugal</a>
     113*   <a href="http://ru.buddypress.org/">Русский</a>
     114*   <a href="http://fi.buddypress.org/">Suomi</a>
     115*   <a href="http://th.buddypress.org/">Thai</a>
     116*   <a href="http://uk.buddypress.org/">Україна</a>
     117*   <a href="http://ja.buddypress.org/">日本語</a>
     118*   <a href="http://cn.buddypress.org/">简体中文</a>
     119*   <a href="http://ko.buddypress.org/">한국어</a>
     120*   <a href="http://tw.buddypress.org/">正體中文</a>
     121
     122The <a href="http://i18n.svn.buddypress.org/">BuddyPress langauge file repository</a> includes some language that have not yet set up a localization site.
     123
     124== Upgrade Notice ==
     125
     126= 1.2.2.1 =
     127Fixes a bug where new account activation emails would not be sent correctly. Important upgrade.
     128
    68129== Changelog ==
    69130
Note: See TracChangeset for help on using the changeset viewer.