Search

bbPress Showcase » Plugins by Others

  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 1 year ago #
  2. _ck_
    _ck_

    senior admin
    Joined: Jul '06
    Posts: 884

    offline

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

    Posted 1 year 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 1 year 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 1 year 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:
35 users online from in the past 30 minutes. 12 bots 22 guests 1 members: mccawphoto
137 views today 7,784 yesterday 14,010 peak. Most at once 39 today 63 yesterday 131 peak. Visited today: mccawphoto
2,240 posts in 380 topics over 63 months by 425 of 1,992 members. Latest: shairah27, Augustine01, MichaelGomez