this.ElementName = "Forum Topics";
this.CCAPIName = "ForumTopics";
this.ElementIDfield = "topicsID";
var newArray = ArrayNew(1);
var ActiveStatus = "yes";
var i = 1;
var n = 1;
//var ceArray = Application.ptForum.ceData.getCEData(this.ElementName,"","","multi","#arguments.CatID#,yes","CatID,topicActive");
var ceArray = Application.ptForum.ceData.getCEData(this.ElementName,"CatID",arguments.CatID);
for (i=1;i LTE ArrayLen(ceArray); i=i+1)
if ( ceArray[i].values.TopicActive IS "yes" ) {
newArray[n] = ceArray[i];
n = n + 1;
}
var topicStruct = StructNew();
var topicArray = Application.ptForum.ceData.getCEData(this.ElementName,"TopicID",arguments.TopicID);
if ( ArrayLen(topicArray) )
topicStruct = topicArray[1];
var childID = TRIM(arguments.TopicID);
var parentID = "";
var parentIDField = "catID";
var elementFormID = getForumTopicsFormID();
//Get ParentID
parentID = Application.ptForum.CEData.getCEDataFieldUUID(elementFormID,childID,parentIDField);
var topicStruct = StructNew();
var retStatusStruct = StructNew();
var dataValues = StructNew();
retStatusStruct["msg"] = "failed";
topicStruct = getTopicInfoByTopicID(TRIM(arguments.TopicID));
dataValues = topicStruct.values;
dataValues.dataPageID = topicStruct.PageID;
dataValues.messageQty = arguments.MsgQty;
dataValues.lastpostMsgID = arguments.lastPostMsgID;
dataValues.lastpostProfileID = arguments.lastpostProfileID;
dataValues.lastpostDateTime = arguments.lastPostDateTime;
retStatusStruct = topicsCCAPI(dataValues);
var retStatusStruct = "failed";
// Create the CS Content CFC
var csContent = server.ADF.objectFactory.getBean("CSContent_1_0");
//application.ADF.utils.doDump(arguments.dataValues,"arguments.dataValues", false);
// Create the page
retStatusStruct = csContent.populateContent(this.CCAPIName, arguments.dataValues);
/* retStatusStruct RETURNS: CONTENTUPDATED : true/false & CONTENTUPDATERESPONSE: Success:1 */