root/trunk/website/blog/includes/pods/recentcomments.cfm @ 31

Revision 5, 1.6 kB (checked in by DanWilson, 17 years ago)

Initial Commit Of ModelGlue? Website (upgrade to blogcfc 511)

Line 
1<cfsetting enablecfoutputonly=true>
2<cfprocessingdirective pageencoding="utf-8">
3<!---
4        Name         : recent.cfm
5        Author       : Sam Farmer
6        Created      : April 13, 2006
7        Last Updated : November 17, 2007
8        History      : left was cropping off links mid html. (rkc 6/9/06)
9                                 : Pass 25 as the max length for links in comments (rkc 7/21/06)                                   
10                                 : Wasn't properly localized (rkc 8/24/06)
11                                 : forgot to disable cfoutputonly (rkc 11/17/07)
12        Purpose          : Display recent comments
13--->
14
15<cfset numComments = 5>
16<cfset lenComment = 100>
17
18<cfmodule template="../../tags/podlayout.cfm" title="#application.resourceBundle.getResource("recentcomments")#">
19        <cfset getComments = application.blog.getRecentComments(numComments)>
20        <cfloop query="getComments">
21                <cfset formattedComment = comment>
22                <cfif len(formattedComment) gt len(lenComment)>
23                        <cfset formattedComment = left(formattedComment, lenComment)>
24                </cfif>
25                <cfset formattedComment = caller.replaceLinks(formattedComment,25)>
26                <cfoutput><p><a href="#application.blog.makeLink(getComments.entryID)#">#getComments.title#</a><br>
27                #getComments.name# #application.resourceBundle.getResource("said")#: #formattedComment#<cfif len(comment) gt lenComment>...</cfif>
28                <a href="#application.blog.makeLink(getComments.entryID)###c#getComments.id#">[#application.resourceBundle.getResource("more")#]</a></p></cfoutput>
29        </cfloop>
30        <cfif not getComments.recordCount>
31                <cfoutput>#application.resourceBundle.getResource("norecentcomments")#</cfoutput>
32        </cfif>
33
34       
35</cfmodule>
36<cfsetting enablecfoutputonly=false>
37       
Note: See TracBrowser for help on using the browser.