Compared to BuddyPress, or a membership plugin like MemberPress, this is a surprisingly tedious thing to do in bbPress. I got 3/4 of the way to building it when I decided I really wanted the function on the membership account page and not in bbPress after all.
But suppose you wanted to add a tab for a page on which a user could upload an avatar using one of the many WordPress avatar plugins. Here, roughly, are the steps you would follow:
- First, you have to create the tab. This is done by adding another list-item in bbpress/templates/default/bbpress/user-details.php.
- In the other menu items on this template, you’ll notice that the href for the link is created by a function like ‘bbp_user_profile_edit_url()’. That’s because the user’s display name has to be part of the link. So, what you’ve got to do next is look in bbpress/includes/users/template.php and find that function. Then you’ve got to copy it, rename it, and modify it so that it creates the link you want (e.g., ‘/forums/users/username/avatar/’ ).
- Next, you’ve got set up bbPress to parse that link. The parsing function is bbp_parse_query(), which is found at the bottom of bbpress/includes/core/template-functions.php. This function reads the URI and sets conditional tags (e.g., ‘bbpress_is_single_user_edit’) depending on what the URI is. The function is called from bbpress/includes/core/actions.php. You’ll need to copy this function somewhere else and rename it. Then remove the action that calls it and add an action that calls your function. Then, you’ll need to modify your function such that if the URI ends in ‘avatar’ it sets a conditional tag, e.g., ‘bbpress_is_single_user_avatar’.
- Templates are loaded based on the conditional tags, and there are functions that return true or false depending on what conditional tags are present, e.g. ‘bbp_is_single_user_edit()’. These are found in bbpress/includes/common/tempate.php. You’ll have to create one of these that returns true for ‘bbpress_is_single_user_avatar’.
- Once you’ve got that, then you can conditionally load the templates you want for the page. Templates are loaded in bbpress/includes/core/template-loader.php. The function is bbp_template_include_theme_supports(). It has a filter, so you can add a conditional that loads a template when ‘bbp_is_single_user_avatar()’ is true.
As I said, I got about 3/4 of the way to doing this when I realized that it would be clearer in my application to have the avatar in the account area of my membership plugin. But I think this is roughly how you would do it in bbPress.
There are some different ways you might tackle this.
https://gist.github.com/barryhughes/ae5ca5a4684f347e8ba81e88a6501801
One is to use some code like I shared above, which could be added either to a custom plugin (preferred) or else to your theme’s functions.php file.
Alternatively, you could create a custom template override for loop-single-topic.php and make a change within the <p class="bbp-topic-meta"> section.
If that’s of interest/if you think you might prefer the second approach, we could explore the code you’d need to add to make it happen 🙂
anonymized-11014282Inactive
Follow This link. Just a simple snippet.
https://vvcares.com/w/wordpress-hide-pages-for-non-logged-in-users/
The snippet will do:
IF the user is not logged-in..
AND the page name is ‘members’ OR ‘activity’ OR bp-profile-page..
THEN it will redirect to REGISTER page.
hi there,
i have a list of topics in the forum but its not listing all of them.
kindly assist?
1) WordPress 5.2
2) bbPress 2.5.14
3) link to my site – http://www.meddirect.co.za/forums
try wordpresslogochange types of pluggin, it worked for me without coding. (I’m very much new to wordpress too)
probably this is not the best option, but I installed a plugin to change wordpress logo.
My issue was,, when my user try to reset their password, it takes to wordpress logo page.
and I kinda of fix that problem with using pluggin, now at least my logo shows not wordpress logo.
if it helps, this is the error i get when using the phpbb converter that comes with the installation of bbPress 2.5.14…
WordPress database error: [Specified key was too long; max key length is 1000 bytes]
CREATE TABLE wp_bbp_converter_translator ( meta_id mediumint(8) unsigned not null auto_increment, value_type varchar(25) null, value_id bigint(20) unsigned not null default '0', meta_key varchar(255) null, meta_value varchar(255) null, PRIMARY KEY (meta_id), KEY value_id (value_id), KEY meta_join
I was JUST looking for a solution for this! I’d noticed the tab order was off when I was using tab to add a new post in a bbPress forum on my site.
Did a little exploration, and found this post:
WP Accessibility Plugin
In this section about removing tabindex from focusable elements…
WP Accessibility Plugin
…it mentioned this plugin that might help:
WP Accessibility
And I found a few others along similar lines:
WP Accessibility Helper (WAH)
Accessibility by UserWay
Just with installing the WP Accessibility Plugin (without making any tweaks to default settings), I noticed a difference. (Need to explore a bit more to see if my issue is solved.)
Hmm…well, I don’t think it’s anything nefarious.
WordPress is testing to see if any URLs inside those posts point to content that can be embedded and—though in your case I’m guessing that mostly is not the case, because it sounds like the result is mostly {{unknown}}—it then caches the result of its tests for better efficiency.
If you don’t need or want this, you can disable it. I haven’t needed to do this and so have not tried any of the following guides myself, but perhaps they’ll be useful to you:
Hi,
The bbpress search box isnt returning the search results from the forum replies. Im using shuttlethemes as my theme. When i contacted them regarding my issue, this was their response below. Is there another way to go around and get the search box to work?
‘Often plugin developers will have different settings for specific use cases. It is certainly something that the plugin developer should be supporting you with, as the search is a part of WordPress core and our themes don’t manipulate the search functions.’
Thank you in advance!
Richard
you might want to do some further styling
bbp style pack
By default, when joining a group in BuddyPress, you need to subscribe to associated forums. Is it possible to have it so that when you join a group, you are atomically subscribed to the forums as opposed to having to physically subscribe???
WordPress 5.1.2 . BuddyPress 4.3 . bbPress . 2.5.14
Thanks in advance.
Is there a plugin that does this:
When a new WordPress post is created, a Forum topic is automatically created.
When a user posts a comment, they are posted as replies to that forum thread.
Does that exist?
This week i’will update the plugin to put a user interface in admin page.
Another adjusts be necessary to detect XOOPS data, in Michal site, the site url field is different from what was programmed in the plugin, these adjustments are necessary so that you do not need a programmer for you to migrate your site.
To start the migration you need to install WordPress in the same base of your site xoops, change the table prefix. Check if in the plugin panel it will detect the URL of your site xoops.
It does look good.
I suspect they created the layout by changing loop-forums.php and loop-single-forum.php templates.
The general styling can be done using
bbp style pack
Try contacting them to see if they’ll release then templates to you. If they do, PLEASE do come back here, and I’ll publish them
Hello. Is there suppose to be a registration link with the bbPress login form –my main wordpress login form has a registration link below it, but the login form on my bbpress forum pages does not. Here is an example of the forum login page which does not have a registration link (scroll to the bottom of the page): https://cincinnati.unitedresourceconnection.org/financial-assistance
Here is an example of the main login page (that has a registration link): https://cincinnati.unitedresourceconnection.org/wp-login.php
Does it look like I’ve configured something incorrectly, or is this the default behavior? I’m using the most recent version of wordpress and bbpress.
Why would the short code for latest topics display the topics for some users but not for others?
Non-logged in users and subscriber/participant levels cannot see the Topics on the page where the shortcode is used – yet they can see everything fine when they go the actual Forums.
But I as admin can see the Topics fine when I visit the page where the shortcode is used.
WordPress 5.1.1
bbPress 2.5.14
The original poster asked specifically how to disable forum caching with W3TC. They got the exact answer. If anyone is teaming up, it’s only to be supportive.
As to why W3TC might not be working as expected, that’s a bit harder, because bbPress uses all the same caching that WordPress does, without using any trickery.
there is the simple way to delete your account in bbPress database.
Log into your WordPress back-end.
Go to Tools > Forums > Reset Forums.
Check the “Are you sure you want to do this?” checkbox.
Optional: You may also want to check Delete imported users? …
Click Reset bbPress.
Hello,
I have been using bbpress for my wordpress website. I have one question. Is there any way to block particular words such as “Thanks”, “congratulation”, “Great Work” etc. I don’t want to allow low effort replies in forum.
Waiting for your kind reply.
Installed bbPress (2.7RC) to test and I like the improved dashboard for information but still having the import issue – though now I’m informed that it reaches step 6:
Step 6. No forum subscriptions to import
and just doesn’t move past that point. As a note there are no other plugins activated at all in my wordpress install – this is brand new and i’m starting out with the bbPress plugin since it’s the largest potential issue.
I’m trying to import an old vBulletin (3.8.3) forum to a new bbPress (2.5.14) setupon WordPress 5.1.1 and the initial import looks great. It imports the users (~13k) says something about deleting their WordPress password, then a moment later it seems to hang and no matter how long I leave it we never progress.
Calculating forum hierarchy (0 - 99)
Converting forums (0 - 99)
Delete users WordPress default passwords (12700 - 12799)
Delete users WordPress default passwords (12600 - 12699)
Delete users WordPress default passwords (12500 - 12599)
Delete users WordPress default passwords (12400 - 12499)
Delete users WordPress default passwords (12300 - 12399)
Looking at the forum sections shows that it’s created the 22 forums and correctly set some of them as categories, they also show how many topics and replies are in each one correctly –
— Random Thoughts - Topics: 3,119 Replies: 54,698
But only 27 topics across the entire forum are imported. It’s the same 27 topics every time as well. To the point that if I stop the import, and hit the start button again, it imports these same 27 topics once more now showing 54. Is there an error log I can find that might show me why it’s hanging up? The bit above with the Calculating Hierarchy is the last update I ever get in the window. I added the lines to turn on debug logging in WordPress but nothing every shows up.
define( 'WP_DEBUG', true ); // turn on debug mode
if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) {
define( 'WP_DEBUG_LOG', true ); // log to wp-content/debug.log
}
One of the problems I’ve encountered in trying to use the TinyMCE editor in bbPress is styling the text inside the editor itself. The default fonts are serif, but suppose you want sans?
Attempting to override the font-family in the usual way — by modifying your theme’s CSS file — fails because the editor window of TinyMCE is in it’s own tiny little world as far as CSS is concerned.
In order to get TinyMCE to use your own stylesheet, you have to pass it as an argument when the editor is called. Here’s how to do it in bbPress.
function bbp_enable_visual_editor( $args = array() ) {
$args['tinymce'] = array(
'content_css' => '/wp-content/themes/mytheme/css/tinymce-editor.css',
);
return $args;
}
add_filter( 'bbp_after_get_the_content_parse_args', 'bbp_enable_visual_editor' );
In the example above, “tinymce-editor.css” is the CSS file you want the editor to use. It is located in a folder entitled “CSS”, which is located in your theme folder “mytheme”. The code above can be copied and pasted into your functions.php file.
Other options for the editor can be found here. Notice that the value for “tinymce” can be an array. That’s what we’re doing above.
Additional arguments to pass in the array for the TinyMCE editor can be found here.
I hope this helps someone. The documentation for styling the editor text could be improved. I banged my head on this problem for years until I stumbled on the solution elsewhere.