ok, I’ve got the login information and looked at the issue.
On my test site, I can replicate a page with
[bbp-topic-index]
[bbp-forum-index]
[bbp-topic-form]
and have no problem in pagination. page 2 comes up as
http://mysite.com/forums/page/2/
This is with a twentyseventen clean theme.
Robin, I would like to give you login access so you can take a look at how the forums are working, but I don’t want to provide details here. Ideas?
1. Yes, Forum index page is here: http://cathollowcondos.com/forums/ and it is the one that is generating invalid pagination links.
2. Yes, the Forum index page has [bbp-forum-index] in it. In fact, I have [bbp-topic-index], [bbp-forum-index], and [bbp-topic-form] on the page, in that order. It looks like [bbp-topic-index] is the shortcode responsible for generating invalid pagination links.
I have 3 categories/forums listed on the index page, and they have the following number of topics in each: 3, 13, and 1.
**Important** – If I go to the General forum with 13 topics, there are 2 pages of topics; one with 15 topics, and a 2nd page with another 15 topics. So, it looks like the count is not being displayed properly. BUT, the pagination link to page 2 is working on the General forum page, but not on the main index page. Also, I’m not sure what the difference is between topics and posts shown on the Forums index page. Replies are listed separately. I think you really need to see it for yourself, but it’s a private site.
Thanks for that.
The blogs per page should not affect the number of forums shown. This is set to 50 in bbpress unless changed by code, which would either be code you have done (and would know about), code from a plugin (but you have disabled and checked these) or your theme (which again you have checked).
I’m not sure what else would be doing this
Do you know how to access the database and look at items in it?
I’d like to remove the date stamp from topics and responses. I found a couple of code suggestions trough Google searches but I haven’t gotten any to work. As a work around, I simply changed the wordpress general settings for date and time to Custom, and then left the custom field blank. This almost worked. The date/time stamp changed from, for instance, “11/25/2017 at 7:03 am” to just ” at “. My trouble is that “at”. I’ve been sniffing through the wordpress and theme php files to remove it or change it to a space, but cannot figure out where the “at” is. Can anyone tell me how I can change or remove it?
@zopfan – this code may be useful
//redirect user to log in page if accessing forum from external link
add_action( 'template_redirect', 'forum_redirect_from_external_link' );
function forum_redirect_from_external_link() {
$actual_link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
$actual_link = explode('/',$actual_link);
if($actual_link[3]=="forums" && !is_user_logged_in() ) {
wp_redirect( home_url('your-forum-log-in-page-here') );
exit;
}
}
Hello i’m french and sorry for my english.
I have modify the css and template of bbpress and i have copy the files in my host.
But when i create a topic i have “teste Name of Topic“.
In local i have check “Topics Loop – Single” and i have find “teste” i have delete this and prefix is deleted but in my host “teste” is not in Topics Loop – Single.
I do not know what can create the prefix.
I use bbp pack style and more plugins as bbpress2 bbcode, bp tools bp attachments.
thank you in advance
I keep running into the following error when trying to import my Vanilla 2.x forum database. I’m using WordPress 4.9 and bbpress 2.5.14.
Repair any missing information: Continue
WordPress database error: [Specified key was too long; max key length is 1000 bytes]
CREATE TABLE GcuHRqrGbbp_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 (meta_key(191), meta_value(191)) ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
No data to cleanStarting Conversion
Any ideas on what I need to do to get this error resolved?
Hello.
I would like to create a forum with closed topics. The person just will be able to see the topic the admin and the person who create. Is there any way to do that?
And is possible to modify the new topics shortcode? I would like to remove the “Topic tag” and another options in some places. One time the topic are closed, there’s no function for this options.
Thank you for your attention.
if you mean the login , then put this into the custom css of your theme
#sidebar .bbp-login-form label {
width: 120px !important;
}
and in case if the plugin Buddypress is not installed, something like this might be useful:
// redirect if the url contains the word 'user' and if you are not logged-in
add_action('init', 'profile_redirect');
function profile_redirect() {
if(strpos($_SERVER['REQUEST_URI'], 'user') !== false && ! is_user_logged_in()) {
wp_redirect("https://www.whateversite.com/" . LOGIN_PAGE_NAME);
}
}
‘LOGIN_PAGE_NAME’ = whatever page name you use to login.
Change the word ‘user’ to your needs.
For fixing the “page-not-found” when accessing a private forum, I found that when I placed Pascals code into the 404 page (great code by the way), the browser still flags the 404. So instead, I moved it to the functions.php file using the following:
//redirect user to log in page if accessing forum from external link
add_action( 'template_redirect', 'forum_redirect_from_external_link' );
function forum_redirect_from_external_link() {
$actual_link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
$actual_link = explode('/',$actual_link);
if($actual_link[3]=="forums" && !is_user_logged_in() ) {
wp_redirect( home_url('your-forum-log-in-page-here') );
exit;
}
}
I hope this was constructive… 🙂
Hi. I have a few issues with bbpress. The page I need help with is https://www.thosecrazyvegans.net/forum/
1. The top of the browser tab bar it says Forums Archive – Those Crazy Vegans
however, I would like it to say Forum – ThoseCrazyVegans.net
How do I fix this?
2. When someone post a new topic they have to fill out the form at the bottom of the forum, however they cannot select a forum from the drop down menu. How to fix?
3. The search bar does not have an search button. Why and how to fix?
4. Is it possible to edit this page in X Theme Cornerstone. I am not able to.
5. The HTML code that I added to the Forum page does not work. When the New Topic link at the top of the Forum page is clicked, I would like it to go to the New Topic form at the bottom of the page. However, the HTML code that I added does not seem to work. What is the full page code for this?
Forum page code
<a href="https://www.thosecrazyvegans.net/wp-login.php">Login</a> <a href="https://www.thosecrazyvegans.net/register">Register</a>
<a href="https://www.thosecrazyvegans/forum#newtopic">Create New Topic</a>
[bbp-forum-index]
<a href="#newtopic">[bbp-topic-form]</a>
Thank you.
Maybe you mean the buddypress profile page?
in that case this piece of code in the functions.php of your theme might help:
function sh_walled_garden() {
global $bp;
if( bp_is_register_page() || bp_is_activation_page() )
return;
if( ! bp_is_blog_page() && ! is_user_logged_in() )
bp_core_redirect( $bp->root_domain .'/'. 'LOGIN_PAGE_NAME' );
}
add_action( 'get_header', 'sh_walled_garden' );
‘LOGIN_PAGE_NAME’ = whatever page name you use to login
either put this in your functions file
add_filter( 'bbp_get_forum_archive_title', 'tcv_forum');
function tcv_forum () {
Return 'whatever you want it to say' ;
}
or create a page called whatever you want it to say, and put this in the content
[bbp-forum-index]
either put this in your functions file
add_filter( 'bbp_get_forum_archive_title', 'tcv_forum');
function tcv_forum () {
Return 'Forum' ;
}
or create a page called forum, and put this in the content, and then point your menu at this page
[bbp-forum-index]
I found the pieces and bits necessary to make this happen.
// ALTER TinyMCE INIT FOR VISUAL EDITOR ON FORUM TOPICS AND REPLIES
// SOURCE: https://bbpress.org/forums/topic/alter-mceinit-for-visual-editor-on-topics/
// Enable visual editor on tinymce in bbPress
function bbp_enable_visual_editor( $args = array() ) {
$args['tinymce'] = true;
return $args;
}
add_filter( 'bbp_after_get_the_content_parse_args', 'bbp_enable_visual_editor' );
// Enable TinyMCE paste plugin
function bbp_add_paste_plugin($args) {
$args[] = 'paste';
return $args;
}
add_filter( 'teeny_mce_plugins', 'bbp_add_paste_plugin');
// ADDS A JQUERY PASTE PREPROCESSOR TO REMOVE DISALLOWED TAGS WHILE PASTING
// SOURCE https://jonathannicol.com/blog/2015/02/19/clean-pasted-text-in-wordpress/
function configure_tinymce($in) {
$in['paste_preprocess'] = "function(plugin, args){
// Strip all HTML tags except those we have whitelisted
var whitelist = 'a,p,span,b,strong,i,em,h3,h4,h5,h6,ul,li,ol';
var stripped = jQuery('<div>' + args.content + '</div>');
var els = stripped.find('*').not(whitelist);
for (var i = els.length - 1; i >= 0; i--) {
var e = els[i];
jQuery(e).replaceWith(e.innerHTML);
}
// Strip all class and id attributes
stripped.find('*').removeAttr('id').removeAttr('class');
// Return the clean HTML
args.content = stripped.html();
}";
return $in;
}
add_filter('teeny_mce_before_init','configure_tinymce', 99999999999);
Need help pleass
I have installed the bbpress plugin and but its not showing in widget section like i cant add widget to it
Also in the forum everything is white like these code buttons where you can post a topic
I am latest wordpress and using premium theme
Thankyou
not tested but try adding this to your functions file
add_filter( 'bbp_get_reply_author_display_name', 'rew_display_first_name' 10, 2);
function rew_display_first_name ($author_name, $reply_id ) {
$reply_id = bbp_get_reply_id( $reply_id );
// User is not a guest
if ( !bbp_is_reply_anonymous( $reply_id ) ) {
// Get the author ID
$author_id = bbp_get_reply_author_id( $reply_id );
// Try to get a display name
$author_name = get_the_author_meta( 'first_name', $author_id );
// Fall back to user login
if ( empty( $author_name ) ) {
$author_name = get_the_author_meta( 'user_login', $author_id );
}
// User does not have an account
} else {
$author_name = get_post_meta( $reply_id, '_bbp_anonymous_name', true );
}
// If nothing could be found anywhere, use Anonymous
if ( empty( $author_name ) )
$author_name = __( 'Anonymous', 'bbpress' );
// Encode possible UTF8 display names
if ( seems_utf8( $author_name ) === false )
$author_name = utf8_encode( $author_name );
return apply_filters( 'rew_display_first_name', $author_name, $reply_id );
}
is it possible to create two forums? because I have a forum on my site for free users and the second forum with other topics should be for the pay users, the two forums are separated by two different pages on the site, so i need two forums with one database. I would block the pay forum with a “paid membership” addon for free users.
but as i can see i can just create one forum with one shortcode in bbpress?
I made a small change so that the user can choose the sort order, but can anyone tell me why it does not work?
function custom_bbp_has_topics($order) {
switch ($order) {
case 1:
$args['order'] = 'ASC';
break;
case 2:
$args['order'] = 'DESC';
break;
default:
$args['order'] = 'DESC';
}
return $args;
}
add_filter('bbp_before_has_topics_parse_args', 'custom_bbp_has_topics' );
Hello,
I created a page on the site with the shortcode [bbp-forum-index] and a custom title.
I have a problem with the breadcumbs (which I yet have on my site, implemented with the SEO YOAST plugin).
When I navigate through categories and forums, starting from the index page, breadcumbs works properly. When I open a topic, the root path of the forum disappears.
I’ll explain better:
the root page is http://www.apesca.it/forum
Breadcumb: Home »Forum
Within the category “Benvenuto – Presentazioni”…
Breadcumb: Home » Forum » Benvenuto – Presentazioni
I’m in the forum “Mi Presento”…
Breadcumb: Home » Forum » Benvenuto – Presentazioni » Mi presento
I’m in the topic “Ciao a Tutti” …
Breadcumb: Home » Benvenuto – Presentazioni » Mi presento » Ciao a Tutti
What i want to get is:
Home » Forum » Benvenuto – Presentazioni » Mi presento » Ciao a Tutti
I hope you can help me.
Just installed BBPress, and see that the editor is barebones html.
I’ve learned from this codex page that the visual editor is disabled by default – so I added the code snippet to my functions file, but no effect at all. Added TinyMCE Advance plugin, no effect at all.
What could be wrong?
(note: I see all sorts of references to “enable fancy WP editor” in older posts here, but can’t find that setting)
WP 4.8.3
BBpress: 2.5.14
these sortcodes are theme(or other plugin) related, not bbpress.
what theme are you using?
Hi,
Our site tyndale.edu is having an issue since one of the latest updates. Our pages that require a login widget no longer work correctly and simply display shortcode to the users on the screen. We use DreamPress through Dreamhost and they have not found a solution. We’re running WP 4.8.3 and BBPress Version 2.5.14. DreamHost support made this comment,”The page is using shortcode but functions.php should be picking it up but is not”. If you use the wayback machine and choose Feb. of this year everything works perfectly! unfortunately I don’t have any backups that go that far.
You can see examples of the problem on these pages: https://www.tyndale.edu/students/open/
and https://www.tyndale.edu/students/library/galaxie-journal/
Any ideas?