-
shanebp replied to the topic [Resolved] Display xProfile field groups in the forum How-to & Troubleshooting 10 years, 5 months ago
Try fetching just one field. If you pass in an id, don’t make it a string.
$my_field = xprofile_get_field_data(10);
or
$my_field = xprofile_get_field_data(10, $user_id);
Because you’re in a sidebar, this may not work, but replace ‘Company’ with a field name and try:
$my_field = bp_get_member_profile_data( 'field=Company' );
-
shanebp replied to the topic [Resolved] Display xProfile field groups in the forum How-to & Troubleshooting 10 years, 5 months ago
It seems you are on a member profile page, so try using bp_displayed_user_id() instead.
-
shanebp replied to the topic Translation fails only at "Sitewide Activity" in the forum How-to & Troubleshooting 10 years, 5 months ago
>I also added all gettext filters to the po …without any result.
Odd, simply adding _x:1,2c to Sources keywords in poedit works perfectly for myself and other devs.
If you open a ticket, please mention this discrepancy in results.
-
shanebp replied to the topic Translation fails only at "Sitewide Activity" in the forum How-to & Troubleshooting 10 years, 5 months ago
Just fyi – if you only have a few labels that you want to change, you can use these functions.
https://codex.wordpress.org/Plugin_API/Filter_Reference/gettext
https://codex.wordpress.org/Plugin_API/Filter_Reference/gettext_with_contextIt’s a lot faster than messing with .po files.
But you need to know if the label is using a context parameter.…[Read more] -
shanebp replied to the topic Translation fails only at "Sitewide Activity" in the forum How-to & Troubleshooting 10 years, 5 months ago
You need to add this:
_x:1,2c
To Catalog Properties > Sources keywords in PoEdit.
This is due to the use of the ‘context’ parameter for some titles via ‘_x’
For example, the second element is the context parameter:
_x( 'Sitewide Activity', 'component directory title', 'buddypress' )
Make sure your Sources Keywords has at least these…[Read more]
-
shanebp replied to the topic Remove Friendship Notifications from Activity Stream in the forum How-to & Troubleshooting 10 years, 5 months ago
In this context, component IDs are the name of the component.
I would use the ‘action’ filter and leave out ‘friendship_created’.
Before you make changes, created a template over-ride for the activity-loop template.…[Read more]
-
shanebp replied to the topic Remove Friendship Notifications from Activity Stream in the forum How-to & Troubleshooting 10 years, 5 months ago
Take a look at:
In particular: filtering-options re action and object, and filtering-examples
-
shanebp replied to the topic BP site with 90,000+ users breaks when deleting user from backend in the forum How-to & Troubleshooting 10 years, 5 months ago
Take a look at wp-admin/users.php ~L. 249 re wp_dropdown_users().
There are no hooks, so it’s a core file hack situation – eek.
Probably have to replace wp_dropdown_users() with a dummy select.
-
shanebp replied to the topic Error at buddypress group page in the forum How-to & Troubleshooting 10 years, 5 months ago
Sounds like a theme issue.
To confirm, switch to a WP theme like TwentyTwelve. -
shanebp replied to the topic How do I make line/paragraph breaks in Group posts? in the forum How-to & Troubleshooting 10 years, 5 months ago
Have you tried filtering the output through nl2br() ?
-
shanebp replied to the topic BP site with 90,000+ users breaks when deleting user from backend in the forum How-to & Troubleshooting 10 years, 5 months ago
I think that is a WP issue rather than a BP issue.
Have you tried deleting a user from the front-end, on their profile Settings > Delete Account ?
-
shanebp replied to the topic How to force photo-visibility settings in the forum How-to & Troubleshooting 10 years, 5 months ago
BuddyPress does not provide photo albums.
So you are using a plugin or theme that adds that functionality.
You should contact the creators of that plugin or theme.
-
shanebp replied to the topic Activating existing users in the forum How-to & Troubleshooting 10 years, 5 months ago
> Do you think you could tell me where exactly I should paste the code?
No. We don’t know what you’re trying to do.
But you definitely don’t want to paste it into a template.
You want to put it in theme functions.php or bp-custom.php
Maybe you want to run it once to handle existing users.
Maybe you want to run it in certain situations, for…[Read more]
-
shanebp replied to the topic Activating existing users in the forum How-to & Troubleshooting 10 years, 5 months ago
There is no need to do a direct insert to the database.
Use the provided function instead:
bp_update_user_last_activity( $user_id );
It will create a last_activity entry for that user with the current time on your server.
So the user will then be ‘active’.You can use the function in a loop to batch process users.
-
shanebp started the topic Custom Headers for Groups plugin in the forum Third Party Plugins 10 years, 5 months ago
PhiloPress announces the release of a new premium plugin: BuddyGroupHeaders
It allows site admins to create a completely customized header area for each group.
Thanks to @mercime and @henrywright for their feedback and suggestions.
-
shanebp replied to the topic Noob Question – How to Import Users as Members? in the forum How-to & Troubleshooting 10 years, 5 months ago
hlna’s code uses the old method for storing last_activity.
It was appropriate when written, but is no longer valid.It can easily be updated by following the instructions here re new API functions:
User last_activity data and BuddyPress 2.0 -
shanebp replied to the topic [Resolved] Notify by Email when xProfile Updated in the forum How-to & Troubleshooting 10 years, 5 months ago
Total rewrite.
The hook runs after a BP profile is updated.
Write a function to see what was changed and then maybe send an email.This should get you started…
function whelund_profile_updated(bp_displayed_user_id(), $posted_field_ids, $errors, $old_values, $new_values) {
[Read more]
// dump the vars for orientation on what to write in the function… -
shanebp replied to the topic [Resolved] Notify by Email when xProfile Updated in the forum How-to & Troubleshooting 10 years, 5 months ago
The hook you want is xprofile_updated_profile
Full hook:
do_action( 'xprofile_updated_profile', bp_displayed_user_id(), $posted_field_ids, $errors, $old_values, $new_values );
See buddypressbp-xprofilebp-xprofile-screens.php
[ Please use a service like gist or pastebin to share large code segments. ]
-
shanebp replied to the topic Groups: Are replies not suppose to be visible? in the forum How-to & Troubleshooting 10 years, 5 months ago
Comments in all activity streams, including groups are not visible to the non-logged-in.
You can change that, but it will change it for all activity streams.
You need to create a template overload of this file:
bp-templatesbp-legacybuddypressactivityentry.phpAnd then make your changes starting at ~Line 88.
Do not simply remove…[Read more] - Load More
@shanebp
Active 4 hours, 16 minutes ago