Replies
You can put this code in your bp-custom.php or theme’s functions.php
It will be only injected on register page. Yes, The display name will be set to username.
It has no relation with change username plugin, so will certainly work with that without any issue. Please give it a try and let me know.
PS: Instead of hiding on profile edit, why don’t you make the firstname field non editable, A user will not be able to change it after registration. You can use my other plugin Non Editable Profile field for the same.
Hi Christopher,
Thank you for asking and posting the code.
Here is the code that I had posted on our old forum for one of our members and it still works. It does not need you to change cssfunction buddydev_disable_firstname() { ?> <script type="text/javascript"> jQuery(document).ready(function(){ var jq=jQuery; jq("#signup_username").on("blur",function(){ jq("#field_1").val(jq("#signup_username").val()); }); }); </script> <?php } add_action( 'bp_after_register_page', 'buddydev_disable_firstname');It is almost same as yours, just does not need any css modification.
Hope that helps.
Hi Markus,
My apologies for the delayed reply.The plugin does not contain login window. It is easy to implement login but I haven’t done that due to design issues.
What do you think will be the best way to have it? How do you imagine for your community(I need design ideas here). please do let me know and I will do it.
- Brajesh Singh on January 14, 2016 at 2:38 pm in reply to: [Resolved] Bug with featured image – BuddyBlog / Simple Front End Post. #2317
Hi Rodolfo,
Which version of BuddyPress & WordPress are you using? Is it a multisite install? Also, the user posting was a normal user or admin? - Brajesh Singh on January 14, 2016 at 2:37 pm in reply to: [Resolved] How to modify wp-admin-bar-my-account? #2316
Just did it
https://buddypress.trac.wordpress.org/ticket/6824 🙂 - Brajesh Singh on January 13, 2016 at 5:58 pm in reply to: [Resolved] BBpress – restrict topic creation #2311
You are most welcome. Glad, I was able to help 🙂
- Brajesh Singh on January 13, 2016 at 5:58 pm in reply to: [Resolved] BBpress Thread Prefix Plugin Idea #2310
Thank you Joshua.
I looked at it. Looks perfect to me 🙂 - Brajesh Singh on January 13, 2016 at 12:46 pm in reply to: [Resolved] How to modify wp-admin-bar-my-account? #2307
Thank Christopher for taking time to reply. Appreciate it 🙂
PS: I wrote a blog post yesterday to make t available for everyone. Thank you Hans for bringing it 🙂
https://buddydev.com/buddypress/enhancing-my-account-menu-with-buddypress-in-the-adminbar/ - Brajesh Singh on January 13, 2016 at 10:25 am in reply to: [Resolved] BBpress – restrict topic creation #2306
Hi Joshua,
I have updated the code.
There was a logical issue where I used bpp_is_forum() that does not check for current forum just the post type. Have updated the code now. - Brajesh Singh on January 12, 2016 at 9:11 pm in reply to: [Resolved] BBpress – restrict topic creation #2300
Hi Joshua,
Thank you.
You can put the following code in your theme’s functions.php and it will workfunction buddydev_bbp_restrict_topic_creation( $can ) { $forum_id = 222;//change your forum id if ( ! bbp_is_user_keymaster() && bbp_is_single_forum() && $forum_id == bbp_get_forum_id() ) { $can = false; } return $can; } add_filter( 'bbp_current_user_can_publish_topics', 'buddydev_bbp_restrict_topic_creation' ); function buddydev_restrict_from_posting_topic( $forum_id ) { $restricted_forum_id = 222; if ( ! bbp_is_user_keymaster() && $forum_id == $restricted_forum_id ) { //set error on bbpress and it will not allow creating topic //not the best idea but I personaly don't like the way bbpress does not provide any forum info at other places to hook bbp_add_error( 403, __( 'Not allowed' ) ); } } add_action( 'bbp_new_topic_pre_extras', 'buddydev_restrict_from_posting_topic' );//The first filter prevents showing the topic creation form on single forum screen. The second action hook checks at the time of publish and restricts. Most of the time, the first one will suffice but that just hides the form, so I used the other hook to make sure the user is never able to post new topic.
Please let me know how it goes.
- This reply was modified 9 years, 10 months ago by
Brajesh Singh. Reason: Fixing the bug in code
- This reply was modified 9 years, 10 months ago by