• A client asks me if it possible to give his customers a password so they can add a review on his website. He then would like to be able to change the password over time. I have never heard or seen a website that has such an option, with a password or some other way of allowing but limiting comments on a page.

    I would be very happy with any ideas about how to do this.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Do you mean comment settings like this?

    Thread Starter Jack

    (@moxie)

    Yes and no :). I need a page where people can place comments, as in your screenshot, but not everyone may be able to place those comments, only certain visitors (= customers). So everyone can see the comments, but only people with a code or something can place comments.

    I know, this is a little strange, but he wants to prevent people (= other sellers) to place fake comments and only give his own customers an option to place a review.

    I’d suggest setting up custom user roles. In theory, the user who is allowed to comment would be in one group (where commenting is permitted). All other users would be in another user roles where commenting is NOT allowed. There’s plenty of plugin that allow you to define custom user groups/roles.

    If you look at the last line of the image, it says that the user must be registered and logged in to comment. That means you control who can comment by not letting everyone register.

    Thread Starter Jack

    (@moxie)

    Hi Tim and Joy. Both your suggestions will work I suppose, with user roles adding more flexibility. Thanks.

    Moderator bcworkz

    (@bcworkz)

    Adding custom roles (with appropriate custom capabilities) regarding comments is easy enough, either with custom code or one of the plugins Tim suggests. Roles and capabilities alone will not manage the creation of comments, as there are no built in checks for this.

    To manage the creation of comments by capability, use the ‘pre_comment_approved’ filter to further restrict comments that would otherwise be approved by default. Also note that it’s possible to assign capabilities to a particular user regardless of role.

    One other capability to consider regarding comments is if the role has unfiltered_html capability or not. Only give this to trusted users, as one can do bad things with unrestricted HTML.

    Thread Starter Jack

    (@moxie)

    Hi bcworkz. Thanks for explaining this further. I guess that the easiest solution in this case is to have one page where comments are enabled in combination with what Joy suggested, registering as subscriber in order to be able to leave a comment. Then my client could create only one subscriber, and give username and password to his customers so they can leave a comment.

    Moderator bcworkz

    (@bcworkz)

    Sure, if users who must not comment never need to be registered. But controlling by capability gives you much finer control of course, at the price of needing to take the time to write/install necessary code/plugins.

    Please don’t encourage anyone to implement shared accounts. Such a scheme is difficult to administrate, insecure, and there is really no need. I cannot think of any good reason people cannot have their own subscriber account. If there are so many users it’s impractical to add them manually, implement an open enrollment period or implement a security token (essentially a common password to get one’s own password) that is required to register. Any non-customers who slip through can be deleted easily enough.

    The token idea involves adding an extra registration field and filtering new registrations to verify the token. Not too much different than filtering comments by capability.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Option for allowing comments only for specific visitors’ is closed to new replies.