Replies
- Brajesh Singh on June 30, 2016 at 9:37 am in reply to: [Resolved] A very simple thing, but I can't find how to do it anywhere #4479
Hi Lee,
In case of BuddyPress, you will have to know a few functions. I will add a few example belowbp_is_user() -> is used to check if we are on a user page
bp_is_user_[component nanme]<- Replavce with actual component to check if we are on a user component. e.g. bp_is_user_activity() bp_is_user_groups() bp_is_user_messages() etc To get the id of the user whose profile we are viewing $user_id = bp_displayed_user_id(); We can also check which sub nav of the current component a user is viewing using bp_current_action() and bp_is_current_action() To redirect, you can use bp_core_redirect( $url ) Now, after looking at these functions, we can write the following code for your above need.
function buddydev_custom_redirect() { //step 1, check if we are on a page that needs the redirection //This can be handled in two ways, ////depending on how many redirect you want to add for various pages. //if the number of redirects are too many, ////It is helpful to use negative logic like //// if( not_my_page ) { return ;} //for this simpel case if ( bp_is_user_activity() && bp_is_current_action( 'mentions' ) ) { $redirect_to = bp_core_get_user_domain( bp_displayed_user_id() );//profile bp_core_redirect( $redirect_to ); } } add_action( 'bp_actions', 'buddydev_custom_redirect', 0 );I hope it helps.
- This reply was modified 9 years, 11 months ago by
Brajesh Singh.
- This reply was modified 9 years, 11 months ago by
- Brajesh Singh on June 30, 2016 at 7:54 am in reply to: BP Member Type Generator & Xprofile Member Type Field #4477
Marking it as closed as per the other thread
- Brajesh Singh on June 30, 2016 at 7:54 am in reply to: [Resolved] BP-Member Type Default Type,with member type generator and hidden profile fields #4476
Hi,
Thank you for posting.1. You don’t need the Non editable profile field plugin, just do not install/activate or use the Member type field (It is not required as a field if only admin can change it)
Here is the code you can put in your bp-custom.php to safely update the default member type when teh user account is activated.
function buddydev_set_member_type( $user_id ) { $member_type = 'student';//change with the unique slug of your member type bp_set_member_type( $user_id, $member_type ); } add_action( 'bp_core_activated_user', 'buddydev_set_member_type', 0 );Hope that helps.
Regards
Brajesh Hi SN,
I am sorry for the delayed reply.
The changed file should be namedbuddyblog-nl_NL.poif your locale is set top ‘nl_NL’
- Brajesh Singh on June 29, 2016 at 10:21 am in reply to: Need help with links, BuddyPress Notify Post Author on Blog Comment #4464
Sorry, I could not work on it. I will today.
Thank you
Brajesh Thank you. I will advise to wait a little . I am releasing on my themes and it does have a very good looking profile/directory and compatibility with most of the BuddyPress plugins in a good way.
Looking at the screenshot it seems, It will suit you 🙂
- Brajesh Singh on June 29, 2016 at 9:49 am in reply to: [Resolved] Display multiple post types on Posts tab (BuddyBlog) #4461
@clyn,
Let us handle it on your own thread. Please do not repone resolved threads. Hope you don’t mind that.
Closing it here.
https://buddydev.com/support/forums/topic/buddyblog-translate-error-hide-editor-category-and-tag-display/Thank you
Brajesh - Brajesh Singh on June 29, 2016 at 9:47 am in reply to: Conflict Between Activity As Wire and BuddyPress Activity Plus #4460
Hi Lee,
I will look at this and update you. I am sorry but my hands are full and could not find time to explore the integration. - Brajesh Singh on June 29, 2016 at 9:45 am in reply to: Buddyblog Translate Error, Hide Editor, Category and Tag Display #4459
Hi,
I am sorry to hear about your experience with RT Media.I am also sorry that we did not allow adding from url yet. It is coming to MediaPress in September.
Now, Let us see the issues, you want simple form. Please copy this file
https://github.com/sbrajesh/bp-simple-front-end-post/blob/master/form.php to
yourtheme/feposting/form.phpNow, Please change this line
https://github.com/sbrajesh/bp-simple-front-end-post/blob/master/form.php#L27
to
<textarea name='bp_simple_post_text'><?php echo $content;?></textarea>That will remove the current visual editor and replace that with the simple form.
You can make any modifications here as long as yolu do not change the name of the form elements.
Please do let me know if it works fro you or not?
Thank you
Brajesh - Brajesh Singh on June 29, 2016 at 9:28 am in reply to: BuddyPress Activity Comment Notifier update issue #4458
Hi Gabry,
Thank you for the details.Is the notifications component enabled on your BuddyPress install.
The above error seems to have happened while upgrading to 2.6.0. Can yo please check again if the errors are still happening?. It seems to be working fine for me.
Please try again and let me know.
Thank you
Brajesh