Search

bbPress Showcase » Plugins by Others

[by Olaf Lederer] Moderate new members' first posts

RSS

  1. pastorbobsforum
    pastorbobsforum

    member
    Joined: Aug '10
    Posts: 12

    offline

    Hello.

    I am using Olaf Lederer's plugin, to moderate only the first post made by an user. The plugin can be found here.

    I think that this is the section of the plugin that does the job:

    function mod_notification_new_post() {
    	global $bbdb, $topic_id, $bb_current_user;
    
    	$all_moderators = notification_select_all_mods();
    
    	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));
    
    		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);
    		}
    	}

    But is not working for me. Instead of allowing the user that has had his first post approved to post un-moderated, the admin email get notified for every post.

    Any help much appreciated.

    Regards,
    Bob

    Posted 2 years ago #
  2. _ck_
    _ck_

    senior admin
    Joined: Jul '06
    Posts: 900

    offline

    This one you'll have to ask on bbpress.org, I've never even heard of it.

    Posted 2 years ago #
  3. pastorbobsforum
    pastorbobsforum

    member
    Joined: Aug '10
    Posts: 12

    offline

    Hello.

    Well, I have asked right here.

    The reason for writing on your forum though, was because I am using some of plugins, New User Notification Email and Spam Notification among others, and thinking that this plugin (Moderate new members' first posts), would behave somehow in the same way as New User Notification does, I thought that you might have an idea on how I could fix it.

    Also, I have tried to write a menu for the aforementioned plugins, but even if I was receiving the emails, I couldn't get the correct content. Anyway, there was no need for the menus, because they both behaved exactly as I wanted them to.

    The only thing that I wanted was for the admin_email to receive the first post that an user made and hold it for moderation, after that all the other posts' notifications would go into another email account, something like xili New Post Notification (xnpn) does.

    Even if I don't find a solution on your forum ck, I still thank you for your work.

    Regards,
    Bob

    Posted 2 years ago #
  4. pastorbobsforum
    pastorbobsforum

    member
    Joined: Aug '10
    Posts: 12

    offline

    Hello again.

    I've solved it. The ones interested can find it here.

    Regards,
    Bob

    Posted 2 years ago #

RSS feed for this topic

Post a reply to “[by Olaf Lederer] Moderate new members' first posts”

You must log in to post.

keep _ck_ coding >> donate $5 <<     Theme Switcher:
37 users online from in the past 30 minutes. 6 bots 31 guests
9,999 views today 10,647 yesterday 89,978 peak. Most at once 111 today 87 yesterday 539 peak. Visited today: suzanne54415, _ck_, mary38491, Jund186811, por7kco2
2,408 posts in 414 topics over 78 months by 445 of 2,508 members. Latest: walkerthomac, elena0429, dancome89