var reURL = "";
var configStruct = Application.ptForum.getAppConfig();
var configHomeURL = "";
var catStruct = StructNew();
var catHomeID = "";
var catHomeURL = "";
var parentStruct = StructNew();
if ( structKeyExists(configStruct, "FORUM_HOME_URL") AND LEN(TRIM(configStruct.FORUM_HOME_URL)) )
configHomeURL = configStruct['FORUM_HOME_URL'];
if ( ListFindNoCase("TopicID,ThreadID,MsgID",arguments.ChildIDField) AND LEN(TRIM(arguments.ChildID)) NEQ 0 ) {
// If CatID is not passed in get the CatID from the child and/or grandchild
parentStruct = Application.ptForum.Forums.getParentsStructByID(arguments.ChildIDField,arguments.ChildID);
catHomeID = parentStruct.CatID;
} else if ( arguments.ChildIDField IS "CatID" AND LEN(TRIM(arguments.ChildID)) NEQ 0 ) {
catHomeID = arguments.ChildID;
}
// Get Forum Home URL from the Categories Element
if ( LEN(TRIM(catHomeID)) ) {
catStruct = application.ptForum.categoriesDAO.getCategoryInfoByCatID(catHomeID);
//Application.ADF.Utils.dodump(catStruct,"catStruct",0);
if ( structKeyExists(catStruct, "values") AND structKeyExists(catStruct.values, "FORUM_HOME_URL") AND LEN(TRIM(catStruct.values.FORUM_HOME_URL)) ) {
catHomeURL = catStruct.values.FORUM_HOME_URL;
}
}
if ( LEN(TRIM(catHomeURL)) ) {
// Set the home URL from the category element by catid
reURL = catHomeURL;
} else if ( LEN(TRIM(configHomeURL)) ) {
// Set the home URL from the config element
reURL = configHomeURL;
} else {
reURL = 'index.cfm';
}
var reURL = 'topics.cfm';
var configStruct = Application.ptForum.getAppConfig();
if ( structKeyExists(configStruct,"forum_topics_url") AND LEN(TRIM(configStruct.forum_topics_url)) )
meessagesPage = configStruct.forum_topics_url;
return reURL;
var reURL = 'threads.cfm';
var configStruct = Application.ptForum.getAppConfig();
if ( structKeyExists(configStruct,"forum_threads_url") AND LEN(TRIM(configStruct.forum_threads_url)) )
meessagesPage = configStruct.forum_threads_url;
return reURL;
var reURL = 'messages.cfm';
var configStruct = Application.ptForum.getAppConfig();
if ( structKeyExists(configStruct,"forum_messages_url") AND LEN(TRIM(configStruct.forum_messages_url)) )
meessagesPage = configStruct.forum_messages_url;
return reURL;
var sURL = arguments.siteURL;
var fURL = arguments.forumURL;
var retURL = "";
if ( Right(sURL,1) IS arguments.charToReplace ) {
sURL = rereplacenocase(sURL, '(.*)#arguments.charToReplace#', '\1');
}
if ( Left(fURL, 1) IS arguments.charToReplace ){
fURL = Mid(fURL,2,LEN(fURL)-1);
}
retURL = sURL & arguments.charToReplace & fURL;
//Application.adf.utils.dodump(sURL,"sURL",1);
//Application.adf.utils.dodump(fURL,"fURL",1);
//Application.adf.utils.dodump(retURL,"retURL ",1);
return retURL;