[multiple plugins] Moderation issues
-
Hello.
I want to start by thanking the following developers: _ck_, Nightgunner5, Yu-Jie Lin, Olaf Lederer and michelwppi; for their time and effort in bringing about some very useful plugins.
I have a few comments of my own, and in some cases, very important questions as well.
Even though I have very few genuine users on my forum – four to be more precise, I have decided to (try to) offer as good of a service as I can. I have had a couple of spam posts (5.88%), which Akismet handled impeccably so far.
Also, in the last few days I have had about 20-25 new users that only registered, and considering some of their email addresses, have no other intention but to spam. In this case, another useful plugin came to my rescue, Enhanced Registration, which appears to be doing the perfect job. In conjunction with this plugin, I am using New User Notification Email, so I am always notified whenever a new user registers and if in X hours he/she doesn’t login, then their username is removed and my database kept clean. A very good combination in my opinion.
Further on, a common plugin for moderation that I am also using is bbPress Moderation Suite, and I am sure that it would prove its worth when people will be more interested in what I have to say on my forum. Anyway, I think it’s missing a very useful feature, provided (luckily enough) by Moderate new members’ first posts. Now, I have no doubt that this last plugin is working fine with some people, but not with me. What I wanted was to be notified once at an email address of my own choice (other than admin_email), whenever a new member made his first post (or after two). After that, he/she would post unhindered.
So, I (think that I) have identified the section in the plugin that needs attention, where the post count is made:
if(!is_moderator($bb_current_user->ID)) {
$sql = "
SELECT COUNT(*)
FROM $bbdb->posts
WHERE poster_id = $bb_current_user->ID AND post_status = 0
";
$userpostcount = intval($bbdb->get_var($sql));
}And where they are marked for moderation (as spam):
if($userpostcount <= POST_NUMBER_MODERATION) {
$sql2 = "
UPDATE $bbdb->posts
SET post_status = 2
WHERE poster_id = $bb_current_user->ID
";
$markedasspam = $bbdb->get_results($sql2);
}Now, I wouldn’t know what or where to edit in order to have it do what I want, and that is why I would appreciate it if someone who does know it would assist me. No matter how many times my dummy user called “testing” makes a post, I always get a notification, at the default email address.
I only want to be notified of the first post because I am using xili New Post Notification (xnpn) for the rest of them, at a different email address. What I like about this plugin is that it gives me the possibility to assign an email address of my own choice. It’s true that I would get an email twice when an user would post for the first time (2 plugins), but I can live with that, since they are at different email addresses (the default and my choice).
Thank you,
Bob
-
HI Pastor Bob,
writing on an phone, so can’t write out full code, but you also want to test for “post_position=1” to check if it’s the first post.
Hello Kevin.
Thanks again for your intervention.
So, instead of
post_status = 0
I should usepost_position=1
?But then how is it going to be handled by askimet after that? Because I read here that 0,1 and 2 are statuses that akismet sets.
Or is this another solution to my first post moderation?
I am sorry that I cannot follow. I wish I would be quicker.
Regards,
Bob
Pastor Bob,
I’m sorry, i’ve gotten it wrong.
I thought you wanted notification of a first post (or a new topic) and not every reply. So i’ve caused some confusion, sorry.
It seems to me that everything is working well, just not in the right order for you.
The way it works:
1) New Post
2) A plugin Email’s you
3) Checks and makes spam.
The way you want it to work:
1) New post
2) Check and make spam
3) A plugin Email you if first time poster.
To that end, what you’re looking for is something called “add_action”. It’s the plugin API call. It looks like this:
add_action('action_name','function_to_fire',priority);
priority can be left empty (and is then classed as 9? by default) and the lower number is fired first.
The theory is, if you make sure that your “mark as spam” plugin fires before your email plugin (give them numbers 7 and , then you should be ok.
So go through each plugin, looking for the add_action line. See if there’s a time when they both fire at the same “action name”, and then add/change the priority.
Other than that, it seem slike a custom plugin would be the way forward.
Hello Kevin.
“I thought you wanted notification of a first post (or a new topic) and not every reply”. That is exactly what I want to achieve with this plugin. It is not you who has caused the confusion, but me, due to my inability to explain myself.
Again, you have identified precisely how I want it to work.
“
1) New post
2) Check and make spam
3) A plugin Email you if first time poster.”
These are the actions for Moderate new members’ first posts:
add_action('bb_new_post', 'mod_notification_new_post');
add_action('extra_profile_info', 'mod_notification_profile');
add_action('profile_edited', 'mod_notification_profile_edit');And this for xili New Post Notification (xnpn):
add_action('bb_new_post', 'admin_notification_new_post');
I intend to leave xili’s plugin always activated, so my designated email address will receive all post notifications.
Now, using the moderator’s plugin, the admin_email should receive only the first post notification.
So, the changes should look like this?
add_action('bb_new_post', 'mod_notification_new_post', 7);
. This is the action that marks a post as spam and sends the email to the admin. Is the other email address going to receive the same email?But I don’t understand how is a second post from that same user, going to activate the other plugin and send an email only to the second email address and not the first.
add_action('bb_new_post', 'admin_notification_new_post', 9);
Have you, by any chance, tried the two plugins?
Anyway, I cannot try any of these settings at the moment, since I have to deal somehow with an unexpected 403 error.
Oh, and the custom plugin sounds like a very nice idea, but I’m afraid that it is something way beyond my abilities.
Thank you.
Bob
Hello again.
Good news. I realised (by reading properly) that I only had to change one thing in this line.
if (!defined('POST_NUMBER_MODERATION')) define('POST_NUMBER_MODERATION', 5);
From
define('POST_NUMBER_MODERATION', 5)
todefine('POST_NUMBER_MODERATION', 1)
.And now it does exactly what I want. Let me resume it all.
An user signs up for the first time on my forum. These two plugins take action: Yu-Jie Lin’s Enhanced Registration to guard me from uninterested users, giving them a specific deadline to login; and New User Notification Email to notify me that a new user has signed up.
After that, 3 other plugins come in. First, Moderate new members’ first posts, notifies me that a new user has made his first post. Depending on the type of the post (spam/non-spam), Spam Notification will take action, and let me know what’s happening and so I can take action myself. At the user’s second post and from there onwards, xili New Post Notification (xnpn) steps in, and notifies me whenever a new post is made, but is no longer moderated, and so the users post freely.
These 5 plugins are brilliant, and if someone was to implement them all in bbPress Moderation Suite, as selectable modules, that would truly become a must-have plugin.
Anyway, another thank you to the developers and thank you Kevin as well.
Best regards,
Bob
Hello.
I apologise for reopening this topic, but I have a question.
Is it possible to show a message to the users, after they have made their first post, letting them know that their post is being moderated?
If yes, how?
This is the plugin that I am using.
Is it based on the following principle?
add_action('action_name','function_to_fire',priority);
I might be terribly wrong, so please bear with me.
Which in my case would mean that after this function
mod_notification_new_post
fires, my own function (say, notification_to_user) would go. So I shouldadd_action('bb_notify_user', 'notification_to_user',9);
Then after these 3 actions:
add_action('bb_new_post', 'mod_notification_new_post',1);
add_action('extra_profile_info', 'mod_notification_profile');
add_action('profile_edited', 'mod_notification_profile_edit');I should add the other one.
Say this would work, how can I have the user see the message in the (empty) box of the post that he has just made?
I hope that I haven’t insulted anyone’s intelligence with my question(s).
Thank you.
Bob
I am closing this topic, only to reopen it when I have a better understanding about what I want to achieve.
Regards,
Bob
- You must be logged in to reply to this topic.