hemingway-comments


<hr class="hide" />
  <div id="secondary">
    <div class="inside">
     {if $post->comment_status == 'open' && $post->ping_status}
        <!--Comments are open and Pings are open-->
        <div class="comment-head">
          <h2>{comments_number zero='No Comments' one='1 Comment' more='% Comments'}</h2>
          <span class="details"><a href="#comment-form">jump to comment form</a> | {comments_rss_link text='comments rss'}<br /> <br /> {_e text='trackback <acronym title="Uniform Resource Identifier">uri</acronym>:'} <a href="{trackback_url}" title="{trackback_url}">{trackback_url}</a></span>
        </div> <!--comment-head-->
      {elseif $post->comment_status != 'open' && $post->ping_status}
        <!--Only Pings are open-->
        <div class="comment-head">
          <h2>{comments_number zero='No Comments' one='1 Comment' more='% Comments'}</h2>
          <span class="details">comments are disabled | {comments_rss_link text='comments rss'}<br /> <br /> {_e text='trackback <acronym title="Uniform Resource Identifier">uri</acronym>:'} <a href="{trackback_url}" title="{trackback_url}">{trackback_url}</a></span>
        </div> <!--comment-head-->
      {elseif $post->comment_status == 'open' && !$post->ping_status}
        <!--Only comments are open, pings are not-->
        <div class="comment-head">
          <h2>{comments_number zero='No Comments' one='1 Comment' more='% Comments'}</h2>
          <span class="details"><a href="#comment-form">jump to comment form</a>  | {comments_rss_link text='comments rss'} | trackbacks are disabled</a></span>
        </div> <!--comment-head-->
      {else}
        <div class="comment-head">
          <h2>{comments_number zero='No Comments' one='1 Comment' more='% Comments'}</h2>
          <span class="details">comments and trackbacks are currently disabled</span>
        </div> <!--comment-head-->
      {/if}
  <!--comment form-->
  {* Variables that don't change (post/blog) *}
  {capture name=author_email}{the_author_email}{/capture}
  {capture name=author}{the_author echo=false}{/capture}
  {capture name=blog_title}{bloginfo show='title'}{/capture}

  {assign var='altcomment' value=''}

  {if $comments != ''}
    <ol id="comments">
      {foreach from=$comments key=key item=comment}
        {globalvar var='comment' value=$comment}
        {assign var=owner value=''}
        {assign var=comment_auth_email value=$comment->comment_author_email}

        {* Setup for owner comments, pingbacks and trackbacks *}
        {capture name=comment_type}{comment_type}{/capture}
        {capture name=self_ping}{comment_type}@{bloginfo show='url'}{/capture}
        {if $comment_auth_email == $smarty.capture.author_email or $comment_auth_email == $smarty.capture.self_ping|lower|replace:"http://":"" or $comment->comment_author == $smarty.capture.blog_title}
          {assign var=owner value=owner}
          {assign var=comment_auth_email value=$smarty.capture.author_email}
        {elseif $smarty.capture.comment_type == "Comment"}
          {assign var=comment_auth_email value=$comment->comment_author_email}
        {else}
          {* Off-site Trackback/Pingback.  Get an image from their site? *}
        {/if}

        <li id="comment-{comment_ID}" class="{comment_type} {$owner} {$altcomment}">
          {if $comment_auth_email != ""}
            <div class="gravatar">{$comment_auth_email|gravatar:"http://rajeev.name/images/default.jpg":"40":"":"0"}</div>
          {/if}
          <cite>
            <span class="author">{comment_author_link}</span>
            <span class="date">{comment_date}/{comment_time}</span>
          </cite>
          <div class="content">
            {if $comment->comment_approved == '0'}
              <em>Your comment is awaiting moderation.</em>
            {/if}
            {comment_text}
          </div>
          <div class="clear"></div>
        </li>

        {if $altcomment != 'alt'}
          {assign var='altcomment' value='alt'}
        {else}
          {assign var='altcomment' value=''}
        {/if}
      {/foreach}
    </ol>
  {else}
    {if $post->comment_status == 'open'}
      {* comments are open but there are no comments *}
    {else}
      {* comments are closed *}
      <p class="nocomments">Comments are closed.</p>
    {/if}
  {/if}

  {if $post->comment_status == 'open'}
    <div id="comment-form">
      <h3 class="formhead">Have your say</h3>
      <p><small><strong>XHTML:</strong> You can use these tags: {allowed_tags}</small></p>

      <form action="{$siteurl}/wp-comments-post.php" method="post" id="commentform">

        <input type="text" name="author" id="author" value="{$comment_author}" class="textfield" tabindex="1" required/><label for="author" class="text">{_e text="Name"}</label> {if $req != ''} {_e text='(required)'}{/if} <br />

        <input type="text" name="email" id="email" value="{insert name=var var=comment_author_email}"  class="textfield" tabindex="2" required/><label class="text" for="email">{_e text="E-mail (will not be displayed)"}</label> {if $req != ''} {_e text='(required)'}{/if}<br />

        <input type="text" name="url" id="url" value="{insert name=var var=comment_author_url}" class="textfield" tabindex="3" /><label class="text" for="url">{_e text="<acronym title='Uniform Resource Identifier'>URI</acronym>"}</label><br />

        <input type="hidden" name="comment_post_ID" value="{$post->ID}" />
        <input type="hidden" name="redirect_to" value="{$redirect_to}" />
        {if $captcha_image_URL != "" && $blog_user_level == -1}
          {$captcha_hidden_form_fields}
          <p><input type="text" name="captcha_value_typed" tabindex="5">
          <img src="{$captcha_image_URL}" align="center">
          <br>Anti-spam measure: please re-type the above text </p>
        {/if}

        <span id="quicktags"></span>
        <textarea name="comment" id="comment" class="commentbox" tabindex="4" class="resizable"></textarea>
        <div class="formactions">
          <p>FYI: Discriminatory and anonymous comments will be deleted.</p>
          <div id="livepreview"></div>
          <div id="preview"></div>
          <input type="submit" name="submit" tabindex="6" class="submit" value="Add your comment" />
          <span id="commentpreview"></span>
        </div>
      </form>
    </div><!--comment form-->
  {/if}
    </div><!--.inside-->
  </div><!--#secondary-->

3 responses to “hemingway-comments”

  1. Mypehienuen

    stimulating and communicative, but would make something more on this topic?

  2. car jacks

    I must say, that I can not agree with you in 100%, but that’s just my IMHO, which indeed could be very wrong.
    p.s. You have an awesome template for your blog. Where have you got it from?

Leave a Reply