Textpattern | PHP Cross Reference | Content Management Systems |
1 <!-- load the comment email into a variable. you will be using this below along with author email variable loaded in form: default.article.txp 2 then check the comment email variable against article author email variable, and if it matches add 'comments-author' class --> 3 <txp:variable name="this_comment" value='<txp:comment_email />' /> 4 <txp:if_variable name="this_comment" value='<txp:author_email />'> 5 <article class="comments comments-author" itemscope itemtype="http://schema.org/Comment"> 6 <txp:else /> 7 <article class="comments" itemscope itemtype="http://schema.org/Comment"> 8 </txp:if_variable> 9 10 <h4> 11 <span class="comment-author" itemprop="author" itemscope itemtype="http://schema.org/Person"> 12 <span itemprop="name"> 13 <txp:comment_name /> 14 </span> 15 </span> 16 17 <!-- ...now check the comment email variable against article author email variable, and if it matches add '(author)' text --> 18 <txp:if_variable name="this_comment" value='<txp:author_email />'> 19 <span class="is-author"> 20 (<txp:text item="author" />) 21 </span> 22 </txp:if_variable> 23 24 <!-- add a permlink so people can link direct to this comment --> 25 <span class="comment-anchor" itemprop="url"> 26 <txp:comment_permlink>#</txp:comment_permlink> 27 </span> 28 29 </h4> 30 31 <!-- also add a 'since' to show comment freshness --> 32 <p class="footnote"> 33 <time datetime="<txp:comment_time format="iso8601" />" itemprop="dateCreated"> 34 <txp:comment_time /> 35 (<txp:comment_time format="since" />) 36 </time> 37 </p> 38 39 <div itemprop="text"> 40 <txp:comment_message /> 41 </div> 42 43 </article>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
title