Grow your CSS skills. Land your dream job.

Limit user to 1 comment per post

  • # January 26, 2011 at 1:23 pm

    I am trying to figure out if there is anyway to limit users from replying more than once on a post. I’ve been searching for a while and so far havent found anything.

    Thanks.

    # January 26, 2011 at 2:42 pm

    An interesting question.

    You’d probably have to base it on IP if you do that, which could prove to be problematic and there will always be workarounds for the user.

    # January 26, 2011 at 2:43 pm

    What if I made all users register, then base it off of their username?

    # January 26, 2011 at 3:33 pm

    Interesting idea. Whats the theory behind it? Why limit to one comment?

    # January 26, 2011 at 3:40 pm

    Making users register is likely to put them off commenting, unless there is a point to them registering?

    # January 27, 2011 at 11:12 pm

    Its not to limit spam or anything, I basically want users to be able to submit an image/file/etc. and only want them to be able to do so on one post.

    so then the next day when I or the admin posts a new article the users can then again submit a reply and upload image/file/etc. only once.

    Hope I described that correctly.

    Thanks.
    Jake

    # January 29, 2011 at 1:52 pm

    Just wondering if anyone has got any ideas on this?

    Thanks,
    Jake

    # January 30, 2011 at 12:33 am

    I think you’re asking for the wrong info, Jake. I wouldn’t do that with comments. Sounds like it could be an easy way to get out of programming more complicated stuff, but in the end it probably won’t be. You need to develop a form for this, independent of comments. That or get a plugin. I don’t know a good one that allows image uploading, though (or any, actually).

    Heh, let me know if you figure it out, though. I’d like to know how to do some of that, too.

    # January 30, 2011 at 12:12 pm

    he never stated, and i’m curious, is this wordpress?

    # January 30, 2011 at 12:21 pm

    Yes, I am using wordpress for the backend. I’ve found a couple of plugins that will allow uploads of images, which will work for now. But yes, I need more of a submission type of plugin that would associate with the post they replied to. I am thinking that it would be better to get a plugin or create something that would handle this.

    If anyone knows of a plugin or another way of doing this please let me know.

    Thanks for the help.

    # October 26, 2012 at 7:15 am

    I saw this posted somewhere else ([Your text to link here...](http://wordpress.org/support/topic/one-comment-per-user-per-post?replies=8 “Clicky”)).

    < ?php
    global $current_user;
    $args = array('user_id' => $current_user->ID);
    $usercomment = get_comments($args);
    if(count($usercomment) >= 1){
    echo 'disabled';
    } else {
    comment_form();
    }
    ?>

    Maybe it’s possible that it would check the post id to see if they posted, then if they didn’t, then they could post.

Viewing 11 posts - 1 through 11 (of 11 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".