Yes, they work really well together, actually developed side by side most of the time.
To get an idea of what is in BuddyPress check this out:
BuddyPress Components and Features
I want want to remove the permission that moderators can delete topics and posts from the trash. But how can I change the standard permissions from bbPress?
I made this code but it doesn’t work because bbPress roles are separated from WordPress roles:
function changePermissions() {
$role = get_role('moderater');
$role->remove_cap('delete_others_topics');
$role->remove_cap('delete_others_replies');
}
add_action('init', 'changePermissions');
You can I think… Add the translation โTopic Statusโ as I linked to above.
Then at the bottom of that screen you can select ‘Export’, though the dropdowns to the right you want to select “only matching the filter” then to right select “Portable Object Message Catalog (.po)” and then click the ‘export’ link on the left, save this file as bbpress-he.po then select “Machine Object Message Catalog (.mo)” and click ‘export’ again and save this file as bbpress-he.mo and then using FTP upload both these files to /wp-content/languages/bbpress/ and you evertyhting should be perfect. ๐
https://codex.bbpress.org/bbpress-in-your-language/
It might be in form-forum.php (bbpress/templates/default/bbpress)
It has these lines, have not tried it and be sure to have a backup:
<p>
<label for="bbp_forum_type"><?php _e( 'Forum Type:', 'bbpress' ); ?></label><br />
<?php bbp_form_forum_type_dropdown(); ?>
</p>
<?php do_action( 'bbp_theme_after_forum_form_type' ); ?>
<?php do_action( 'bbp_theme_before_forum_form_status' ); ?>
<p>
<label for="bbp_forum_status"><?php _e( 'Status:', 'bbpress' ); ?></label><br />
<?php bbp_form_forum_status_dropdown(); ?>
</p>
Thank you ๐
Of course,I will help to translate the strings.
But I would like to remove those two strings that I have marked.
I can’t use “display:none” since it’ll remove all the “label” or “p” in the page.
So I have to remove it from the PHP code. But I can’t find the code spot to do so.
Ok i think I have found where the problem is, take a look at the Body Class snippets from different pages on bbpress, paying particular attention to the sections after the word bbpress in each snippet.
The top two are from pages I am able to get sidebars to appear on and the bottom two I can not.
In the top two notice after the word bbpress you see a description of the type of page it is “single single-topic” and “archive” respectively.
In the bottom two this does not happen so my theme “Hueman” doesn’t know what sort of pages they are and therefore is unable to place the sidebars on these pages, now all I need to know is how to rectify this?
<body class="topic bbpress single single-topic postid-976 logged-in admin-bar no-customize-support topbar-enabled full-width gecko">
<body class="forum-archive bbpress archive post-type-archive post-type-archive-forum logged-in admin-bar no-customize-support topbar-enabled full-width gecko">
<body class="bbp-user-page single singular bbpress logged-in admin-bar no-customize-support topbar-enabled full-width gecko">
<body class="bbp-view bbpress logged-in admin-bar no-customize-support topbar-enabled full-width gecko">
I got it working and also Guests Posts (Topics and Replies) don’t return and empty value.
Might not be the best way, but all I got:
<?php
if ( bbp_is_topic_anonymous() ) {
echo "<br>Guest Post"; }
elseif ( bbp_is_reply_anonymous() ) {
echo "<br>Guest Post"; }
else {
$post_count = ( bbp_get_user_topic_count_raw ( bbp_get_reply_author_id ( bbp_get_reply_id() ) ) );
echo "<br>Total Topics: " . $post_count;
$post_count = ( bbp_get_user_reply_count_raw ( bbp_get_reply_author_id ( bbp_get_reply_id() ) ) );
echo "<br>Total Replies: " . $post_count; }
?>
Nope, that does not seem to be working.
I tried several different ways, but all just output the same.
I got to this code, but still outputs the Totals for guests without a value/number:
<?php if ( bbp_is_anonymous() ) {
echo "Guest Post"; }
else {
$post_count = ( bbp_get_user_topic_count_raw ( bbp_get_reply_author_id ( bbp_get_reply_id() ) ) );
echo "Total Topics: " . $post_count;
$post_count = ( bbp_get_user_reply_count_raw ( bbp_get_reply_author_id ( bbp_get_reply_id() ) ) );
echo "Total Replies: " . $post_count; } ?>
I see this at the bottom of your site when viewing a topic
add_shortcode( 'member', 'member_check_shortcode' ); function member_check_shortcode( $atts, $content = null ) { if ( is_user_logged_in() && !is_null( $content ) && !is_feed() ) return $content; return ''; }
I have worked part of this out and have implemented a is_bbpress format for forum pages so I can choose what sidebars to put on my forum pages however I am still not able to get sidebars to show up on profile or most popular topics.
What I require is the is_ codex for these pages so I can write a script to place sidebars on these pages, I have found that the User profile has these html body classes:
bbp-user-page single singular bbpress
is_bbpress() does not work
and Most Popular Topics:
bbp-view bbpress
This should be is_bbpress() however is_bbpress() does not work.
Any help would be greatly appreciated.
@cyberdrone See this to get the translations or get started with translating bbPress. https://wordpress.org/plugins/bbpress-protected-forums/
@david7h6 What shortcode is broken?
Try bbp_is_anonymous to check if it’s an anonymous user before outputting the post count.
You could hide the bbPress breadcrumb with some CSS.
.bbp-breadcrumb { display:none; }
any idea where to add the code to have it show under the avatar in topics/replies?
I think the count works, just can not get it placed correctly
Give this a try:
$post_count = ( bbp_get_user_reply_count_raw ( bbp_get_reply_author_id ( bbp_get_reply_id() ) ) ) + ( bbp_get_user_topic_count_raw ( bbp_get_reply_author_id ( bbp_get_reply_id() ) ) );
echo "Total Posts: " . $post_count;
I need a list of shortcodes such as Profile edit,activity,user members and others..
I want to have every shortcode to place different page.
Hi Stephen,
In my search for a “fix” I totally forgot about the popup “Crayon Syntax Highlighter” offers.
I’ve been playing around with this for about a year now and ended up using “CodeColorer” as I was creating my own WYSIWYG editor. I think I’ll explore the Crayon option again.
As for the editor; I don’t know how to start such a wider discussion.
I agree that ideally you’d like to use the editor that comes with WordPress, even if it’s just to stay more consistent (comments vs forum posts).
How would one go about that?
I’ve searched everywhere, to no avail. There used to be a plugin for this for older versions of bbpress (post count pro I believe it was called) but there aren’t any plugins for this anymore. I’m limited on my code knowledge, but I’d really like for this to be accheived. We’re a compeitive gaming community and vBulletin has been a staple of our professional/amateur gaming life since the beginning. I’ve decided to make the move to bbpress to have a more seemless site integration between users, posts, and news. My ultimate goal is to make the forums as similar to vBulletin as possible, but all of the plugins that accheived this goal do not work with the newer versions. I’d like for the post total to be listed under the users name when they post, as well as in their profiles. In addition custom user roles would be a plus, but not requred. If anyone can point me in the right direction, I’d be very grateful.
Thanks for the detailed reply, Stephen. I probably meant Forum Root rather than Forum Index, but the way you describe it is exactly what I’m after.
I had considered what to do about the list getting too long and it will almost certainly be a matter of listing only the freshest 10 topics per forum. Clicking the Forum title would take you to the full list.
Now that I know where to begin I’ll probably figure it out eventually (new to BBPress but not afraid of code), but if you have some suggestions on where to get started or even a block of code to copy-paste I certainly wouldn’t object to using it : )
If get around to it first I’ll post my findings here for the knowledge base.
Arabic is 96% translated already, see this to get you started https://codex.bbpress.org/bbpress-in-your-language/
You can add some widgets to your side bar or shortcodes to a page
https://codex.bbpress.org/shortcodes/ https://codex.bbpress.org/widgets/
Also there are a few other docs on the codex worth looking at
Codex
Cool, that will work, thanks for the follow up and code example ๐
Thanks for adding the Codex page @jwarren ๐
bbp_get_user_profile_url
I just updated that page to ‘Topics โ How many topics to show per page’
As to combining the ‘Forum Index with Topics by Freshness’ I’m not exactly sure what you mean by this, for example look at the following two pages here on bbpress.org
https://bbpress.org/forums/forum/installation/ <- That’s the ‘Instalation’ forum 25 topics/page
https://bbpress.org/forums/forum/troubleshooting/ <- That’s the ‘Troubleshooting’ forum 25 topics/page
If you wanted to have something like below on a single page then you would have to customize your templates or use some shortcodes on your page to get the layout you want. It is quite doable but once you get 50 topics for example in a forum finding ‘Forum B’ or any other forums below that list will be extremely difficult.
Forum A
- Topic 1
- Topic 2
- Topic 3
- … etc
Forum B
- Topic 1
- Topic 2
- Topic 3
- … etc