application.ptBlog2.scripts.loadJQuery(); application.ptBlog2.scripts.loadJQueryUI(themeName=application.ptBlog2.getThemeName()); // ui needed for commentsService.getCommentsHTML() application.ptBlog2.scripts.loadADFLightbox(); blogData = structNew(); comments = arrayNew(1); displayOnlyApprovedComments = false; // TODO remove after development is completed request.element.isStatic = 0; blogDataArray = attributes.elementInfo.elementData.propertyValues; if( arrayLen(blogDataArray) ) { blogData = blogDataArray[1].values; blogData.dataPageID = blogDataArray[1].pageID; // Get the parent blog data for the blog post parentBlogData = application.ptBlog2.blogDAO.getBlog(blogID=blogData.blogID); // Check if comments require approval if ( StructKeyExists(parentBlogData, "commentApproval") AND parentBlogData.commentApproval EQ 1 ) displayOnlyApprovedComments = true; } blogFormID = application.ptBlog2.getBlogFormID(); // Added check to validate that the metadata form field exists. if ( NOT StructKeyExists(request.page, "metadata") OR NOT StructKeyExists(request.page.metadata, "blogs2") OR NOT StructKeyExists(request.page.metadata.blogs2, "blogID") ){ request.page.metadata.blogs2.blogID = "0"; } commentsFormID = application.ptBlog2.getCommentsFormID(); comments = application.ptBlog2.commentsDAO.getCommentsByContentID(request.page.metadata.blogs2.postID, commentsFormID, "dateCreated", "desc", displayOnlyApprovedComments); // Get the contact data for the user who posted the blog if ( StructKeyExists(blogData, "createdBy") AND LEN(blogData.createdBy) ) contactQry = application.ptBlog2.csData.getContactData(userID=blogData.createdBy); else contactQry = QueryNew("null"); CSRF_Token = application.ptBlog2.blogForms.getCSRF_Token(); // Check if comments are allowed if ( blogData.allowComments EQ 1 ) renderComments = true; else renderComments = false; // Load the inline CSS in the head application.ptBlog2.scripts.addHeaderCSS(blogPostHeaderCSS, "TERTIARY"); // PRIMARY, SECONDARY, TERTIARY // Load the inline JavaScript after the libraries have loaded application.ptBlog2.scripts.addFooterJS(blogPostFooterJS, "TERTIARY"); // PRIMARY, SECONDARY, TERTIARY

#blogData.title#

#dateFormat(blogData.datePosted, "mmmm dd, yyyy")#
 
#blogData.content#

Tags: #replace(tagNameList, "^", ", ", "all")#

// Load the inline CSS in the head application.ptBlog2.scripts.addHeaderCSS(blogPostCommentsHeaderCSS, "TERTIARY"); // PRIMARY, SECONDARY, TERTIARY

Comments

 
    #commentHTML#
 

Post A Comment

#Server.CommonSpot.UDF.tag.input(type="hidden", id="CSRF_Token", name="CSRF_Token", value=CSRF_Token)#
" class="feed">Subscribe to comments feed --->