3

I'd like to allow anyone to comment through my EE site, but it seems that the standard comment module only allows a logged in user to comment.

Is there a way to:

  1. allow any one to comment
  2. assume that any logged in user is a member of X member group
  3. assign non-logged in visitors to the site a temporary membership - for example as part of the guest group?

Any pointers much appreciated!

----- EDIT in response to Jerome and Tidy's questions -------

My comments form code is below. If I am logged in to EE the form appears, if I am not logged in then the form does not appear at all.

I have double checked both that 'can post comments' is set to yes for the 'guest' account and that, on my channel, 'Require membership in order to post comments?' is set to 'no' plus 'Allow comments in this channel' is set to 'yes'.

{exp:comment:form channel="shop_products" entry_id="{entry_id}" rating:enabled="yes"}
        {if rating:already_rated} You have already rated this entry{/if}

        {if rating:not_rated}
            <label>Rating</label>
            <select name="rating[default]">
                <option value="1">1</option>
                <option value="2">2</option>
                <option value="3">3</option>
                <option value="4">4</option>
                <option value="5">5</option>
            </select><br />        
        {/if}

        {if logged_out}
            <label for="name">Name:</label><br /><input type="text" name="name" value="{name}" size="50" /><br /><br />
            <label for="email">Email:</label><br /><input type="text" name="email" value="{email}" size="50" /><br /><br />
        {/if}

        <label for="comment">Review:</label><br />
        <textarea name="comment" cols="70" rows="10">{comment}</textarea><br /><br />

        <input type="submit" value="Submit Comment">

    {/exp:comment:form} 
2
  • 1
    what is the error a non-member sees? And what is that rating:enabled, that's not something from the standard comment module, if i'm correct?
    – GDmac
    Feb 22, 2013 at 14:24
  • Thanks GDmac. I've just tried the code with the ratings add on removed and it is appearing. I don't know why I hadn't tried that before. I'll look at the ratings settings now to see what is going on there. Many thanks!
    – Tomtids
    Feb 22, 2013 at 14:47

3 Answers 3

3

Any user is automatically a member of the default "guest" member group. To allow them to comment, just edit the "guest" member group preferences

  • Control panel, members > member groups
  • look for comment posting privileges and set it to "yes".

Have you tried that and it does not work?

1
  • Thanks for your comment Jerome. The settings were as you described - I've updated my question to clarify these points.
    – Tomtids
    Feb 22, 2013 at 13:59
1

As well as checking the guest member group permissions as Jerome outlined, in the channel preferences, under comment posting preferences, check that 'Require membership in order to post comments?' is set to no.

1
  • Thanks for your comment Tidy. The settings were as you described - I've updated my question to clarify these points.
    – Tomtids
    Feb 22, 2013 at 13:59
1

It wasn't the comments module that was hiding the form, it was the channel_ratings add on i was using with it. Adding the parameter rating:allow_guests="yes" to the code above sorted my issue. Code repeated below.

Many thanks to GDmac for helping me see the light!

{exp:comment:form channel="shop_products" entry_id="{entry_id}" rating:enabled="yes" rating:allow_guests="yes"}
    {if rating:already_rated} You have already rated this entry{/if}

    {if rating:not_rated}
        <label>Rating</label>
        <select name="rating[default]">
            <option value="1">1</option>
            <option value="2">2</option>
            <option value="3">3</option>
            <option value="4">4</option>
            <option value="5">5</option>
        </select><br />        
    {/if}

    {if logged_out}
        <label for="name">Name:</label><br /><input type="text" name="name" value="{name}" size="50" /><br /><br />
        <label for="email">Email:</label><br /><input type="text" name="email" value="{email}" size="50" /><br /><br />
    {/if}

    <label for="comment">Review:</label><br />
    <textarea name="comment" cols="70" rows="10">{comment}</textarea><br /><br />

    <input type="submit" value="Submit Comment">

{/exp:comment:form} 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.