If you take a look at a single users profile and the ‘edit’ section:
If you look in content-single-user.php you’ll see:
<?php if ( bbp_is_single_user_edit() ) bbp_get_template_part( 'form', 'user-edit' ); ?>
Open the form-user-edit.php template:
<?php do_action( 'bbp_user_edit_before_role' ); ?>
<?php bbp_get_template_part( 'form', 'user-roles' ); ?>
<?php do_action( 'bbp_user_edit_after_role' ); ?>
(I removed some of the multisite network user role code for readability above)
Open up the form-user-roles.php template:
<?php bbp_edit_user_forums_role(); ?>
The role that will be the default when you add this to your ‘New User Form’ will be the default ‘participant’ if that is what you have set the default role as in bbPress settings.
Hello,
I am trying to place the forum Roles section, like the section that appears in Edit user, on the new user form. My site is private, so any new users are created by the admin. I’d very much like the admin to only have to go to this screen for user permissions. I’ve managed to get my other plugin and custom fields on the page, but I haven’t figured out how to do it with bbPress. Could someone help me out? For all general purposes, I am using the add_action hook user_new_form then setting the values with update_user_meta in my theme’s function.php page. I see that bbPress sets values in the clr_usermeta database, but I’m unclear on what to set and how. Also, I always want the default value for the role field to be participant. I have search reasonably thoroughly for a clear answer to this and haven’t had much luck. I welcome any help you may have.
try the following
rewrite rules
This could be an issue with your rewrite rules. To fix this try resetting your permalinks. In your WordPress Administration Screens navigate to Settings > Permalinks, select a different permalink structure and save. Then select your preferred permalink structure and save again.
Plugins
Deactivate all but bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.
Themes
If plugins don’t pinpoint the problem, switch to a default theme such as twentytwelve, and see if this fixes.
come back and let us know if any of the above fixes
This cannot be achieved at this stage with bbPress, the only option is to ‘Opt-In’ and there is no availability to have the defaults the other way around.
Is there any chance of this being changed at some time? Perhaps as a config option? Being subscribed by default is the most requested feature by users on my forum.
Not a buddypress expert, but suggest you try with all plugins except bbpress and BP deactivated. If that fixes, re-enable one at a time to find the problem.
If plugins doesn’t fix, switch to a default forum such as twentytwelve, and test again.
Come back and let us know if any of that helped.
bbPress is tested with wordpress default themes. It maybe a conflict – you need to check plugins and themes
Plugins
Deactivate all but bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.
Themes
If plugins don’t pinpoint the problem, switch to a default theme such as twentytwelve, and see if this fixes.
bbPress is tested with wordpress default themes. It maybe a conflict – you need to check plugins and themes
Plugins
Deactivate all but bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.
Themes
If plugins don’t pinpoint the problem, switch to a default theme such as twentytwelve, and see if this fixes.
wordpress uses gravatar as it’s avatar system
http://en.gravatar.com/
so you change the gratatar there.
If you want to change the default
Dashboard>settings>discussion and at bottom of that page
If you want to use local avatars
https://wordpress.org/plugins/simple-local-avatars/
If this challenge I am having is beyond the scope of help in the bbpress forums, then I understand. The below code is a function that allows the user to submit a search request for a book title via the google books api. When the user clicks “search”, the function works great and returns results in a Jquery window. The problem I am having; it triggers a submit of the bbpress topic, and I get the errors “cannot submit a topic with the subject line blank.”
If there is a simple fix I am not seeing, can someone please help me?
function book_search_google () {
//set API version for Google Book Search API
$v = isset($_POST['v']) ? $_POST['v'] : '1';
//set user API key for Google Book Search API
$key = isset($_POST['key']) ? $_POST['key'] : 'key goes here';
//set user IP for Google Book Search API
//$ip = isset($_POST['ip']) ? $_POST['ip'] : $_SERVER['REMOTE_ADDR'];
//set default value for query to Google Book Search API 0307387941
$query = isset($_POST['q']) ? $_POST['q'] : '0307387941';
//set default value for search type to Google Book Search API
$type = isset($_POST['type']) ? $_POST['type'] : 'all';
//check and assign page of search results - are we on the first page?
$start = isset($_POST['start']) ? $_POST['start'] : 1;
//set default value for number of results
$limit = isset($_POST['limit']) ? $_POST['limit'] : '10';
switch ($type) {
case 'all':
$params = 'q='.urlencode($query).'&startIndex='.$start.'&maxResults='.$limit;
break;
case 'isbn':
$params = 'q=isbn:'.urlencode($query).'';
break;
case 'lccn':
$params ='q=lccn:'.urlencode($query).'';
break;
case 'oclc':
$params = 'q=oclc:'.urlencode($query).'';
break;
default:
echo '<p>You must specify a search type such as "all" or "book". Check the url to make sure "type=" has a value.</p>';
exit;
}
//set URL for the Google Book Search API
$url = 'https://www.googleapis.com/books/v'.$v.'/volumes?key='.$key.'&'.$params.'';
if(isset($_POST['q'])):
//build request and send to Google Ajax Search API
$request = file_get_contents($url);
//decode json object(s) out of response from Google Ajax Search API
$data = json_decode($request,true);
$totalItems = $data['totalItems'];
pagination mainHeading
if ($totalItems > 0) {
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Dialog - Default functionality</title>
<link rel="stylesheet" href="//whosgotbooks.com/jquery/jquery-ui-1.10.4.custom.css">
<script src="//whosgotbooks.com/jquery/jquery-1.10.2.js"></script>
<script src="//whosgotbooks.com/jquery/jquery-ui-1.10.4.custom.js"></script>
</head>
<body>
<div id="dialog" title="Google Books Search Results" style="display:none;">
<script>
$(function() {
$( "#dialog" ).dialog({
height: 550, width: 450});
$( "#returnvalues" ).click(function(){
$( "#dialog" ).dialog( "close" );
});
});
</script>
<strong><p style="font-size: 16px; text-align: center";>Top 10 Results for "<?php echo @$_POST['q']; ?>"</p></strong>
<strong><p style="font-size: 14px; text-align: center";>choose a book to select as your topic</p></strong>
<table style="width:400px">
<col width="325">
<col width="75">
<?php foreach ($data['items'] as $item) { ?>
<tr>
<td>
<strong><u><div style="font-size: 14px";><?php printf($item['volumeInfo']['title'])?></u></div></strong>
<strong>Author: </strong><?php printf( $item['volumeInfo']['authors'][0]); ?><br />
<strong>Published: </strong><?php printf( $item['volumeInfo']['publishedDate']); ?><br />
<strong>Page(s): </strong><?php printf( $item['volumeInfo']['pageCount']); ?><br />
<strong>Publisher: </strong><?php printf( $item['volumeInfo']['publisher']); ?><br />
<strong>Category: </strong><?php printf( strtolower($item['volumeInfo']['printType']).', '.strtolower($item['volumeInfo']['categories'][0])); ?>
<strong>ISBN: </strong><?php printf( $item['volumeInfo']['industryIdentifiers'][0]['identifier']); ?></td>
<td><p><input type="submit" name="submit" value="Select" id="returnvalues"/></p>
<img src="<?php printf( rawurldecode($item['volumeInfo']['imageLinks']['smallThumbnail'])); ?>" />
</td>
<tr><td style="width:420px"><p><strong>Description: </strong><?php printf( $item['volumeInfo']['description']); ?><br /></p></td>
</tr>
</tr>
<?php } }
else {
?>
<p><strong>Sorry, there were no results</strong></p>
<?php }
/* for testing purposes show actual request to API - REMOVE when finished
$apiRequest = $url;
echo '<p>API request: '.$apiRequest.'</p>'; */ ?>
</table>
</div>
</body>
</html>
<?php
else: //show form and allow the user to check for Google Book search results
?>
<p><form id="searchForm" name="searchForm" method="post">
<fieldset id="searchBox">
<label>Search for a Book:</label>
<input class="text" id="q" name="q" type="text" value="Powered by Google" onfocus="this.value=''; this.onfocus=null;" />
<select id="type" name="type" size="1">
<option selected value="all">Book Title</option>
<option value="isbn">Books by ISBN</option>
<option value="lccn">Books by LCCN #</option>
<option value="oclc">Books by OCLC #</option>
</select>
<input class="submit" id="submit" name="submit" type="submit" value="Search" />
</fieldset>
</form></p>
<?php
//end submit isset if statement on line 73
endif;
}
@batmanfan Instead of making this second user a ‘keymaster’ you should make them a ‘moderator’ and this will disable the backend access for you.
Look at the docs here on what each role can and cannot do by default
https://codex.bbpress.org/bbpress-user-roles-and-capabilities/
You can take out <?php bbp_forum_subscription_link(); ?> in content-single-forum.php . I have a bbpress directory in my theme (eg mytheme/bbpress/) where I’ve copied the entire default template and those files overwrite the default theme which I got from templates/default/bbpress in the plugin.
So you’d have something like yourtheme/bbpress/content-single-forum.php. I’m looking at this https://codex.bbpress.org/theme-compatibility/step-by-step-guide-to-creating-a-custom-bbpress-theme/ and getting confused but I have a feeling you’ll work it out! Anyway, that’s where that code is.
Hi we have a new website and forum. The profiles for all forum participants include a picture found in our library. We haven’t been able to remove it and include a different picture. We have succeeded in choosing an avatar shown next to each user name on the forum, but a different one shows up when you click on the profile. Thanks for any help.
I didn’t know what “post on the forum” means – after 30 years in IT support it could mean anything from the battery has run out to a very very specific set of circumstances, and anything in between.
Therefore it was only an attempt to see if your user had a bigger issue, like she couldn’t get forum access. If you don’t think it will help, and you will know your moderator, then ignore it, I just got it from a google, and given that no-one else had come back, thought it was worth a try.
It would be worth you seeing if this is a theme or plugin issue.
Check other plugins
Check that no other plugins are affecting this.
Turn off all other plugins apart from bbpress, and see if that fixes the problem. If the problem is resolved, add back one at a time to see which is causing the conflict.
Check themes
If plugins are not the cause, then it may be a theme issue. Switch to a default theme, such as twentytwelve, and test.
Change the default role of new users to be a “Contributor” and let them go to town. That way you can moderate their posts, and publish the ones you want to publish.
probably a conflict
Check other plugins
Check that no other plugins are affecting this.
Turn off all other plugins apart from bbpress, and see if that fixes the problem. If the problem is resolved, add back one at a time to see which is causing the conflict.
Check themes
If plugins are not the cause, then it may be a theme issue. Switch to a default theme, such as twentytwelve, and test.
you can edit the profile page to prevent them changing it
In your theme create a bbpress folder
wp-content/themes/%yourtheme%/bbpress
where %yourtheme% is the name of your theme
then navigate to
wp-content/plugins/bbpress/templates/default/bbpress/form-user-edit.php
and copy this file to the bbpress folder you created above
bbpress will now use this one instead of the default.
edit this new file and take out lines 33 to 45
ie take out the following
<div>
<label for="nickname"><?php _e( 'Nickname', 'bbpress' ); ?></label>
<input type="text" name="nickname" id="nickname" value="<?php bbp_displayed_user_field( 'nickname', 'edit' ); ?>" class="regular-text" tabindex="<?php bbp_tab_index(); ?>" />
</div>
<div>
<label for="display_name"><?php _e( 'Display Name', 'bbpress' ) ?></label>
<?php bbp_edit_user_display_name(); ?>
</div>
<?php do_action( 'bbp_user_edit_after_name' ); ?>
This will remove the ability to set a nickname and to change the display name.
Dear MTPrower (@mtprower),
Do you have resolve this issue? I am also surviving with same issue. I want to show certain list of forum in separate loop. Kindly help me.
My link is http://sainfoinc.net/zroor/forums
I created two Recent Forum (Help & Announcements)
i want to show them in different loop by using same design format.
If i succeed to show certain two forum separately, then how can i restrict to show them in main default forum list.
I’d check to see if two plugins are conflicting or theme issue, or if it is server related.
Check other plugins
Check that no other plugins are affecting this.
Turn off all other plugins apart from bbpress, and see if that fixes the problem. If the problem is resolved, add back one at a time to see which is causing the conflict.
Check themes
If plugins are not the cause, then it may be a theme issue. Switch to a default theme, such as twentytwelve, and test.
Come back and tell us if any of those speeded it. If so then you know the problem, if not contact your service provider as it should be a few seconds at most.
Sorry to hear this.
Try it with a default theme such as twentytwelve.
If this fixes, then it is a theme issue.
Hi,
Forum search is not working. I am using bbpress version as 2.5.3. When i search the topics its redirecting to home page.
I have changed the Permalinks as default. then search is working fine.
When i changed the permalink as custom structure(/%category%/%postname%/), forum search is not working. I need Permalink as custom structure.
Kindly need help. Thanks in advance.
Rather than the forum subscribe link we are actually in a topic 😉
bbPress has the two default links ‘Favorite’ and ‘Subscribe’ seperated by a |
The default before args forbbp_get_topic_subscription_link is 'before' => ' | ', so the below fork of Robin’s code should do what you need.
function hide_before ($args = array() ) {
$args['before'] = '';
return $args;
}
add_filter ('bbp_before_get_topic_subscribe_link_parse_args','hide_before')
bbPress is tested against all the common browsers, so unlikely that it is a default issue (indeed mine works fine on all those browsers)
Could be any number of things, but as always start by eliminating plugins and themes viz ;
Check other plugins
Check that no other plugins are affecting this.
Turn off all other plugins apart from bbpress, and see if that fixes the problem. If the problem is resolved, add back one at a time to see which is causing the conflict.
Check themes
If plugins are not the cause, then it may be a theme issue. Switch to a default theme, such as twentytwelve, and test.
Come back and let us know if that helped, and what the issue was, or if still happening.
You’ve been busy with this site, hope it’s getting there !
First I’d eliminate plugins and themes
Check other plugins
Check that no other plugins are affecting this.
Turn off all other plugins apart from bbpress, and see if that fixes the problem. If the problem is resolved, add back one at a time to see which is causing the conflict.
Check themes
If plugins are not the cause, then it may be a theme issue. Switch to a default theme, such as twentytwelve, and test.
If still doing it – come back.
The [bbp-topic-index] shortcode will use the default 15 topics based on bbPress ‘Topics per page’ setting, upping this to 25 will show 25 topics per page on the topics view (example.com/topics), the topics page for each single forum and again the same for any place you use the above shortcode.
Hi all,
Robin suggested that it is possible to expand and collapse the replies in a thread. However my php skills are rudimentary so I am wondering if someone has the solution?
This is what I want – in perfect world:
- to allow replies to have a title (they do in the back end but never when the user is posting)
- to display a thread as a collapsed, and indented, list using the title (or first line if titles proves impossible) as the default view
- to offer an expand “button” to allow the user to see the full text of anything that is collapsed
- to offer a collapse”button” to allow the user to collapse and expanded item
- to complete the usability it would be good to have a config parameter that the user sets to indicate if he wants collapsed or expanded threads as default – but this is a plug-in change, I include it here for completeness
If anyone has don anything similar please share it, I think it may be a good addition to the dev requests in the long-run?
Thank you……… liz