Forum Replies Created
-
In reply to: Buddypress favorite button inside bbpress posts
Bump
In reply to: PM button in posts@evildon, You’re right. not sure why I copied the code without that
Here is the working code:
function ntwb_bbp_bp_pm() { if(function_exists('bp_send_private_message_link') && is_user_logged_in() ) { global $bp; if ($bp->loggedin_user->id !== bbp_get_reply_author_id()){ $user = get_userdata( bbp_get_reply_author_id() ); if ( !empty( $user->user_nicename ) ) { $user_nicename = $user->user_nicename; } $compose = bp_loggedin_user_domain() . bp_get_messages_slug() . '/compose/?r=' . $user_nicename; ?> <div class="forum-pm"><a href="<?php echo $compose ?>" title="Private Message">Private Message</a></div> <?php } } } add_action( 'bbp_theme_after_reply_author_details', 'ntwb_bbp_bp_pm' );
In reply to: PM button in postsHey Stephen, I’ve modified your code. With your code, when clicking on the link, it redirects the user to the compose form with the “Send To” field empty. I wanted to fill this field for the user automatically, just the way it works in buddypress user page. So I came up with this code.
function ntwb_bbp_bp_pm() { if(function_exists('bp_send_private_message_link') && is_user_logged_in() ) { $user = get_userdata( bbp_get_reply_author_id() ); if ( !empty( $user->user_nicename ) ) { $user_nicename = $user->user_nicename; } $compose = bp_loggedin_user_domain() . bp_get_messages_slug() . '/compose/?r=' . $user_nicename; ?> <a>" title="Private Message">Private Message</a> <?php } } add_action( 'bbp_theme_after_reply_author_details', 'ntwb_bbp_bp_pm' );
I’m not a php programmer and I’m not sure that I did it the right way, but hey, it works.
In reply to: Make bbPress look like a real forum?This post solved the problem for me:
In reply to: How to remove 'Forums' from profile menuI made a mistake with the css file, you’re using buddypress right?
If so, the file that you need is:
plugins/buddypress/bp-tamplets/bp-legacy/css/buddypress.css
Put it in:
themes/[your child theme]/css
And then add the css rule to the file.
In reply to: How to remove 'Forums' from profile menuThe script in the link is working, you probably haven’t closed it with php tags.
Put this in bp-custom.php in the plugins folders
<?php function bp_exclude_profile_tabs() { global $bp; $bp->bp_nav['forums'] = false; } add_action( 'bp_setup_nav', 'bp_exclude_profile_tabs', 999 ); ?>
If you prefer to do it with css, you need to copy bbpress.css from:
plugins/bbpress/templates/default/cssAnd put it in:
themes/[your child theme folder]/css(if you don’t have a css folder in your child theme, create one)
Then put the css rule mentioned above somewhere in the file.In reply to: How to remove 'Forums' from profile menuLook at this blog post:
http://themekraft.com/blog/customize-profile-and-group-menus-in-buddypress/I haven’t checked it, so if it doesn’t work, you can always use css.
put this line in bbpress.css in your child theme:
#forums-personal-li {display:none;}
In reply to: PM button in postsThanks.
In reply to: Forums index in the same layout as other bb softwareI’m struggling with this one for a couple of days. Your code solved my problem, Thanks.