Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 7 replies - 1 through 7 (of 7 total)

  • iameverywhere
    Participant

    @iameverywhere

    Would this work?

    function spammersdeletion() {
    global $wpdb;
    $from = strtotime('-30 day', time());
    $wpdb->query('DELETE FROM wp_users WHERE DATE(user_registered) < "'.date('Y-m-d', $from).'"AND user_status = "2"');
    }
    
    add_action('init','spammersdeletion');

    iameverywhere
    Participant

    @iameverywhere

    no one has done it yet? seems like such a quick fix… maybe ill make a plugin


    iameverywhere
    Participant

    @iameverywhere

    Just a heads up, because I know a lot of people have asked and not gotten anywhere, but you can use this feature + Buddypress Xprofile Custom Fields Type plugin to create a forum badges feature. That was my goal with this and it works. You just need to display:none; the field# class so that users dont see it as an option to edit in their profile. Then you have complete control and can give users badges that show up in the forums ๐Ÿ˜€

    *flys away*


    iameverywhere
    Participant

    @iameverywhere

    IT WORKS!


    iameverywhere
    Participant

    @iameverywhere

    Dang doesn’t seem to work :c


    iameverywhere
    Participant

    @iameverywhere

    so to include it in my loop-single-reply.php i would add this code?

    <?php do_action( 'bbp_theme_after_reply_author_details', 'bbp_add_xprofile_field' ); ?>


    iameverywhere
    Participant

    @iameverywhere

    I don’t get where I add this code. I only need to add an xprofile field below the avatar on forum replies. I think this is exactly what I need but when I add this

    $user_location = xprofile_get_field_data( โ€˜Locationโ€™, bbp_get_reply_author_id() ) ;
    if (strlen($user_location) > 0 ) :
    echo โ€˜
    
    Location: โ€˜ . $user_location . โ€˜
    
    โ€˜;
    endif;

    below the <?php do_action( 'bbp_theme_before_reply_author_details' ); ?> it breaks my forums hard.

    Any idea how I am supposed to use that code to make it work?

    MANY THANKS!

Viewing 7 replies - 1 through 7 (of 7 total)
Skip to toolbar