Steven Erat's Blog Steven Erat Photography
 
 
Viewing By Entry
 
 

TalkingTree  Recent Comments Pod: New pod for BlogCFC 4.0

 

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.

<cfinclude template="../includes/pods/recentComments.cfm">

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

Find this:

<cfif isDefined("url.delete") and isUserInRole("admin")>
   <cfset application.blog.deleteComment(url.delete)>
   <cfset comments = application.blog.getComments(url.id)>
</cfif>

Change to this:

<cfif isDefined("url.delete") and isUserInRole("admin")>
<cfset application.blog.deleteComment(url.delete)>
<!--- reset the comments pod cache upon deleting comment --->
<cfmodule
      template="tags/scopecache.cfm"
      cachename="pod_recentcomments"
      scope="application"
      clear="true"/>

<cfset comments = application.blog.getComments(url.id)>
</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.

<cfscript>
   maxRecentComments    = 3;
   maxRecentCommentLen   = 120;
</cfscript>

 


Comments

Nice. Would you mind posting this URL to the Pods forum at my blogcfc forums?


Nice pod addition, works well but I was getting an error on line 39 of recentComments.cfm where it tires to call replaceTags.I'm not sure what this is but I guess it's something along the lines of HTMLEditFormat which seems to work fine in it's place.


Thanks, Doug. I've uploaded a new version that fixes that problem. I was using a custom UDF in my own blog and left one call to that UDF in the generic version available for download. Try downloading the new version.


 

 

Calendar

 
Sun Mon Tue Wed Thu Fri Sat
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31    

Search This Site

 
This is an exact search only

topics

 
adobe blogging coldfusion computer technology events flex java learning linux mac os x macromedia meetup new england odds & ends outdoors personal photos photoshop science travel video

About This Site

 
Adobe Alumni & Community Professional. Expert in ColdFusion, Flex, LCDS, Photoshop, Lightroom. Linux RHCE. Follow Me!. For my photography check out Boston Portrait Photographer.

Speaker at CF.Objective(): Automated UI Testing with CFSelenium, MXUnit, ANT, and JenkinsCI

Adobe Community Professional (ACP)
Red Hat Linux Certified Engineer

Recent Entries

 
Automated System Testing for ..
Could not find ColdFusion com..
No April Fools: Selenium Ship..

Recent Comments

 
Posted By Steven Erat:
Jim, and anyone else that may attend, if you would like the full slide deck and my demo project files BEFORE the conference, please reply as a comment ...

Posted By Jim Priest:
Can't wait for this one!!

Posted By iPhone Repair:
It appears there are so many people have issue with their iPhone & iPod Touch screens dropped and cracked. It happened to me also when u haven't got a ...

recently played

 
Mr. Brightside
by The Killers
on Hot Fuss
Get Hot Fuss by The Killers on Amazon

now playing, a plug-in for itunes

Categories

 
RSS Adobe (34)
RSS Bicycling (9)
RSS Blogging (39)
RSS Books (13)
RSS Breeze (13)
RSS CFMX Podcasts (10)
RSS ColdFusion (437)
RSS Computer Technology (51)
RSS Events (26)
RSS Flex (20)
RSS Gadgets (11)
RSS HiTech Industry (16)
RSS Java (26)
RSS Learning (57)
RSS Linux (70)
RSS Mac OS X (23)
RSS Macromedia (27)
RSS Meetup (35)
RSS New England (62)
RSS Odds & Ends (25)
RSS Outdoors (32)
RSS Personal (29)
RSS Photos (111)
RSS Photoshop (29)
RSS Podcasts (18)
RSS Rants (19)
RSS Restaurants (8)
RSS Science (34)
RSS Spain (16)
RSS Travel (42)
RSS Twitter (10)
RSS Video (20)
RSS Webcam (3)
RSS Writing (10)

RSS

 


Add to Google
Add to My Yahoo!

Credits and Stuff

 
BlogCFC - Free ColdFusion Powered Blog Software


 
 
blog | photos | flickr | referers | webcam | stats | about | contact
 
Copyright © 2012 Steven Erat. All rights reserved.
This is a personal weblog. The opinions expressed here represent my own and not those of my employer