Digital Arm
Forum Replies Created
-
Glad to hear it ??
If you would like to leave a review, that would be much appreciated, you can do that here: https://www.ads-software.com/support/plugin/moderation-tools-for-bbpress/reviews/
Ok the issue was that the filter doesn’t actually have the post ID available, as it’s triggered on pre insert. This is something we’ll have a look at improving in future.
I’ve adjusted the code so it now works, new snippet below:
function my_lockdown_forum( $pending, $post ) { $lockdown_forum_id = 5; $forum_id = $post['post_parent']; // Delete this if statement if you don't want to lock down replies if ( 'reply' === $post['post_type'] ) { $topic = get_post( $post['post_parent'] ); $forum_id = (int) get_post_meta( $topic->ID, '_bbp_forum_id', true ); } if ( $forum_id === $lockdown_forum_id ) { $pending = true; } return $pending; } add_filter( 'bbp_modtools_moderate_post', 'my_lockdown_forum', 10, 2 );
I’ve applied this to your staging site so you can test there. Note the comment above the if statement which you can delete if you don’t want to lockdown replies.
Let me know how you get on!
Sure. Please email details to [email protected]
Ok so a couple of things:
1. Make sure you aren’t testing this with a user who has moderation permissions, as moderation is skipped for these users.
2. You will need to have some level of moderation switched on for all forums, as otherwise the filter won’t be reached. So for example you could just have the “Unapproved users posting below the English character threshold” setting turned on.
This might be an easier way to do it. If it doesn’t work, I’ll do a test tomorrow and get you some working code!
<?php function my_lockdown_forum( $pending, $post ) { $forum_id = get_post_meta( $post->ID, '_bbp_forum_id', true ); $lockdown_forum_id = 99; if ( $forum_id === $lockdown_forum_id ) { $pending = true; } return $pending; } add_filter( 'bbp_modtools_moderate_post', 'my_lockdown_forum', 10, 2 );
There was a comma missing, my mistake! Revised code:
<?php add_filter( 'bbp_modtools_moderate_post', function( $pending, $post ) ) { $forum_id = get_post_meta( $post->ID, '_bbp_forum_id', true ); $lockdown_forum_id = 99; if ( $forum_id === $lockdown_forum_id ) { $pending = true; } return $pending; }
Make sure to change the $lockdown_forum_id to be the ID of the forum you want to lockdown.
Hi,
Currently the plugin doesn’t support different moderation rules for different forums.
Your suggestion to have moderation settings on the edit forum page is interesting and something we’ll look at ??
For now, there is a filter you could use to always mark posts as pending if the topic/reply belongs to a particular forum.
Here’s a quick (untested) snippet:
<?php add_filter( 'bbp_modtools_moderate_post' function( $pending, $post ) ) { $forum_id = get_post_meta( $post->ID, '_bbp_forum_id', true ); $lockdown_forum_id = 99; if ( $forum_id === $lockdown_forum_id ) { $pending = true; } return $pending; }
Hi,
Currently the plugin doesn’t support different moderation rules for different Forums. It’s something we’re looking at though.
Thanks.
Hi,
Yes you could use “Lockdown” mode to achieve this.
I’ll mark as resolved but let me know if you have any follow up questions.
Thanks.
Forum: Plugins
In reply to: [bbPress - Moderation Tools] ModerationThanks for your feedback.
Topics held for moderation are only visible to users with moderation capabilities. So your guests/subscribers won’t be able to these posts.
Are you saying you would like an additional option to hide pending posts for moderators or does the above clear things up?
Forum: Plugins
In reply to: [bbPress - Moderation Tools] 404 errorAre you running the latest version of the plugin?
If you would like to create an Admin account and send details to team[at]digitalarm.co.uk I would be happy to have a look to help troubleshoot the issue.
Forum: Plugins
In reply to: [bbPress - Moderation Tools] question about pending topic notificationsGlad to hear that’s working and the plugin is working well for you!
Forum: Plugins
In reply to: [bbPress - Moderation Tools] Error message displayedThanks for flagging this. This has been fixed in the latest 1.2 release.
Forum: Plugins
In reply to: [bbPress - Moderation Tools] question about pending topic notificationsThese are sent using the To: field. Which plugin are you using for email queueing?
Forum: Plugins
In reply to: [bbPress - Moderation Tools] Undefined variable: post_idThanks for flagging this. This is now fixed in the latest 1.2 release.