var rtnHTML = ""; var postDataArray = ArrayNew(1); var approvedComments = false; var commenterURL = ""; // Get the first comment to get the Blog Post ID if ( ArrayLen(arguments.comments) ){ // Check that we have data and set the flag for comments required blogData = application.ptBlog2.blogDAO.getBlog(blogID=arguments.comments[1].values.blogID); if ( isStruct(blogData) AND (StructKeyExists(blogData, "commentApproval")) AND (blogData.commentApproval EQ 1) ){ approvedComments = true; } }
  • #arguments.comments[itm].values.name# #arguments.comments[itm].values.name#
    #dateFormat(arguments.comments[itm].values.dateCreated, "mmmm dd, yyyy")# at #timeFormat(arguments.comments[itm].values.dateCreated, "hh:mm")#
     

    #arguments.comments[itm].values.comments#

     
  • var rtnHTML = ""; var commentData = arguments; var results = ""; var postData = application.ptBlog2.PostDAO.getPost(arguments.contentPageID); // Update the postData fields into the comments record // Set the UUID field commentData["CommentID"] = createUUID(); commentData["blogID"] = postData.blogID; commentData["postID"] = postData.postID; commentData["comments"] = application.ptBlog2.data.stripHTMLtags(arguments.comments); // Add the record results = application.ptBlog2.commentsDAO.add(commentData); if( results.contentUpdated ) { commentArray = arrayNew(1); commentArray[1] = structNew(); commentArray[1].values = arguments; commentArray[1].values.dateCreated = now(); rtnHTML = application.ptBlog2.commentsService.getCommentsHTML(commentArray); } // Email notifications for comments for the post ID emailResults = commentNotification(commentData=arguments); // Get the Post information var postData = application.ptBlog2.postDAO.getPost(postID=arguments.commentData.contentPageID); // Get the blog information var blogData = application.ptBlog2.blogDAO.getBlog(blogID=postData.blogID); var notificationEmails = application.ptBlog2.blogService.getNotificationEmails(blogID=blogData.blogID); var fromEmailAddress = notificationEmails.from; var toEmailAddress = notificationEmails.to; var msgBody = buildNotificationMessage(postDataValues=postData, blogDataValues=blogData, commentDataValues=arguments.commentData); var emailSent = false; // Initialize the variables var msgBody = "";

    Blog:
    #arguments.blogDataValues.name#

    Post:
    #arguments.postDataValues.title#

    Comments By:
    #arguments.commentDataValues.name# (#arguments.commentDataValues.email#)

    Comments:
    #arguments.commentDataValues.comments#

    // Get the comment data var commentData = application.ptBlog2.commentsDAO.getCommentsByContentID(contentPageID=arguments.postID, formID=application.ptBlog2.getCommentsFormID(), sortBy="dateCreated", sortOrder="desc"); var dashboardHTML = ""; var currComment = ""; var i = 1; var rowClass = "";