Anonymous Comments

Due to popular request, we’ve added the ability for you to allow your visitors to comment without having to register. Just remember, without the enticement of building reputation (or the deterrent of losing it) you may see a drop in quality of comments as well as an increase of quantity. Please let us know your experience with anonymous comments!

How to turn them on:

If you’re using one of our pre-packaged themes:

  1. Dashboard → Configuration → Click the “Allow anonymous comments” checkbox

If you’re using a custom theme, you’ve got a little more to do:

  1. Add conditional display of the anonymous poster info fields: Find this in your _comment_form.liquid:
    
    {{ form.body }}

    ...and paste something like this above it:

    {% if comment.show_anonymous_poster_fields? %}
    <span id="PosterName" class="AnonymousCommentLabel">Name
    <small>(required)</small></span>
    <br/> {{ form.poster_name }}<br/>
    <span id="PosterEmail" class="AnonymousCommentLabel">Email
    <small>(required and never shared)</small></span><br/> {{ form.poster_email }}<br/>
    <span id="PosterURL" class="AnonymousCommentLabel">Website
    <small>(optional)</small></span>
    <br/> {{ form.poster_url }}<br/><br/> {% endif %}
    {{ form.body }}

  2. Only show voting controls on signed comments:
    Because anonymous users can not (and should not) gain reputation, you
    don’t want to show the voting controls. You’ll find something like this either
    in your _feedback.liquid or _comment.liquid:

    <div class="CommentVotingArea">
    [...]
    </div>
    <span id="{{ id.flagging }}" class="CommentFlag">
    or <a href="#" onclick="{{ action.flag }}"
    title="Alert the staff that this entry is inappropriate">
    Flag as Offensive/Spam</a>
    </span>
    [...] {% if on.poster %}
    &middot;
    <a href="#" title="Delete this entry and ban this person from posting again"
    class="AdminToolbarLink" onclick="{{ action.ban }}">Ban</a> {% endif %}

    ... and make it look like this:

    {% unless on.anonymous_poster? %}
    <div class="CommentVotingArea">
    [...]
    </div>
    {% endunless %}
    <span id="{{ id.flagging }}" class="CommentFlag">
    {% unless on.anonymous_poster? %}

    or 
    {% endunless %}
    <a href="#" onclick="{{ action.flag }}" 
    title="Alert the staff that this entry is inappropriate">Flag as Offensive/Spam</a>
    </span>
    [...]
    {% unless on.anonymous_poster? %}
      &middot;         
    <a href="#" title="Delete this entry and ban this person
    from posting again" class="AdminToolbarLink" onclick="{{ action.ban }}">
    Ban</a>
    {% endunless %}

  3. Show your comment form when it’s okay to comment:
    Find this in your story.liquid:

    <p><a class="actionmessage" href="{{ current_site.log_in_and_return_url }} {{ '#post_comment' | urlencode }}">Register or log in to comment</a></p>

    ...and replace it with:
    {% if story.show_comment_form? %}
      {% include 'comment_form' %}
    {% else %}
      <p><a class="actionmessage" 
    href="{{ current_site.log_in_and_return_url }}{{ '#post_comment' | urlencode }}">
    Register or log in to comment</a></p>
    {% endif %}

  4. Stylize the new bits: Add these styles to your screen.css:

    .AnonymousCommentLabel {
    font-style: italic;
    }
    .comment_poster_name {
    width: 255px;
    }
    .comment_poster_email {
    width: 255px;
    }
    .comment_poster_url {
    width: 255px;
    }
    .comment_body {
    width: 510px;
    }
    .comments {
    font-weight: bold;
    padding-bottom: 2em !important;
    }
    .CommentInputErrorMsg {
    font-size: 1.1em;
    color: #c00;
    font-weight: bold;
    margin-bottom: 1em;
    }

Rate This Story

Register or log in to rate
Average rating:

Talk about Anonymous Comments

josef pig said   Edit (for another )
josef pig

nice!

Register or log in to comment