-
Henry Wright replied to the topic Modify the activity loop in the forum How-to & Troubleshooting 10 years, 12 months ago
/wp-content/plugin/buddypress/bp-activity/activity-template.php is a core file and you are indeed right to think that any changes you make will be overwritten when you upgrade the plugin.
As I mentioned earlier, you should modify your activity template (sorry for not being clearer). The link I provided (to the BuddyPress Template Hierarchy)…[Read more]
-
Henry Wright replied to the topic How to get user id of activity in the forum How-to & Troubleshooting 10 years, 12 months ago
-
Henry Wright replied to the topic How to get user id of activity in the forum How-to & Troubleshooting 10 years, 12 months ago
@arcangelgirl great to hear you got it working! The same idea will apply to the activity stream. You’ll need to make sure you’re using
bp_get_activity_user_id()in the right place. -
Henry Wright replied to the topic Modify the activity loop in the forum How-to & Troubleshooting 10 years, 12 months ago
I do not want to ‘add’ new activity. I just want that when one visits example.com/activity, it displays… …all updates in private/ hidden groups where the concerned person is a member (this is NOT displayed currently.) How do I do that?
You have to ‘add’ the new activity.
Regarding the second bullet point, you’d need to modify your act…[Read more]
-
Henry Wright replied to the topic How to get user id of activity in the forum How-to & Troubleshooting 10 years, 12 months ago
In the case of private messages,
bp_get_the_thread_message_sender_id()is the function you should be using. The problem might be related to where you’re calling from (i.e. the member’s ID might not be accessible at the point where you are using the function).For example, the
bp_get_the_thread_message_sender_id()function must be used within a…[Read more] -
Henry Wright replied to the topic How to make section of profile private? in the forum How-to & Troubleshooting 10 years, 12 months ago
You could be right. I think
bp_core_remove_nav_item()might do a little more than just visually removing an item from the member’s nav menu.If it helps, this is the method that adds the item to the nav menu.
-
Henry Wright replied to the topic How to make section of profile private? in the forum How-to & Troubleshooting 10 years, 12 months ago
You could be right. I think
bp_core_remove_nav_item()might do a little more than just visually removing an item from the member’s nav menu. -
Henry Wright replied to the topic How to make section of profile private? in the forum How-to & Troubleshooting 10 years, 12 months ago
@shanebp completely forgot about
bp_is_my_profile()😀 -
Henry Wright replied to the topic How to make section of profile private? in the forum How-to & Troubleshooting 10 years, 12 months ago
Try changing:
// Bail if not the achievements page.
if ( bp_current_action() != 'achievements' )
return;to:
if ( bp_is_user() && bp_is_current_component( 'achievements' ) && bp_is_current_action( 'all' ) )
return; -
Henry Wright replied to the topic How to make section of profile private? in the forum How-to & Troubleshooting 10 years, 12 months ago
I experimented with the code but couldn’t get it to work
Looking into it now…
—
As an aside, whilst looking through the plugin’s code, I noticed that endpoints (example.com/author/username/achievements) are used if you ever have BuddyPress disabled. Just something to keep in mind.
-
Henry Wright replied to the topic How to make section of profile private? in the forum How-to & Troubleshooting 10 years, 12 months ago
Hi @screampuff
You can make that link private by doing something like this:
function screampuff_hide_achi() {
// Bail if the current user is the displayed user.
if ( bp_loggedin_user_id() == bp_displayed_user_id() )
return;// Bail if the current user is an admin.
if ( current_user_can( 'manage_options' ) )…[Read more] -
Henry Wright replied to the topic How to make section of profile private? in the forum How-to & Troubleshooting 10 years, 12 months ago
Hi @screampuff
You can make that link private by doing something like this:
function screampuff_hide_achi() {
// Bail if the current user is the displayed user.
if ( bp_loggedin_user_id() == bp_displayed_user_id() )
return;// Bail if the current user is an admin.
if ( current_user_can( 'manage_options' ) )…[Read more] -
Henry Wright replied to the topic How to make section of profile private? in the forum How-to & Troubleshooting 10 years, 12 months ago
Hi @screampuff
You can make that link private by doing something like this:
function screampuff_hide_achi() {
// Bail if the current user is the displayed user.
if ( bp_loggedin_user_id() == bp_displayed_user_id() )
return;// Bail if the current user is an admin.
if ( current_user_can( 'manage_options' ) )…[Read more] -
Henry Wright replied to the topic How to get user id of activity in the forum How-to & Troubleshooting 10 years, 12 months ago
bp_get_activity_user_id()is the function that you should be using. What does it return? -
Henry Wright replied to the topic Modify the activity loop in the forum How-to & Troubleshooting 10 years, 12 months ago
Hi @deshmukh
You can add items to the activity stream using
bp_activity_add(). You’d write a custom function and hook it to the relevant action which fires when a group message has been posted (see a)
Thedisplay_commentsparameter will help you here. You’ll need to changethreadedtostream(see b)Refs:
a)…[Read more]
-
Henry Wright replied to the topic How to import WordPress User First, Last, Description to BP with MySQL in the forum How-to & Troubleshooting 10 years, 12 months ago
-
Henry Wright replied to the topic How to import WordPress User First, Last, Description to BP with MySQL in the forum How-to & Troubleshooting 10 years, 12 months ago
Hi @neosnc
Thanks for sharing. Importers are always welcome. Perhaps you’d like to make the importer available as a plugin?
-
Henry Wright replied to the topic ajax problem in the forum How-to & Troubleshooting 10 years, 12 months ago
Hi @vl4d
You’ll need to include the specifics of your problem in order for the guys here to give useful help. AJAX problems can be very broad so suggesting a fix will be difficult on the info you’ve given.
-
Henry Wright replied to the topic Show profile fields in description/ excerpt in the forum How-to & Troubleshooting 10 years, 12 months ago
You’ll need to modify your members template. Check out the BuddyPress Template Hierarchy for more info on the template system.
To show a specific profile field inside the loop, you can just do:
bp_member_profile_data( 'field=the field name' ); -
Henry Wright replied to the topic Edit Profile Redirects to different page in the forum How-to & Troubleshooting 10 years, 12 months ago
What should it be using?
Do you mean which redirection function? Either is fine – but my point was, the offending code will likely involve one of those functions. I thought it might be helpful me mentioning them if you were trying to debug…
Your best bet is to contact the theme or plugin author (as @shanebp mentioned). They’ll probably be…[Read more]
- Load More
@henrywright
Active 1 year, 10 months ago