Modding BlogCFC: Moderated if url is present - Admin Update

There are two more minor tweaks to this anti-spam approach that need to be implemented. The first is to go back into the blog.cfc and comment out lines 1489 and 1491. This CFIF limits the recent comments to ones that have moderated set to true (which should be the default). Without the CFIF removed, spam comments that have to be moderated will still show up in the recent comments section.

The second minor edit is to the adminlayout, commenting out lines 47 and 49. Now the admin can control the moderated comments.

The more I fix this technique the more I see I have to do it right. One thing that I really have to look at is those CFIFs that 'comment out' the moderated db value in queries. Every comment has a moderated value whether moderation is turned on or not. The only reason I can find for these CFIFs is to remove one of the sql criteria and possibly speeding up the query by some fraction of a millisecond. Unless there's something I'm missing....

Comments
Nathan Mische's Gravatar I don't think the conditional logic around the moderated WHERE predicate should be there at all. If a comment is not moderated you never want to show it, no matter if currently have the comment moderation feature enabled or not. I removed it in my CFAkismet mod, however I missed the recent comments query, so I need to go back and remove that CFIF. Thanks for finding that one.
# Posted By Nathan Mische | 10/31/07 8:32 AM
BlogCFC was created by Raymond Camden. This blog is running version 5.9. Contact Blog Owner
House of Fusion | ColdFusion Jobs @ House of Fusion | Fusion Authority