Attached is a zip of a new recentComments.cfm template to use as a pod for Ray Camden's new BlogCFC 4.0. This version uses his custom tag scopecache to cache the generated html from each pod, so here's how to add a pod that will display the last few comments in the side bar, and will be refreshed upon a new comment entry or comment deletion.

Step 1
Download the attachment and unzip recentComments.cfm into blog_root/includes/pods.

Step 2
Edit blog_root/tags/layout.cfm to add the Recent Comments pod among the other pods in the sidebar menu.

view plain print about
1[cfinclude template="../includes/pods/recentComments.cfm">


Step 3
Edit blog_root/addComment.cfm to add the refresh logic for Recent Comments pod.

Find this:
view plain print about
1[cfif isDefined("url.delete") and isUserInRole("admin")>
2    [cfset application.blog.deleteComment(url.delete)>
3    [cfset comments = application.blog.getComments(url.id)>
4[/cfif>


Change to this:
view plain print about
1[cfif isDefined("url.delete") and isUserInRole("admin")>
2[cfset application.blog.deleteComment(url.delete)>
3
4[cfmodule
5        template="tags/scopecache.cfm"
6        cachename="pod_recentcomments"
7        scope="application"
8        clear="true"/>
9[cfset comments = application.blog.getComments(url.id)>
10[/cfif>


Step 4
Save files and browse to test. From now on, every chanage you make to the pod will require a blog refresh with the ?reinit=1 parameter.

Step 5
Edit the number of comments to display and the amount of text for each comment, found in recentComments.cfm. Edits to pod content require that you refresh the blog using the ?reinit=1 parameter while logged in.

view plain print about
1[cfscript>
2    maxRecentComments     = 3;
3    maxRecentCommentLen    = 120;
4[/cfscript>