I have the same problem. Double quotes are converted into " and saved in the DB in this way.
If, for example, I create a post using the WordPress admin panel,
its columns ‘post_content’ and ‘post_title’ in the table ‘wp_posts’ are saved like this:
"Post title" and "Post content"
If I create a topic on a BBPress topic page, its data saved in the DB like this:
"Topic title" and "Topic content"
So the issue mentioned by @jakubmarian is not resolved yet 🙁
How can we please resolve it?
Hi Robin !
LOL !
I talk too much, but as I want to give as many detail as possible…
Your code is working for the pages of the site.
Your code is NOT working for ALL the forum pages of the site
Your code is applied for all the pages, that’s it takes almost 100% of the page, but site pages are not concerned by my problem.
Your code doesn’t make any difference when applied to the forum pages.
I was just adding in my previous post that I have the same problem for my second issue with the background gradient that is not applied either, unless the code is not correct, but I don’t think so !
Thinking about all this yesterday, I’ve got the feeling that in fact, what is desperately keeping void corresponds to the place that should be occupied by the sidebar, even though I told you that I have no sidebar on all the site pages as well as the forum pages.
But there’s a section dedicated to its management in this new theme and version of WordPress 4.7.2 !
I removed all the widgets initially present in this sidebar but maybe the code keeps holding the place !?
It’s as if this part of the code keeps applying in the end, prevailing on the child theme css code !
Hope this is clear now ! 😉
Regards,
Philippe
Alright, when I block links with: remove_filter( ‘bbp_get_reply_content’, ‘bbp_make_clickable’, 4 );remove_filter( ‘bbp_get_topic_content’, ‘bbp_make_clickable’, 4 );
it seems to work BUT admins can’t post links either even with the code you have sent me.
Secondly, the links doesn’t work wich is good BUT site that doesn’t provide a “www” can still be clickable so when someone type:” https://bbpress.org ” this link is clickable and both admins and user can do that, and if you type: “www.google.ca” then both admins and user can do that and it WONT be clickable.
I would like the admins to be able to send link, AND be able to block non www links too.
Thanks you.
Yes,
If your remember, I have a page dedicated to Members and protected by a password (with or without it doesn’t make any difference either, of course), and the 3 following pages on the which I simply pasted the relevant short codes:
– “Forum” which is the default bbpress root page, I simply added a shortcode for the connection widget thanks to a plugin otherwise I couldn’t have done it on this specific page (but my VM doesn’t have it and again it makes no difference)
– “Registration”
– “Reset password”
Regards,
Philippe
ok, try
$user_id = wp_get_current_user()->ID;
if ( !bbp_is_user_keymaster($user_id )) {
remove_filter( 'bbp_get_reply_content', 'bbp_make_clickable', 4 );
remove_filter( 'bbp_get_topic_content', 'bbp_make_clickable', 4 );
}
Your code for the page width is still working on ALL pages as expected, therefore the CSS is bieng applied, BUT the code doesn’t apply to the “page.php” template used by the forums !
Do you have a page set up for forums? ier one that is using [bbp-forum-index] ?
no one can post links, wich is good, but the code : !bbp_is_user_keymaster, did not let keymaster be able to do so.
oh and by the way, bbpress links still works on my forum wich is normal I suppose?
Hello Robin,
Yep, always, and this is a copy of the original one where I just changed as advised in one of the forums I mentioned previously, to change the DIV that way :
<div class=”wrap page-full-width“>
<div id=”primary” class=”content-area-wide“>
<main id=”main” class=”site-main” role=”main”>
Actually, both child theme folders (the real site and my VM) contains those files :
– bbpress.php
– functions.php
– page-full-width.php
– screenshot.jpg
– style.css
This latter currently contains only your code as well as the code for background gradient as the page-full-width does the job for the page width, I mean, only for the site pages except forum ones !
The rest is similar.
Regards,
Philippe
untested, but this should make the filter only removed if they are not a keymaster
if ( !bbp_is_user_keymaster()) {
remove_filter( 'bbp_get_reply_content', 'bbp_make_clickable', 4 );
remove_filter( 'bbp_get_topic_content', 'bbp_make_clickable', 4 );
}
Hello Robin,
Don’t know if you could find something to help me, but I keep you informed of the progress on my side.
I’ve installed a virtual machine with the same WordPress version, twenty seventeen theme and almost all the plugins.
I’m now more comfortable “playing” with different themes and child themes, this is the positive side of the situation, I even corrected a mistake I initially made by creating my child theme inside the Twenty seventeen theme instead of at the same level as it !
Now it turns up in the theme section, I can activate it, but basically, it doesn’t make any difference !
Your code for the page width is still working on ALL pages as expected, therefore the CSS is bieng applied, BUT the code doesn’t apply to the “page.php” template used by the forums ! 🙁
I even tried simultaneously to find out a solution for a request from our site members, that’s a background gradient.
It doesn’t apply at all !
In fact, taking a closer look at the wysiwig panel in the Appearance section of the theme, I noticed that the gradient is applied but ONLY on the homepage and behind the image and NOT on the body of all the other pages of the site !
Trying to paste the code in the custom code or straight in the style.css file in the theme child produces the same result…
This is so incredible that nobody in the world can find a solution or has ever tried to customize these elements !
Hope is what makes us live…
Regards
Philippe
The Post Author is not showing anywhere on posts on our Topics page. Is there some custom CSS I can add to have the Author information come up underneath the post title?
We worked with a developer to style the forums, but I don’t want to go back to the developer at this point if possible (I’m not sure he knows what he’s doing), but I also don’t know enough to go into the code.
What I ve done:
1. installed bbpress plugin
2. added a filter bbp_show_lead_topic to do lead topic
3. added a filter bbp_has_replies_query to do DESC order
4. created a forum
5. created a topic under the forum
6. created a reply to the lead topic
7. repeatd 6. a couple of times by clicking Reply of topic-admin-links
8. created a reply to one of the replies created from 7., i.e. threaded reply.
9. got out of the forum, and revisited the forum, and clicked the topic to do a reply
a. clicked a link which is not the one of topic-admin-links, but reply-admin-links
b. but changed mind to click the one of topic-admin-links to the lead topic (remember !! having clicked the reply-admin-links, not clicking send button)
c. put some words into editor and Send
d. the reply is under the reply which was clicked at a., not the lead topic
The Reply topic-admin-links has [reply] => <a href="#new-post" class="bbp-topic-reply-link">Reply</a>
and it is ok before any Reply of reply-admin-links is clicked.
href=”#new-post” is pointing correctly when no bbp_reply_to is, i.e. no reply of reply-admin-links was clicked.
The Reply of reply-admin-links has `[reply] => <a href=”/forums/topic/test-topic1/?bbp_reply_to=18&_wpnonce=1d17517a0b#new-post” class=”bbp-reply-to-link”
onclick=”return addReply.moveForm(‘post-18′,’18’,’new-reply-8′,’8′);”>Reply</a>`
where 8 is the lead topic id, 18 is reply id
As far as reply-admin-links was clicked, href=”#new-post” of the Reply of topic-admin-links is meaning /forums/topic/test-topic1/?bbp_reply_to=18&_wpnonce=1d17517a0b#new-post
I don’t know whether it is the way supposed to be.
Or did I miss anything ?
Hello,
im not a developer.., can someone maybe help me to get the code work?
Thx
Regards
Sally
@padrenola I’ve added a reply on your ticket, but I wanted to post here as well.
The issue you are seeing is related to your theme, so you will want to get in touch with their support to get an official fix. You can send them to the ticket for background. https://bbpress.trac.wordpress.org/ticket/3059
In the meantime, adding the below code to the bottom of your theme’s/child theme’s functions.php file should give you some relief.
remove_filter( 'bbp_get_forum_topic_count_int', 'x_bbpress_filter_forum_topic_count' );
remove_filter( 'bbp_get_forum_reply_count_int', 'x_bbpress_filter_forum_reply_count' );
remove_filter( 'bbp_get_forum_post_count_int', 'x_bbpress_filter_forum_post_count' );
Hey oyegigi,
Thanks for this, it works like a charm. I used the plugin “Shortcodes in Menus” as a quick solution to output to a menu.
Would be great if you could amend the code to show, only if user is logged in?
Thanks again!
Hi,
1.- What you mean with overlap? Do you want to put together both fields? Debates are topics, and Publications are topics and replies.
2.- You can translate bbPress using pod files:
bbPress in Your Language
Also, you can visit this page about bbPress in Spanish
Suerte!
Thanks for the answer @benklocek
I am still looking for the right code, I will post here once I got it 😉
I was thinking what could be the best way…
1.-Create a custom role and then use the name of role to translate it. (I am doing this.)
2.-Give to spectator role the participant´s capabilities and then translate it.
I need two participant roles, with differents name. Just to make more fun the forum style. Just like the ticket about “Add CSS class for user roles in topics and replies”.
Regards,
Here’s the list of names as set by default: http://hookr.io/functions/bbp_get_dynamic_roles/
You should be able to use:
$roles = bbp_get_dynamic_roles();
$print_r( $roles );
to see what the names of your roles are.
Thanks for the code @benklocek
I created a custom role with this code:
//Custom Role Admin
function add_custom_role( $bbp_roles ) {
$bbp_roles['my_custom_role1'] = array(
'name' => 'Admin',
'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() ) // the same capabilities as admin
);
return $bbp_roles;
}
add_filter( 'bbp_get_dynamic_roles', 'add_custom_role', 1 );
and I can’t change the role name with @robkk code. But I did with your code. So I wonder what should I change to apply your code for all other roles, participant, moderator?
Thanks!
I tried couple ways but without success. Ex:
function my_custom_roles( $role, $user_id ) {
if( $role == 'Participant' )
return 'Participante';
return $role;
}
add_filter( 'bbp_get_user_display_role', 'my_custom_roles', 10, 2 );
Hi,
According to codex https://codex.bbpress.org/getting-started/before-installing/bbpress-user-roles-and-capabilities/ Moderators should be able to publish and edit forums.
This seems to be a bug cause they can’t. I’ve been reading a bunch of topics now and it seems like this has been a bug for more than FOUR YEARS. Why hasn’t codex been updated??
I’ve seen hints pointing out that moderators can actualy publish forums on front end with shortcode [bbp-forum-form] – this works but they can still not edit forums.
I’ve tried to edit the keymaster role and disable access to global forum settings but this didn’t work. There are a bunch of capabilities for every single action of bbpress. And then there is on huge capability for a monster amount of actions. This capability is keep_gate. When I disabled that for the keymaster role I managed to disable acces to global forum settings but acces to publish and edit forums was also disabled.
I want to achieve a role that has ALL the keymaster capabilities except from access to admin pages bbpress (global forum settings) and bbp-repair.
Is there anyway to do this?
Thanks!
Hi,
Plugin is on https://wordpress.org/plugins/bbp-api/ but let me see to copy the code to GitHub this weekend.
@jpvanmuijen on 2 of my forums it seems to give stats, but we should have that discussion at the support forum for bbp-api 🙂
Pascal.
I am trying to replace all the topics in a specific forum with the new topic form whenever I press on the Create New Topic button.
Then I tried to ajaxify it using the shortcode [bbp-topic-form], but the form didn’t showed up…
In the functions.php I have added this:
wp_enqueue_script( 'script', get_stylesheet_directory_uri() . '/js/topicButton.js', array ( 'jquery' ), 1.1, true);
wp_localize_script( 'script', 'script', array(
'ajaxurl' => admin_url( 'admin-ajax.php' )
));
..
..
add_action('wp_ajax_script', 'scriptfunc');
add_action('wp_ajax_nopriv_script', 'scriptfunc');
function scriptfunc() {
echo do_shortcode("[bbp-topic-form]");
die();
}
The ajax file
(function($) {
function find_forum_id() {
var forumidval = document.getElementsByTagName("article")[0].id;
forumidval = forumidval.replace(/\D/g,'');
return parseInt( forumidval );
}
$(document).on( 'click', '.bbp-new-topic-button', function( event ) {
event.preventDefault();
forumid = find_forum_id();
$.ajax({
url: ajaxurl,
type: 'post',
data: {
action: 'scriptfunc',
forumid: forumid
},
beforeSend: function() {
$('.bbp-topics').remove();
},
success: function( html ) {
$('article').append( html );
}
})
});
})(jQuery);
@jpvanmuijen I started looking at how bbPress works under the hood just recently, so I’m learning these things just by looking into the code and trying to guess. I’m glad I didn’t give a wrong hint 🙂
I’m not sure if there’s any higher-level logic wrapping this in bbPress functions, though; any experienced bbPress guy is more than welcome to expand on this: I’d be happy to know if there’s a better way.
Hopefully, with the REST API this sort of tasks will become pretty straight forward 🙂
@jpvanmuijen
Assuming $single_item[‘id’] contains the id of the reply, this should do what you want:
$topic_id = get_post( $single_item[‘id’] )->post_parent;