Add search support in Ajax "Load More" and "Load Newest" activity actions

If a search is performed in activities using the query string "?s=search_terms", make sure the search terms are sent in the ajax arguments of the "Load More" and the "Load Newest" actions.

Fixes #5779

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8817 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Do not add "new_member" activities if xProfile component is disabled

In Members component, bp_core_new_user_activity() automatically creates an "xProfile" activity item ("new_member" type) as soon as a user account is activated. If this happens when the xProfile component is disabled, the proper activity action callback is not available, as a result an empty string is saved in the action field of the activity table. On front-end and back-end, these mini activities are displayed without any actions.

This is a temporary fix for 2.1, we will think about something more substantial for 2.2.

See #5807

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8818 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Introduce bp_the_profile_field_ids(), and use as appropriate throughout BP

The POST routine run when editing one's xprofile-powered profile (or
registering for an account when the registration form includes xprofile fields)
works in part by sending a list of field IDs in the 'field_ids' <input> element.
These field IDs are then used to decide which POST keys to look for when saving
submitted profile values. Historically, the function powering this field_ids
element has been bp_the_profile_group_field_ids(), which pulls up only the
field IDs from a single field group. Normally this works fine, because the
typical Profile > Edit screen only allows for the editing of a single field
group at a time. However, the introduction in BP 2.0 of Settings > Profile
demonstrates that this technique breaks when attempting to save more than one
field group at a time.

The new bp_the_profile_field_ids() replaces this logic by pulling up all the
field_ids from all the groups in the $profile_template global object.

In order to provide for backward compatibility with themes that may have
overridden the modified templates (in particular, members/single/settings/profile.php),
we add logic to the Settings > Profile save routine that looks for any
submitted profile fields that are not present in the field_ids array.

Fixes #5666

Props boonebgorges, r-a-y

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8819 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
In `bp_core_load_template()`, save a `locate_template()` call.

When the current theme isn't the bp-default theme (or a deriviative), we do
not need to attempt to find a bp-default template since it will not exist.

This saves us an unnecessary `locate_template()` call and a few
`file_exists()` checks.

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8820 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
In `bp_core_load_template()`, reset post globals if we're on a non-directory page.

If we're on a non-directory page, we are faking a WordPress page, so we
must reset the WordPress post globals to avoid notices from appearing.  The
reset is done with the `bp_theme_compat_reset_post()` function and notably
fixes notices when the root profiles feature is toggled.

Commit also removes an unnecessary database query to determine whether
we're on a BuddyPress directory page.  WordPress should have already made
this determination before BuddyPress has reached this point in
`bp_core_load_template()`.

Fixes #5241.

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8821 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
xProfile: fix typo in `bp_get_the_profile_field_ids` filter name.

See r8819

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8822 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Pass the proper user_id when setting up xprofile meta boxes on the Community Profile Dashboard panel

The default value, bp_displayed_user_id(), is not defined at this point, so we
must manually pass the $user_id.

Fixes #5809

Props Offereins

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8823 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Only use 'Photo' in Group admin tabs.

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8824 cdf35c40-ae34-48e0-9cc9-0c9da1808c22