Search Results for 'code'
-
Search Results
-
Would it be possible to add a filter to the function that determines the status of a new topic? I understand there is some moderation in place using the word list, topic duplicate, user blacklist, etc. However, I currently have the need to determine the status based on user role. We want all admins and editors to show topics immediately after creation, however, we want subscribers to be set as pending so we can proactively moderate topics (not necessarily replies).
I have added a filter in the core code in order to achieve this. I was wondering if this change could be added to future versions of bbPress. The change is in bbpress>inclues>topics>functions around line 287. It looks like this:
/** Filter Topic Status ***************************************************/ $new_topic_args = array($anonymous_data, $topic_author, $topic_title, $topic_content); $topic_status = apply_filters('bbp_new_topic_status', $topic_status, $new_topic_args);Please let me know whether or not this will be implemented, so I know whether or not to update the plugin.
Thanks.
Topic: Search form by forum ID
Hi, I’m new with bbpress and using a WP (v4.7.3) with WPML (v3.6.6) to display 2 languages. I created 2 main forums named “English Forum” and “French Forum” with some sub forums under each of them, and I’m looking now for a way to display a search form to target only the “english forum” but also his child forum, and another which target the “french forum” with his child ones.
I’ve found this :http://sevenspark.com/tutorials/how-to-search-a-single-forum-with-bbpress
but it only search on a single forum ID (not to child ones).I googled for hours but, surprisingly, found nothing really helpful.
I can create my own shortcode to display a search form but how to target a forum_id?
Thanks for any help…
Topic: Question about Guest posting
Hi there,
Was wondering how do I control the capabilities and permissions for guest posters i.e. the posters who can reply and create topics without registering.My forum requires anonymous guest posting but I need to give Anonymous posters the ability to edit and delete their posts.
I’m not a coder but I can figure it out, the part where I’m stuck is that I can’t find any info on what variable or function controls guest posters. I looked into Capabilities.php and at first mistook spectators for guest posting, however that’s not the caseThanks
Topic: Stop all emails from bbpress
I have a number of not so happy customers being inundated with emails from the forum, they are receiving numerous repeat emails for some reason.
I’m happy to try and figure it out, BUT for the URGENT NOW, I need a way to just shut off all the emails coming from bbpress. Is there a surefire way to do this?
happy with functions.php code snippets, anything
thanks for your help
Brett
I’m working an educational website that produces video content and uses a BBPress forum for discussion rather than the native WordPress comments. Here’s how it works:
I have a hook on
wp_insert_postthat creates a new BBPresstopicwhen a newvideopost is created and saves this newtopic_idto a_comment_topic_idmeta field.In my
single-video.phptemplate where the video is displayed, I’m using the BBPress[bbp-single-topic id=$topic_id]shortcode to display the topic thread and reply form for people to post comments.All of this works great! I’m just having one problem – the “subscribe” feature of BBPress isn’t working when people post replies via the Video Single page. The reply is posted just fine, but subscribed users don’t receive a notification. If you’re not familiar – when a user subscribes to a thread, they receive an email whenever someone replies to the thread. This is still working fine when someone posts a reply via the actual Thread single page – it’s only a problem on the thread embedded via the shortcode on the Video single page.
I’ve tried digging into the core and I got so far as to discover that the
bbp_new_replyaction isn’t firing – BBPress uses a function calledbbp_notify_topic_subscribershooked intobbp_new_replyto send the notifications and that function isn’t running at all when a reply is made via the Video single page.It seems that BBPress uses some hidden inputs to determine what actions to run after a reply has been submitted, but those seem to be included properly through the shortcode. These appear at the bottom of the Topic single form (that works properly);
<input type="hidden" name="bbp_topic_id" id="bbp_topic_id" value="422573"> <input type="hidden" name="bbp_reply_to" id="bbp_reply_to" value="0"> <input type="hidden" name="action" id="bbp_post_action" value="bbp-new-reply"> <input type="hidden" id="_wpnonce" name="_wpnonce" value="83ea236cd1"> <input type="hidden" name="_wp_http_referer" value="/forums/topic/SLUG/">And these appear at the bottom of the Video single form (that doesn’t)
<input type="hidden" name="bbp_topic_id" id="bbp_topic_id" value="422573"> <input type="hidden" name="bbp_reply_to" id="bbp_reply_to" value="0"> <input type="hidden" name="action" id="bbp_post_action" value="bbp-new-reply"> <input type="hidden" id="_wpnonce" name="_wpnonce" value="83ea236cd1"> <input type="hidden" name="_wp_http_referer" value="/videos/SLUG/">I’m at a loss for how to debug this issue further and could really use some help. BBPress has all kinds of page type/post type checks in the core that I’ve been ducking and weaving around, but this one has got me stumped. I suspect the problem is that SOMEWHERE it’s checking the post type of the current post, seeing it’s a
videoinstead of atopicand bailing before the action runs, but I have no idea how or where to find that and how to patch around it.Thanks!
I am looking to make my “New Topic” button below follow the pagination, by that I mean if there is only one page and the pagination links don’t exist I want the “New Topic” button to appear all the way to the right. If there is pagination I want it to sit at it’s left most side like my example below. Right now I’m just placing it there in a static position which means on pages with no pagination it’s just floating in space.
Example position:

This is the static code I’m using for the button:
#bbpress-forums .new-topic { margin-top: -41px; margin-right: 80px; float: right; }