Forum Replies Created
-
lol blogspot
In reply to: Enqueue Ajax Script in BuddyPress Groups ForumI think I know what’s going on. Created a ticket in trac https://bbpress.trac.wordpress.org/ticket/2302
Can you post your full .httaccess?
In reply to: Get User ID on Profile Page`bbp_get_user_id( 0, true, false );`
In reply to: Sidebar item for change profile pleaseThis got posted two times. Closing this one. The original is here: https://bbpress.org/forums/topic/sidebar-item-for-change-profile-please/
In reply to: MODIFY: Topic/Reply Author's Forum Role Displayget_userdata already returns you the WP_User object. This should do it:
`
$user = get_userdata( bbp_get_reply_author_id( bbp_get_reply_id() ) );
if ( !empty( $user->roles ) && is_array( $user->roles ) ) {
echo $user->roles[0];
}
`In reply to: MODIFY: Topic/Reply Author's Forum Role DisplayReplies are not comments.
`bbp_get_reply_author_id( bbp_get_reply_id() );` will give you what you need.
Let me recommend you to give a good look at the bbPress source code. It’s surprisingly well documented.
In reply to: MODIFY: Topic/Reply Author's Forum Role DisplaySeems ok, as long as you change that in your theme’s copy of the file and not in core.
You need to make an exception for
wp-admin/admin-ajax.php
In reply to: MODIFY: Topic/Reply Author’s Profile LinkMy bad, sorry. Wrong filter.
Do this:
add_filter( 'bbp_pre_get_user_profile_url', 'my_custom_author_link' ); function my_custom_author_link( $user_id ) { return get_author_posts_url( $user_id, '' ); }
In reply to: Help displaying more forums on the forums pageNo problem. But remember to remove that line from your file.
In reply to: MODIFY: Topic/Reply Author’s Profile LinkYou’re sending false instead of empty. Try this:
add_filter( 'bbp_get_user_profile_url', 'my_custom_author_link' ); function my_custom_author_link( $user_id ){ return get_author_posts_url( $user_id, '' ); }
In reply to: MODIFY: Topic/Reply Author's Forum Role DisplayCopy bbpress/templates/default/bbpress/loop-single-reply.php into a bbpress folder in your theme, and in that copy remove from:
` if ( bbp_is_user_keymaster() ) : `
and
` endif; `In reply to: Two Forums – Two Sets of UsersBut how are you creating the “Employees” group for instance?
In reply to: Two Forums – Two Sets of UsersHow do you define “User group A”?
In reply to: MODIFY: Topic/Reply Author's Forum Role DisplayKeyMaster is the forum role, ::1 is the IP, you’re seeing that because you’re probably posting to localhost.
Just a note on this, you’re only seeing that as the KeyMaster. The rest of the users don’t see that.
If you want to add information in there, hook into the ‘bbp_theme_after_reply_author_details’ action. Like:
`
add_action( ‘bbp_theme_after_reply_author_details’, ‘my_custom_info’ );function my_custom_info(){
echo “Here it goes!”;
}
`In reply to: removing list style wp351+bp17+bbp23URL seems broken, can’t see the site.
In reply to: Help displaying more forums on the forums pageAdd this to your functions.php. Reload your site and then remove the code. It only needs to be executed once:
`
update_option( ‘_bbp_forums_per_page’, 100 );
`In reply to: MODIFY: Topic/Reply Author’s Profile LinkYou can use the bbp_get_user_profile_url filter. Something like:
add_filter( 'bbp_get_user_profile_url', 'my_custom_author_link' ); function my_custom_author_link( $user_id ){ return get_author_link(false, $user_id); }
(Not tested, but should help you get on track)
In reply to: Changing How Forums are Listed@moatihar see that I said “content-archive-forum.php”
You shouldn’t use antonymous functions (closures) for those filters. Those are only PHP 5.3+ compatible.
What we could do instead of all those filters is getting the forum object and use the $forum->post_title field directly, instead of calling get_the_title on it’s ID. I imagine people who wants to modify forums titles tends to filter bbp_get_forum_title and not get_the_title
In reply to: Fancy Editor not WorkingIt should work, provided that you are not doing any funny stuff with jQuery (like loading manually in your theme or something like that).
In reply to: Question regarding user rolesHow do you define “user group”?
Try increasing the priority of your filter:
`add_filter( ‘manage_users_columns’, ‘edit_admin_columns’, 11 );`
In reply to: Related Topics@sadr, yes, calculating related content is a pretty heavy operation. If you’re going to do that, try to use a plugin that pre-calculates in the admin (like YARPP), and not one that tries to calculate this on the fly.