Replies
- Brajesh Singh on November 16, 2015 at 7:49 am in reply to: [Resolved] Custom BP Groups Tab/Page #1568
Thank you.
We need some way to connect a page/post to Group. Easy solution will be adding a meta box in the group admin page and allowing site admins to link a page to group.
We can store the page_id in meta and then while displaying fetch and show that content.
Hi Marc,
Welcome to BuddyDev forums.I just had a look at the screenshot and it seems you are using older version of MediaPress. This bug was fixed around a month ago. Can you please download afresh copy of MediaPress and upgrade? That should fix the issue.
PS: If you upgrade, Please make sure to visit MediaPress->settings( we have added a lot of new settings ) and enable/disable and save them.
Please let me know if that works for you or not?
Thank you
BrajeshHi John,
I am sorry for the trouble. I see a javascript error there on registration page.Please upgrade to the latest version and the javascript error will be gone. That should make it work. Please do let me know if that works or not?
- Brajesh Singh on November 15, 2015 at 9:22 pm in reply to: [Resolved] BuddyPress Editable Activity To-dos #1560
Seems like the same selector issue as before. I have tested with template pack, so did not notice that. will be updating soon.
- Brajesh Singh on November 15, 2015 at 9:20 pm in reply to: [Resolved] Hiding empty member profile cover image #1558
Hi Tony,
Thank you. I am glad I could help 🙂
Will be certainly opening a ticket on BuddyPress trac in a day or 2 regrading the same as it will be very useful if there was simple way to do it.Marking this topic as resolved now.
Thank you
Brajesh - Brajesh Singh on November 15, 2015 at 3:17 pm in reply to: [Resolved] BuddyPress Editable Activity To-dos #1554
Checked there and I see it is not working. I hadn’t tested on group but going to do now.
- This reply was modified 9 years, 2 months ago by Brajesh Singh.
- Brajesh Singh on November 15, 2015 at 2:56 pm in reply to: [Resolved] Hiding empty member profile cover image #1552
Hi Tony,
Welcome to BuddyDev and thank you for asking this.There are multiple ways to do it.
1. Not that good but you will not need to touch any template file.
We can put the following in our bp-custom.php/** * Check if user has uploaded cover * * @param type $user_id * @return boolean */ function buddydev_user_has_uploaded_cover( $user_id ) { $cover_image = bp_attachments_get_attachment( 'url', array( 'object_dir' => 'members', 'item_id' => $user_id, ) ); if( ! empty( $cover_image ) ) { return true; } return false; } /** * We use it to filter on 'bp_is_profile_cover_image_active' to enable/disable the cover display * * @param type $enabled * @return boolean */ function buddydev_check_for_uploaded_cover( $enabled ) { if ( ! bp_is_user() ) { return $enabled; } $user_id = bp_displayed_user_id(); if( buddydev_user_has_uploaded_cover( $user_id ) ){ return $enabled; } return false; //now, we need to check if the user has uploade image or not } // a superbad hack since BuddyPress does not provide any specific hook function buddydev_enable_cover_hook() { add_filter( 'bp_is_profile_cover_image_active', 'buddydev_check_for_uploaded_cover' ); } add_action( 'bp_before_member_home_content', 'buddydev_enable_cover_hook' ); //disable it to avoid any sideecct on menus //and we remove it immediately after header is loaded function buddydev_disable_cover_hook() { if( has_filter( 'bp_is_profile_cover_image_active', 'buddydev_check_for_uploaded_cover' ) ) { remove_filter( 'bp_is_profile_cover_image_active', 'buddydev_check_for_uploaded_cover' ); } } add_action( 'bp_before_member_header', 'buddydev_disable_cover_hook' );
This works with template pack and will work with any theme.
I personally don’t recommend this approach as it is very hakish. The reason we do it like above is BuddyPress template pack or BuddyPress is not giving us a separate function/hook to disable loading the cover-header template only. It uses same function everywhere, If we do filter on it everywhere, a user will not be able to see the upload cover photo link.
The better approach is to use only one function from my above code
/** * Check if user has uploaded cover * * @param type $user_id * @return boolean */ function buddydev_user_has_uploaded_cover( $user_id ) { $cover_image = bp_attachments_get_attachment( 'url', array( 'object_dir' => 'members', 'item_id' => $user_id, ) ); if( ! empty( $cover_image ) ) { return true; } return false; }
and then look in members/single/home.php for this line
<?php /** * If the cover image feature is enabled, use a specific header */ if ( bp_displayed_user_use_cover_image_header() ) : bp_get_template_part( 'members/single/cover-image-header' ); else : bp_get_template_part( 'members/single/member-header' ); endif; ?>
and change that to
<?php /** * If the cover image feature is enabled, use a specific header */ if ( buddydev_user_has_uploaded_cover( bp_displayed_user_id() ) ) : bp_get_template_part( 'members/single/cover-image-header' ); else : bp_get_template_part( 'members/single/member-header' ); endif; ?>
That is much more meaningful and clean solution.
Hope that helps.
Please do let me know how it goes with you.
Regards
Brajesh - Brajesh Singh on November 15, 2015 at 1:58 pm in reply to: [Resolved] BuddyPress Editable Activity To-dos #1549
Can you please check that again? seems working for me here.
- Brajesh Singh on November 15, 2015 at 1:50 pm in reply to: [Resolved] Language files not "taking" #1546
Thank you for the generosity Jan.
Marking this topic as resolved now.
Thank You again
Brajesh - Brajesh Singh on November 15, 2015 at 1:38 pm in reply to: [Resolved] Language files not "taking" #1544
Thank you. You have helped a lot and it is your patience and continuous feedback that we got it resolved.
You deserve my heartfelt gratitude 🙂