TelliTip 17: Exposing trackbacks on your content in GraffitiCMS

written by josh ledgard on Friday, April 18 2008

GraffitiIf you are using the Blog Extensions plug-in for Graffiti you may start seeing comments on your site that are not being published. This is likely because the theme you choose did not support showing trackbacks by default since they weren't part of the core GraffitiCMS app.   Kudo's goes to Jeff, who did an outstanding job explaining how to enable all of the cool functionality of the blog extensions here.  This post will borrow from that to show you how to enable trackbacks/pingbacks showing in a theme that did not support them.

  1. Log into your control panel as an admin.
  2. Go to the theme customization with Presentation > Themes > Personalize on your current theme.
  3. Click on the post.view file to open it.
  4. I recommend saving your existing copying the current post.view content into a new next file as a back-up at this point.
  5. Insert the following code where you want trackbacks to appear and save.  NOTE: I'm using the Skittlish theme so your CSS mileage may vary.  The basic concept would be to borrow as much as you can from your theme's comment section.

<!--Loop through trackbacks -->
#foreach($trackback in $trackbacks)
<!--denote as a comment list with your CSS and title -->
#beforeall
    <div id="commentslist">
    <h3 class="content">Trackbacks </h3>
    <UL>
#each
    <li class="comment  by-guest">
    <p class="meta"><strong><cite>
    <!--Insert Trackback Title & Link -->
    <a href="$trackback.WebSite" title="$trackback.Name">$trackback.Name</a></strong><br>
    <!-- insert date/time posted -->
    <em>Posted on  $trackback.Published.ToString("M.dd.yyyy") at $trackback.Published.ToString("h:mm tt")</em>
    </cite>
    </p>
    <!-- Insert trackback body -->
    <div class="body">
    $trackback.Body
    <!-- Insert check to see if you have rights to delete trackback -->
    #if($isUser)
    [<a href="javascript:void(0);" onclick="Comments.deleteComment('$urls.AdminAjax', $trackback.Id,'comment-$trackback.Id','comment-body-$trackback.Id'); return false">Delete Pingback</a>]
#end
    </div>
    </li>
#afterall

    </ul>
    </div>
#end <!-- end loop -->

Of, if you like the way my site looks, you can download my theme here: SkittlishTrackbacks.zip

Similar Posts

  1. TelliTip 9: Show full post content on the home page in Graffiti
  2. TelliTip 6: Create a contact page
  3. What I'm Reading and Writing - Testing a WLW Plugin

Comments

  • Rick Reszler on on 4.18.2008 at 2:08 PM

    Rick Reszler avatar

    Great tip Josh!!

    How about one on how to set the default color on the Skittlish theme or remove the color wheel/selector? :-)

  • test on on 4.25.2008 at 5:00 AM

    test avatar

    test

Comments are closed