Replies
- Brajesh Singh on March 16, 2016 at 7:07 pm in reply to: [Resolved] Buddpress Change Username Blank Screen #3046
Hi Kenneth,
Thank you for your patience. Please upgrade to 1.2.1 and It is fixed. Please do let me know if that works for you or not?Thank you
Brajesh - Brajesh Singh on March 16, 2016 at 6:20 pm in reply to: [Resolved] Buddpress Change Username Blank Screen #3044
Thank you Kenneth,
Just noticed it on BP 2.5+ It has issues with loading templates. I am working on it, will have a fix in 30 mins to an hour. It is happening when the theme compat is being triggered. - Brajesh Singh on March 16, 2016 at 6:03 pm in reply to: [Resolved] Buddpress Change Username Blank Screen #3042
Hi Kenneth,
Welcome to BuddyDev.
Which version of BuddyPress & WordPress are you using? Also, are you using latest version of change username plugin?Thank you
Brajesh - Brajesh Singh on March 16, 2016 at 1:38 pm in reply to: [Resolved] [Blog Categories For Groups] Auto-creating & selecting cats for groups #3039
Hi Hamish,
You will need to translate using languages file. - Brajesh Singh on March 16, 2016 at 12:44 pm in reply to: [Resolved] [Blog Categories For Groups] Auto-creating & selecting cats for groups #3037
Hi Hamish,
Welcome to BuddyDev.
Thank you for asking it. I had posted the code somewhere but could not find it on the forum, so posting again. Please put these codes in your bp-custom.php1. Let us write a function to create a category with group name and save it as bcg category for group(you won’t need the code you have used in the above post)
/** * Create a Category with group name and set as BCG category * * @param type $group * @return type */ function bcg_custom_create_group_category( $group ) { $cat = wp_insert_term( $group->name, 'category' ); if ( ! is_wp_error( $cat ) ) { //insert it to group meta for blog categories groups_update_groupmeta( $group->id, 'group_blog_cats', array( 0 => $cat['term_id'] ) ); return array( 0 => $cat['term_id'] ); } else { //is it existing $term = get_term_by( 'slug', $group->slug, 'category' ); if ( $term ) { groups_update_groupmeta( $group->id, 'group_blog_cats', array( 0 => $term->term_id ) ); return array( 0 => $term->term_id ); } } return false; }
2. Let us Create the category and setup it when the group is create
//Blog Categories for Groups, auto category creation and association function bcg_custom_create_group_name_category( $group_id, $group ) { bcg_custom_create_group_category( $group ); } add_action( 'groups_created_group', 'bcg_custom_create_group_name_category', 10, 2 );
3. Disable the Blog Categories screen on Create Group and Grou Admin settings page
//modify extensions to hide the create/manage screen function bcg_custom_modify_extension( &$extension ) { $extension->enable_create_step = false; // enable create step $extension->enable_edit_item = false; // If } add_action( 'bcg_created_group_extension', 'bcg_custom_modify_extension' );
4. Modify the BCG form to add a hidden field and set post status to publish(we will use hidden field to set the forced category)
function bcg_custom_forms_args( $args ) { $args['tax'] = array(); $cusom_fields = isset( $args['custom_fields'] ) ? $args['custom_fields']: array() ; $group = groups_get_current_group(); if( empty( $group ) || empty( $group->id ) ) { return $args; } $cats = bcg_get_categories( $group->id ); //if there is no category set if( empty( $cats ) ) { //create if not exists $cats = bcg_custom_create_group_category( $group ); } if ( empty( $cats ) ) { return $args; } $cusom_fields['_bcg_selected_category'] = array( 'type' => 'hidden', 'default' => $cats[0], 'label' => '' ); $args['custom_fields'] = $cusom_fields; $args['post_status'] = 'publish'; return $args; } add_filter( 'bcg_form_args', 'bcg_custom_forms_args' );
5. Set the Category
//set default categorywhen post is being saved function bcg_add_default_category_to_post( $post_id ) { $post = get_post( $post_id ); if ( ! $post ) { return ; } $custom_fields = isset( $_POST['custom_fields'] ) ? $_POST['custom_fields'] : array(); if ( empty( $custom_fields ) ) { return ; } if ( ! empty( $custom_fields[ '_bcg_selected_category'] ) ) { $term_id = absint( $custom_fields['_bcg_selected_category'] ); //i know there is a loop here that can allow other categories to be asosciated too //to avoid that we need the group id in future wp_set_object_terms( $post->ID, $term_id, 'category'); } } add_action( 'bsfep_post_saved', 'bcg_add_default_category_to_post' );
That will do everything.
It will remove the screens and auto set category name as well as set category for posts.
Please do let me know if that works for you or not?
Thank you
Brajesh - Brajesh Singh on March 16, 2016 at 5:42 am in reply to: [Resolved] Open member gallery outside Buddypress #3035
Hi Piotr,
Thank you for replying.I am glad you have fixed it. I may not agree with the way you have done it( sorry about that, in my personal view, urls are less important than the actual display in this case), but I am happy it is working.
I am sure others will find it useful. I will still recommend doing it on plugins.php template level to avoid complexity. Probably, I will be putting an example in future to make it easy 🙂
Thank you.
Marking as resolved. Hi Christian,
Welcome to BuddyDev forums.
1. yes, It can be disabled. I made a small mistake and that’s why you are not able to disable it. I am pushing a MediaPress release in next 3-4 hours, That has it fixed(It is already fixed on our development repo on github)About Posting:-
We are using the implementation of BuddyPress and do not add our own js to avoid any theme conflict. The current strategy allows us to be compatible with almost 100% of the themes. Any theme that works with BuddyPress works with MediaPress without any issue.I understand that it should either allow posting just the media or the media should not be unattached. It seems to be an implementation issue with theme. I just checked and see that even an empty content is sent to server and that is a pure bad implementation for the theme compat. Either it should allow posting empty activity or there should not be any request to server.
I am looking at it and will have a solution for this but it may not come in today’s update.
Thank you
Brajesh- Brajesh Singh on March 16, 2016 at 5:23 am in reply to: [Resolved] Having problems with showing BuddyBlog posts in activity feeds #3033
Hi Jon,
This plugin piggybacks on BuddyPress Blog activity tracking, so yes, you need to have that checked in the BuddyPress Components page.I this issue resolved for you now?
- Brajesh Singh on March 15, 2016 at 7:11 pm in reply to: [Resolved] Open member gallery outside Buddypress #3028
Hi Piotr,
The above changes are not going to help with the URL. It will allow you to use any type of template you want to use. I am using a fullpage template without member header in my case and that is working for me.PLease note that gallery urls are dependent on the components they are associated with. User galleries(profile galleries) will have members/mediapress(or the slug of your chice) in the url. Only sitewide gallery will have no members part in their url. I am sorry if that does not suit your need.
I thought you wanted to change the Layout/View of the single gallery screen which can be done via plugins.php by removing member header etc.
- Brajesh Singh on March 15, 2016 at 6:28 pm in reply to: Media Upload to a Group from User Activity Stream #3027
Hi Leo,
I am sorry for the delayed reply.
I understand the issue. It is happening when the media is uploaded from sitewide activity stream.We will need to move the media to group when the activity is published(we can not guess initialy where the media is going, so we keep it in user wall gallery). I am working on a way to write this.
This is one of the reasons why MediaPress 1.0.4 is delayed. I will update you asap I am able to fix it.
Thank you
Brajesh