| [5] | 1 | <cfsetting enablecfoutputonly=true> |
|---|
| 2 | <cfprocessingdirective pageencoding="utf-8"> |
|---|
| 3 | <!--- |
|---|
| 4 | Name : /client/admin/moderate.cfm |
|---|
| 5 | Author : Trent Richardson |
|---|
| 6 | Created : 12/7/06 |
|---|
| 7 | Last Updated : 5/18/07 |
|---|
| 8 | History : Handle sending email for moderated comments. Note the sucky duplication of the email |
|---|
| 9 | here. I need to fix that in the future. (rkc 4/13/07) |
|---|
| 10 | : Call approveCOmment, and use 'Moderated' for ip. I may just hide the whole line (rkc 5/18/07) |
|---|
| 11 | ---> |
|---|
| 12 | |
|---|
| 13 | <!--- handle deletes ---> |
|---|
| 14 | <cfif structKeyExists(form, "mark")> |
|---|
| 15 | <cfloop index="u" list="#form.mark#"> |
|---|
| 16 | <cfset application.blog.deleteComment(u)> |
|---|
| 17 | </cfloop> |
|---|
| 18 | </cfif> |
|---|
| 19 | |
|---|
| 20 | <cfif structKeyExists(url, "approve")> |
|---|
| 21 | <cfset c = application.blog.getComment(url.approve)> |
|---|
| 22 | <cfset entry = application.blog.getEntry(c.entryidfk)> |
|---|
| 23 | <cfset application.blog.approveComment(url.approve)> |
|---|
| 24 | |
|---|
| 25 | <cfset subject = rb("commentaddedtoblog") & ": " & application.blog.getProperty("blogTitle") & " / " & rb("entry") & ": " & entry.title> |
|---|
| 26 | <cfsavecontent variable="email"> |
|---|
| 27 | <cfoutput> |
|---|
| 28 | #rb("commentaddedtoblogentry")#: #entry.title# |
|---|
| 29 | #rb("commentadded")#: #application.localeUtils.dateLocaleFormat(now())# / #application.localeUtils.timeLocaleFormat(now())# |
|---|
| 30 | #rb("commentmadeby")#: #c.name# <cfif len(c.website)>(#c.website#)</cfif> |
|---|
| 31 | #rb("ipofposter")#: Moderated |
|---|
| 32 | URL: #application.blog.makeLink(entry.id)###c#c.id# |
|---|
| 33 | |
|---|
| 34 | |
|---|
| 35 | #c.comment# |
|---|
| 36 | |
|---|
| 37 | ------------------------------------------------------------ |
|---|
| 38 | #rb("unsubscribe")#: %unsubscribe% |
|---|
| 39 | This blog powered by BlogCFC #application.blog.getVersion()# |
|---|
| 40 | Created by Raymond Camden (ray@camdenfamily.com) |
|---|
| 41 | </cfoutput> |
|---|
| 42 | </cfsavecontent> |
|---|
| 43 | |
|---|
| 44 | <cfset application.blog.notifyEntry(entryid=c.entryidfk, message=trim(email), subject=subject, from=c.email, noadmin=true, commentid=c.id)> |
|---|
| 45 | |
|---|
| 46 | </cfif> |
|---|
| 47 | |
|---|
| 48 | <!--- changed to get unmoderated comments 12-5-2006 by Trent Richardson ---> |
|---|
| 49 | <cfset comments = application.blog.getUnmoderatedComments(sortdir="desc")> |
|---|
| 50 | |
|---|
| 51 | <cfmodule template="../tags/adminlayout.cfm" title="Comments"> |
|---|
| 52 | |
|---|
| 53 | <cfoutput> |
|---|
| 54 | <p> |
|---|
| 55 | Your blog currently has |
|---|
| 56 | <cfif comments.recordCount gt 1> |
|---|
| 57 | #comments.recordcount# comments |
|---|
| 58 | <cfelseif comments.recordCount is 1> |
|---|
| 59 | 1 comment |
|---|
| 60 | <cfelse> |
|---|
| 61 | 0 comments |
|---|
| 62 | </cfif> to moderate. |
|---|
| 63 | </p> |
|---|
| 64 | </cfoutput> |
|---|
| 65 | |
|---|
| 66 | <cfmodule template="../tags/datatable.cfm" data="#comments#" editlink="comment.cfm" label="Comments" |
|---|
| 67 | linkcol="comment" defaultsort="posted" defaultdir="desc" showAdd="false"> |
|---|
| 68 | <cfmodule template="../tags/datacol.cfm" colname="name" label="Name" width="150" /> |
|---|
| 69 | <cfmodule template="../tags/datacol.cfm" colname="entrytitle" label="Entry" width="300" left="100" /> |
|---|
| 70 | <cfmodule template="../tags/datacol.cfm" colname="posted" label="Posted" format="datetime" width="150" /> |
|---|
| 71 | <cfmodule template="../tags/datacol.cfm" colname="comment" label="Comment" left="100"/> |
|---|
| 72 | <cfmodule template="../tags/datacol.cfm" label="Approve Comment" data="<a href=""#application.rooturl#/admin/moderate.cfm?approve=$id$"">Approve</a>" sort="false"/> |
|---|
| 73 | </cfmodule> |
|---|
| 74 | |
|---|
| 75 | </cfmodule> |
|---|
| 76 | |
|---|
| 77 | <cfsetting enablecfoutputonly=false> |
|---|