Using data from GraffitiCMS Blog Extensions in Posts

My site uses the GraffitiCMS blog extensions plug-in.  In the past few days, I've noticed a discrepancy between the Comment Count and the actual number of comments for my posts.  Upon investigation,  I discovered that the Comment Count in graffiti includes trackbacks/pingbacks.  I also discovered that if I deleted these trackbacks from the Graffiti Admin, the count did not change.  I think this may be a bug, but I'm welcome to correction if I'm wrong.

I decided that for now, I'd workaround it by including the trackback data in my post.view for my theme.  I did so by writing out the trackbacks directly beneath the Comment Count header in my post.view file as follows:

 <!--trackbacks first -->
  <
ul class="commentlist">
    <!--
Loop through trackbacks -->
   
#foreach($trackback in $trackbacks)
    #beforeall
    <li>
   
#each
    <div class="commentname">
      <
cite>
        <!--
Insert Trackback Title & Link -->
        <
a href="$trackback.WebSite" title="$trackback.Name">
           
Trackback: $trackback.Name
        </a>
      </
cite>
      <
br>
      <!--
insert date/time posted -->
      <
small class="commentmetadata">
       
Posted on  $trackback.Published.ToString("M.dd.yyyy")
        at $trackback.Published.ToString("h:mm tt")
      </small>
     </
div>
   
   
#afterall
    </li>
   
#end <!-- end loop -->
  </
ul>
  <!--
end trackbacks -->

I then modified the Comments header to say "Comments And Trackbacks" so the total count will match the items posted.  Now I can give back some link love to those who linkback/trackback to me, as well as ease confusion caused by the comment count not matching the listed comments

kick it on DotNetKicks.com

3 Comments and Trackback(s)

Leave a Reply

 
© Crazeegeekchick.com | Theme design by Dana Coffey | Powered by GraffitiCMS