Distinguishing preview comment from other comments
Posted: Mon Mar 28, 2011 9:10 pm
I'd like to visual mark the user's preview comment so that it appears differently from the rest of the comment history. But it seems that serendipity_smarty_printComments just appends the preview onto the end of the rest of the comments with no hook my template could use to apply a different class or whatever.
Is there another way to go about this? One way to get what I want is to have a conditional in comments.tpl, similar to that used for distinguishing author comments:
{if $comment.author == $entry.author}<div class="mycomment">{else}<div class="comment">{/if}
But I might also want to change the location of the preview comments in the document flow, something roughly like this (in entries.tpl):
<h2>Comments:</h2>
{serendipity_printCommentsNoPreview entry=$entry.id mode=$entry.viewmode}
<h2>Your comment (preview):</h2>
{serendipity_printPreviewComment entry=$entry.id mode=$entry.viewmode}
I could write this, but I obviously don't want to fork s9y. Is there another way to iterate over the comments? Should I do this in a plugin instead? Thanks!
Is there another way to go about this? One way to get what I want is to have a conditional in comments.tpl, similar to that used for distinguishing author comments:
{if $comment.author == $entry.author}<div class="mycomment">{else}<div class="comment">{/if}
But I might also want to change the location of the preview comments in the document flow, something roughly like this (in entries.tpl):
<h2>Comments:</h2>
{serendipity_printCommentsNoPreview entry=$entry.id mode=$entry.viewmode}
<h2>Your comment (preview):</h2>
{serendipity_printPreviewComment entry=$entry.id mode=$entry.viewmode}
I could write this, but I obviously don't want to fork s9y. Is there another way to iterate over the comments? Should I do this in a plugin instead? Thanks!