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
I just had a quick look and I’d say the following thread has some tips and suggestions.
https://wordpress.org/ideas/topic/default-links-to-open-in-new-window-ie-target-_blank
I am also of the belief that target=_blank is not a good thing at all, I’ll happily call out people using it and not return to their site because they use it, and I know I am far from the only person with this opinion.
Ok, sorry yes I get it now !
Try
function hide_before ($args = array() ) {
$args['before'] = '';
return $args;
}
add_filter ('bbp_before_get_forum_subscribe_link_parse_args','hide_before') ;
Let me know if it works – it is blank by default, so not sure why your’s has a | in it.
The 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/css
And 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.
This warning is contained in three templates all in
wp-content/plugins/bbpress/tempates/default/bbpress/
form-forum.php
form-reply.php
form-topic.php
You can create a folder in the root of your theme called ‘bbpress’ and copy these three themes to it, and then alter this text to read whatever you like, or remove it.
Or you could add the following code to your functions file
//This function changes the text wherever it is quoted
function change_translate_text( $translated_text ) {
if ( $translated_text == 'Your account has the ability to post unrestricted HTML' ) {
$translated_text = 'new text';
}
return $translated_text;
}
add_filter( 'gettext', 'change_translate_text', 20 );
Just make ‘new text’ whatever you want.
or you could probably get you function to do something, but I don’t offhand know what you’d need to do.
Looks like it’s wider than just bbpress from this post.
http://evidentiasoftware.com/forums/topic/object-stores-not-found/
Have you added/upgraded any software lately?
Ok, first I’d check plugins and theme to discount these.
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 if that doesn’t pinpoint your problem.
I tried but seem to have no success with this ‘tags’ 🙁
1) on the default ‘topic tags’ widget, how to increase the number of tags display e.g. up to 100 tags?
2) I tried this plugin “Simple Tags” set up, but nothing is displaying. Perhaps I didn’t set up correctly? or any plugin that might work better?
Thank you so much for your help.
In the theme here on bbpress.org they are the ‘default’ sizes, it is just a sidebar with the shortcode [bbp-topic-tags].
If you want to add custom sizes to a custom template part then something like this is a goo d start:
<?php wp_tag_cloud( array( 'smallest' => 12, 'largest' => 16, 'number' => 16, 'taxonomy' => bbp_get_topic_tag_tax_id() ) ); ?>