The Official Posterous Tech Blog http://technology.posterous.com Peer behind the curtain. Find out how we work our magic. posterous.com Mon, 14 Feb 2011 15:57:00 -0800 Adding The New Liking Ability To Your Custom Theme http://technology.posterous.com/adding-the-new-liking-ability-to-your-custom http://technology.posterous.com/adding-the-new-liking-ability-to-your-custom
For those of you using custom themes, the new liking ability requires a small change to your theme. You must replace the comments block in your theme ({block:Comments}) with the new responses block ({block:Responses}). With most themes, this is a simple switch, and in many cases, you can replace the entire comments block with {block:Responses /}.

For example, this comments block:

{block:Comments}
  {block:CommentsList action_id='comment_link_{PostID}' target_element='post_commentarea_{PostID}'}
    <div id='post_commentarea_{PostID}'></div>
   <p>Comments [{CommentCount}]</p>
  {/block:CommentsList}

  {block:CommentsShow}
    
    <div class="spanningheader" style="margin-top: 0px;">
     <h4>Comments ({CommentCount})</h4>
    </div>
    {CommentCode}

    <div class="posterousAddNewComment">
      <div class="spanningheader">
      <h4>Leave a comment...</h4>
     </div>
     {NewCommentCode}
    </div>
  {/block:CommentsShow}
{/block:Comments}

Can simply be replaced with this block:

{block:Responses /}

To learn more about the new responses block, click here: http://posterous.com/theming/reference#block_Responses

For further cleanup, you should remove any instances of {block:Fans}...{/block:Fans}, {block:Favorite /}, and {FavoriteCount}, as these elements are now deprecated.

We have also changed {CommentCount} and {CommentCountPluralized} to {ResponseCount} and {ResponseCountPlurlized}. You can use these new elements anywhere inside {block:Posts} (they used to only work inside {block:Comments}).

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/1612923/3821a50.jpg http://posterous.com/users/36UKbo4KsdEZ Rich Pearson Rich Pearson Rich Pearson