var feedData = StructNew(); // Feed Primary Meta Data feedData.ServiceType = ""; // [facebook, twitter, youtube, wordpress] feedData.ServiceLink = ""; feedData.ServiceLogo = ""; feedData.PublishedDate = ""; feedData.csFormattedPublishedDate = ""; feedData.FeedID = ""; feedData.FeedType = ""; feedData.FeedImage = ""; feedData.FeedLink = ""; feedData.FeedName = ""; feedData.FeedStatus = ""; // Source Info feedData.Source = StructNew(); feedData.Source.name = ""; feedData.Source.link = ""; feedData.Source.photo = ""; feedData.Source.userid = ""; feedData.Source.username = ""; feedData.Source.description = ""; // Content Info feedData.Content = StructNew(); feedData.Content.postid = ""; feedData.Content.title = ""; feedData.Content.message = ""; feedData.Content.link = ""; feedData.Content.icon = ""; feedData.Content.thumbnail = ""; feedData.Content.fullPicture = ""; feedData.Content.description = ""; feedData.Content.date = ""; feedData.Content.csFormattedDate = ""; // Facebook Like Button feedData.FBLikeBtn = StructNew(); feedData.FBLikeBtn.link = ""; // Twitter Tweet Button feedData.TweetBtn = StructNew(); feedData.TweetBtn.link = ""; feedData.TweetBtn.message = ""; return feedData; var useFeedCache = getFeedCacheState(); var serviceTypeList = getServiceTypeList(); var smFeedArray = ArrayNew(1); var smFeedInfo = arguments.selectedFeeds; var smRenderLimit = 5; // TODO: add to config element (real-time per service master renderlimit) var smSelectedItems = ArrayNew(1); var smItm = 1; var smMaxWords = 50; // TODO: Blog Post max words... add this to the config element or the wordpress blog element var smFeedType = ""; var smfeedCriteria = ""; var smFeedID = ""; var smPostExcludeList = ""; var smfeedImage = ""; var smfeedImageData = Structnew(); var sortOrderOptions = "asc,desc"; var fbExcludeName = "facebook"; var igExcludeName = "instagram"; var twExcludeName = "twitter"; var ytExcludeName = "youtube"; var wpExcludeName = "wordpress"; var facebookFeedIDs = ""; var instagramFeedIDs = ""; var twitterFeedIDs = ""; var wordPressFeedIDs = ""; var youTubeFeedIDs = ""; var fbFeedArray = ArrayNew(1); var igFeedArray = ArrayNew(1); var twFeedArray = ArrayNew(1); var wpFeedArray = ArrayNew(1); var ytFeedArray = ArrayNew(1); /*application.adf.utils.logappend(msg=smFeedInfo, logfile='debugSM.html', label='smFeedInfo');*/ // Override useFeedCache Config setting if ( useFeedCache AND arguments.useCacheOverride ) useFeedCache = false; if ( StructKeyExists(smFeedInfo,"values") ) { if ( StructKeyExists(smFeedInfo.values,"renderLimit") ) smRenderLimit = smFeedInfo.values.renderLimit; // Pull out the ID lists for each of the Feed Types // - if the service type is active in the config element if ( StructKeyExists(smFeedInfo.values,"fbPages") AND ListFindNoCase(serviceTypeList,fbExcludeName) ) facebookFeedIDs = smFeedInfo.values.fbPages; if ( StructKeyExists(smFeedInfo.values,"igPages") AND ListFindNoCase(serviceTypeList,igExcludeName) ) instagramFeedIDs = smFeedInfo.values.igPages; if ( StructKeyExists(smFeedInfo.values,"twitterAccountsKeywords") AND ListFindNoCase(serviceTypeList,twExcludeName) ) twitterFeedIDs = smFeedInfo.values.twitterAccountsKeywords; if ( StructKeyExists(smFeedInfo.values,"wordPressBlogs") AND ListFindNoCase(serviceTypeList,wpExcludeName) ) wordPressFeedIDs = smFeedInfo.values.wordPressBlogs; if ( StructKeyExists(smFeedInfo.values,"youtubeChannels") AND ListFindNoCase(serviceTypeList,ytExcludeName) ) youTubeFeedIDs = smFeedInfo.values.youtubeChannels; } /*application.adf.utils.logappend(msg="smRenderLimit:#smRenderLimit#
", logfile='debugSM.html', label='smRenderLimit'); application.adf.utils.logappend(msg="facebookFeedIDs: #facebookFeedIDs#
", logfile='debugSM.html', label='facebookFeedIDs'); application.adf.utils.logappend(msg="instagramFeedIDs: #instagramFeedIDs#
", logfile='debugSM.html', label='instagramFeedIDs'); application.adf.utils.logappend(msg="twitterFeedIDs: #twitterFeedIDs#
", logfile='debugSM.html', label='twitterFeedIDs'); application.adf.utils.logappend(msg="wordPressFeedIDs: #wordPressFeedIDs#
", logfile='debugSM.html', label='wordPressFeedIDs'); application.adf.utils.logappend(msg="youTubeFeedIDs: #youTubeFeedIDs#
", logfile='debugSM.html', label='youTubeFeedIDs');*/ // Get Facebook Element Records if ( LEN(TRIM(facebookFeedIDs)) AND ListFindNoCase(arguments.excludeServiceList,fbExcludeName) EQ 0 ) { for ( smItm=1; smItm LTE listLen(facebookFeedIDs); smItm=smItm+1 ) { smFeedID = listGetAt(facebookFeedIDs,smItm); // Get the PostIDs of excluded posts //if ( StructKeyExists(smSelectedItems[smItm].values,"postExcludeList") ) //smPostExcludeList = smSelectedItems[smItm].values.postExcludeList; if ( useFeedCache ) { fbfeedArray = variables.socialMediaCacheDAO.getFilteredFacebookFeedData(feedID=smFeedID,maxPosts=smRenderLimit,excludedPostIDs=smPostExcludeList,showFeedDump=arguments.showFeedDump); //Application.ptSocialMedia.utils.doDump(fbfeedArray,"getFilteredFacebookFeedData - fbfeedArray",0); } else { fbfeedArray = variables.facebookFeedsService.buildFacebookFeedData(feedID=smFeedID,maxPosts=smRenderLimit,filteredPostIDs=smPostExcludeList,showFeedDump=arguments.showFeedDump); /*Application.ptSocialMedia.utils.doDump(fbfeedArray,"buildFacebookFeedData - fbfeedArray",0);*/ } // Add the Facebook Feed Array to the final Return Array smFeedArray = application.ptSocialMedia.data.ArrayConcat(smFeedArray,fbfeedArray); } } // Get Instagram Element Records if ( LEN(TRIM(instagramFeedIDs)) AND ListFindNoCase(arguments.excludeServiceList,igExcludeName) EQ 0 ) { for ( smItm=1; smItm LTE listLen(instagramFeedIDs); smItm=smItm+1 ) { smFeedID = listGetAt(instagramFeedIDs,smItm); //smFeedID = smSelectedItems[smItm].values.uniqueID; //smfeedCriteria = smSelectedItems[smItm].values.igPageLink; //smPostExcludeList = ""; // Get the PostIDs of excluded posts //if ( StructKeyExists(smSelectedItems[smItm].values,"postExcludeList") ) //smPostExcludeList = smSelectedItems[smItm].values.postExcludeList; if ( useFeedCache ) igfeedArray = variables.socialMediaCacheDAO.getFilteredInstagramFeedData(feedID=smFeedID,maxPosts=smRenderLimit,excludedPostIDs=smPostExcludeList,showFeedDump=arguments.showFeedDump); else igfeedArray = variables.instagramFeedsService.buildInstagramFeedData(feedID=smFeedID,maxPosts=smRenderLimit,excludedPostIDs=smPostExcludeList,showFeedDump=arguments.showFeedDump); /*application.adf.utils.logappend(msg=igfeedArray, logfile='debugSM.html', label='igfeedArray');*/ // Add the Instagram Feed Array to the final Return Array smFeedArray = application.ptSocialMedia.data.ArrayConcat(smFeedArray,igfeedArray); /*application.adf.utils.logappend(msg=smFeedArray, logfile='debugSM.html', label='smFeedArray - instagram');*/ } } // Get Twitter Element Records if ( LEN(TRIM(twitterFeedIDs)) AND ListFindNoCase(arguments.excludeServiceList,twExcludeName) EQ 0 ) { smSelectedItems = variables.twitterAccountsKeywordsDAO.getTwitterAccountsKeywordsByIDs(twitterFeedIDs,"feedActive",1); /*application.adf.utils.logappend(msg=smSelectedItems, logfile='debugSM.html', label='twsmSelectedItems');*/ for ( smItm=1; smItm LTE ArrayLen(smSelectedItems); smItm=smItm+1 ) { smFeedID = smSelectedItems[smItm].values.uniqueID; smfeedCriteria = smSelectedItems[smItm].values.twitterAccountKeyword; smFeedType = smSelectedItems[smItm].values.type; smPostExcludeList = ""; // Get the PostIDs of excluded posts if ( StructKeyExists(smSelectedItems[smItm].values,"postExcludeList") ) smPostExcludeList = smSelectedItems[smItm].values.postExcludeList; if ( useFeedCache ) twfeedArray = variables.socialMediaCacheDAO.getFilteredTwitterFeedData(feedID=smFeedID,maxPosts=smRenderLimit,excludedPostIDs=smPostExcludeList,showFeedDump=arguments.showFeedDump); else twfeedArray = variables.twitterFeedsService.buildTwitterFeedData(feedID=smFeedID,feedCriteria=smfeedCriteria,feedType=smFeedType,maxPosts=smRenderLimit,excludedPostIDs=smPostExcludeList,showFeedDump=arguments.showFeedDump); //Application.ptSocialMedia.utils.doDump(twfeedArray,"twfeedArray",0); // Add the Twitter Feed Array to the final Return Array smFeedArray = application.ptSocialMedia.data.ArrayConcat(smFeedArray,twfeedArray); } } // Get WordPress Element Records if ( LEN(TRIM(wordPressFeedIDs)) AND ListFindNoCase(arguments.excludeServiceList,wpExcludeName) EQ 0 ) { smSelectedItems = variables.wordPressBlogsDAO.getWordPressBlogsByIDs(wordPressFeedIDs,"feedActive",1); //Application.ptSocialMedia.utils.doDump(smSelectedItems,"smSelectedItems",0); for ( smItm=1; smItm LTE ArrayLen(smSelectedItems); smItm=smItm+1 ) { smFeedID = smSelectedItems[smItm].values.uniqueID; smfeedCriteria = smSelectedItems[smItm].values.blogLink; smfeedImage = ""; smPostExcludeList = ""; // Get the PostIDs of excluded posts if ( StructKeyExists(smSelectedItems[smItm].values,"postExcludeList") ) smPostExcludeList = smSelectedItems[smItm].values.postExcludeList; // CP Image Data Exists Get Image URL if ( StructKeyExists(smSelectedItems[smItm].values,"blogImage") AND ListFirst(smSelectedItems[smItm].values.blogImage,":") EQ "CPIMAGE" ) { smfeedImageData = Application.ptSocialMedia.csData.decipherCPIMAGE(smSelectedItems[smItm].values.blogImage); if ( StructKeyExists(smfeedImageData,"ResolvedURL") AND StructKeyExists(smfeedImageData.ResolvedURL,"ServerRelative") AND LEN(TRIM(smfeedImageData.ResolvedURL.ServerRelative)) ) smfeedImage = smfeedImageData.ResolvedURL.ServerRelative; } if ( useFeedCache ) wpfeedArray = variables.socialMediaCacheDAO.getFilteredWordPressFeedData(feedID=smFeedID,maxPosts=smRenderLimit,excludedPostIDs=smPostExcludeList,showFeedDump=arguments.showFeedDump); else wpfeedArray = variables.wordPressFeedsService.buildWordPressFeedData(feedID=smFeedID,feedCriteria=smfeedCriteria,maxPosts=smRenderLimit,maxPostWords=smMaxWords,feedImageURL=smfeedImage,excludedPostIDs=smPostExcludeList,showFeedDump=arguments.showFeedDump); //Application.ptSocialMedia.utils.doDump(wpfeedArray,"wpfeedArray",0); // Add the WordPress Blog Feed Array to the final Return Array smFeedArray = application.ptSocialMedia.data.ArrayConcat(smFeedArray,wpfeedArray); } } // Get YouTube Element Records if ( LEN(TRIM(youTubeFeedIDs)) AND ListFindNoCase(arguments.excludeServiceList,ytExcludeName) EQ 0 ) { //application.adf.utils.logappend(msg="youTubeFeedIDs:#youTubeFeedIDs#", logfile='debugSM.html'); //Application.ptSocialMedia.utils.doDump(smSelectedItems,"smSelectedItems",0); for ( smItm=1; smItm LTE listLen(youTubeFeedIDs); smItm=smItm+1 ) { smFeedID = listGetAt(youTubeFeedIDs,smItm); // Get the PostIDs of excluded posts ytfeedArray = variables.youTubeFeedsService.buildYouTubeCSData(channelID=smFeedID,maxPosts=smRenderLimit,showFeedDump=arguments.showFeedDump); //ytCSDataArray = variables.youTubeFeedsService.buildYouTubeCSData(feedID=smFeedID,feedCriteria=smfeedCriteria,maxPosts=smRenderLimit,excludedPostIDs=smPostExcludeList,showFeedDump=arguments.showFeedDump); //Application.ptSocialMedia.utils.doDump(ytfeedArray,"ytfeedArray",0); // Add the YouTube Blog Feed Array to the final Return Array smFeedArray = application.ptSocialMedia.data.ArrayConcat(smFeedArray,ytfeedArray); } } if ( arguments.addTestData ) { // Add the TestData Feed Array to the final Return Array arrayAppend(smFeedArray,buildFeedDataTest()); } if ( LEN(TRIM(arguments.sortField)) AND LEN(TRIM(arguments.sortOrder)) AND ListFindNoCase(sortOrderOptions,arguments.sortOrder) ) { // Sort the Data Feeds descending by PUBLISHEDDATE smFeedArray = application.ptSocialMedia.data.arrayOfStructsSort( aOfS=smFeedArray ,key=TRIM(arguments.sortField) ,sortOrder=TRIM(arguments.sortOrder) ,sortType="textnocase" ); } return smFeedArray;
var feedData = StructNew(); var localDateTime = DateAdd("n",-11,Now()); // n - minutes var pubDateTime = DateAdd("h",5,localDateTime); // h - hours var csDataTime = application.ptSocialMedia.date.csDateFormat(dateformat(pubDateTime),timeformat(pubDateTime,"long")); var isoDateTime = application.ptSocialMedia.date.formatDateTimeISO8601(dateformat(pubDateTime),timeformat(pubDateTime,"long"),0); var serviceLink = "http://www.paperthin.com"; var serviceLogo = "/ADF/apps/pt_social_media/images/test/service-logo.gif"; switch(arguments.serviceType) { case "facebook": serviceLink = "https://www.facebook.com/"; serviceLogo = "/ADF/apps/pt_social_media/images/facebook-32.png"; break; case "twitter": serviceLink = "https://www.twitter.com/"; serviceLogo = "/ADF/apps/pt_social_media/images/twitter-32.png"; break; case "wordpress": serviceLink = "https://blogs.potsdam.edu/"; serviceLogo = "/ADF/apps/pt_social_media/images/wordpress-32.gif"; break; case "youtube": serviceLink = "https://www.youtube.edu/"; serviceLogo = "/ADF/apps/pt_social_media/images/youtube-32.png"; break; } // Feed Primary Meta Data feedData.ServiceType = arguments.serviceType; // [facebook, twitter, youtube, wordpress] feedData.ServiceLink = serviceLink; feedData.ServiceLogo = serviceLogo; //feedData.ContentLogo = ""; // TODO: Remove feedData.PublishedDate = isoDateTime; feedData.csFormattedPublishedDate = csDataTime; feedData.FeedID = CreateUUID(); feedData.FeedType = "Feed Type"; feedData.FeedImage = "/ADF/apps/pt_social_media/images/test/feed-image.gif"; feedData.FeedLink = "http://www.google.com/"; feedData.FeedName = "Feed Name"; // Source Info feedData.Source = StructNew(); feedData.Source.name = "Source Name"; feedData.Source.link = "http://www.yahoo.com/"; feedData.Source.photo = "/ADF/apps/pt_social_media/images/test/source-image.gif"; feedData.Source.image = "/ADF/apps/pt_social_media/images/test/source-image.gif"; feedData.Source.userid = "Source-User-ID"; feedData.Source.username = "Source User Name"; feedData.Source.description = "Source Description"; // Content Info feedData.Content = StructNew(); feedData.Content.postid = "Content-Post-ID"; feedData.Content.title = "Content title"; feedData.Content.message = "Content message Content message Content message Content message"; feedData.Content.link = "http://www.amazon.com/"; feedData.Content.icon = "/ADF/apps/pt_social_media/images/test/content-icon.gif"; feedData.Content.thumbnail = "/ADF/apps/pt_social_media/images/test/content-image.gif"; feedData.Content.image = "/ADF/apps/pt_social_media/images/test/content-image.gif"; feedData.Content.description = "Content description Content description Content description Content description"; feedData.Content.date = isoDateTime; feedData.Content.csFormattedDate = csDataTime; // Facebook Like Button feedData.FBLikeBtn = StructNew(); feedData.FBLikeBtn.link = "http://www.aol.com/"; // Twitter Tweet Button feedData.TweetBtn = StructNew(); feedData.TweetBtn.link = "http://www.msn.com/"; feedData.TweetBtn.message = "Tweet Button Message Tweet Button Message Tweet Button Message Tweet Button Message"; return feedData; var retStatus = StructNew(); retStatus.status = false; // TODO: Add security for logged in Admin/Contributors ONLY switch(arguments.serviceType){ case "facebook": //retStatus.status = arguments.serviceType; retStatus = variables.facebookPagesDAO.saveExcludedPostsIDs(arguments.feedID,arguments.postID); retStatus.status = true; break; case "instagram": //retStatus.status = arguments.serviceType; retStatus = variables.instagramPagesDAO.saveExcludedPostsIDs(arguments.feedID,arguments.postID); retStatus.status = true; break; case "twitter": //retStatus.status = arguments.serviceType; retStatus = variables.twitterAccountsKeywordsDAO.saveExcludedPostsIDs(arguments.feedID,arguments.postID); retStatus.status = true; break; case "wordpress": //retStatus.status = arguments.serviceType; retStatus = variables.wordPressBlogsDAO.saveExcludedPostsIDs(arguments.feedID,arguments.postID); retStatus.status = true; break; case "youtube": //retStatus.status = arguments.serviceType; retStatus = variables.youTubeChannelsDAO.saveExcludedPostsIDs(arguments.feedID,arguments.postID); retStatus.status = true; break; } return retStatus; var retStatus = StructNew(); retStatus.status = false; // TODO: Add security for logged in Admin/Contributors ONLY switch(arguments.serviceType){ case "facebook": //retStatus.status = arguments.serviceType; retStatus = variables.facebookPagesDAO.saveIncludedPostsIDs(arguments.feedID,arguments.postID); retStatus.status = true; break; case "instagram": //retStatus.status = arguments.serviceType; retStatus = variables.instagramPagesDAO.saveIncludedPostsIDs(arguments.feedID,arguments.postID); retStatus.status = true; break; case "twitter": //retStatus.status = arguments.serviceType; retStatus = variables.twitterAccountsKeywordsDAO.saveIncludedPostsIDs(arguments.feedID,arguments.postID); retStatus.status = true; break; case "wordpress": //retStatus.status = arguments.serviceType; retStatus = variables.wordPressBlogsDAO.saveIncludedPostsIDs(arguments.feedID,arguments.postID); retStatus.status = true; break; case "youtube": //retStatus.status = arguments.serviceType; retStatus = variables.youTubeChannelsDAO.saveIncludedPostsIDs(arguments.feedID,arguments.postID); retStatus.status = true; break; } return retStatus; var retStatus = StructNew(); var appConfigStruct = application.ptSocialMedia.getAppConfig(); var retStatus.status = false; if ( structKeyExists(appConfigStruct,"filterType") AND LEN(TRIM(appConfigStruct['filterType'])) ) var filterType = appConfigStruct['filterType']; // TODO: Add security for logged in Admin/Contributors ONLY switch(arguments.serviceType){ case "facebook": if (filterType EQ "excluded") { if (arguments.action EQ "add") { retStatus = variables.facebookPagesDAO.saveIncludedPostsIDs(arguments.feedID,arguments.postID); } else if (arguments.action EQ "remove") { retStatus = variables.facebookPagesDAO.deleteIncludedPostsIDs(arguments.feedID,arguments.postID); } } else if (filterType EQ "included") { if (arguments.action EQ "remove") { retStatus = variables.facebookPagesDAO.saveExcludedPostsIDs(arguments.feedID,arguments.postID); } else if (arguments.action EQ "add") { retStatus = variables.facebookPagesDAO.deleteExcludedPostsIDs(arguments.feedID,arguments.postID); } } retStatus.status = true; break; case "instagram": if (filterType EQ "excluded") { if (arguments.action EQ "add") { retStatus = variables.instagramPagesDAO.saveIncludedPostsIDs(arguments.feedID,arguments.postID); } else if (arguments.action EQ "remove") { retStatus = variables.instagramPagesDAO.deleteIncludedPostsIDs(arguments.feedID,arguments.postID); } } else if (filterType EQ "included") { if (arguments.action EQ "remove") { retStatus = variables.instagramPagesDAO.saveExcludedPostsIDs(arguments.feedID,arguments.postID); } else if (arguments.action EQ "add") { retStatus = variables.instagramPagesDAO.deleteExcludedPostsIDs(arguments.feedID,arguments.postID); } } retStatus.status = true; break; case "twitter": if (filterType EQ "excluded") { if (arguments.action EQ "add") { retStatus = variables.twitterAccountsKeywordsDAO.saveIncludedPostsIDs(arguments.feedID,arguments.postID); } else if (arguments.action EQ "remove") { retStatus = variables.twitterAccountsKeywordsDAO.deleteIncludedPostsIDs(arguments.feedID,arguments.postID); } } else if (filterType EQ "included") { if (arguments.action EQ "remove") { retStatus = variables.twitterAccountsKeywordsDAO.saveExcludedPostsIDs(arguments.feedID,arguments.postID); } else if (arguments.action EQ "add") { retStatus = variables.twitterAccountsKeywordsDAO.deleteExcludedPostsIDs(arguments.feedID,arguments.postID); } } retStatus.status = true; break; case "wordpress": if (filterType EQ "excluded") { if (arguments.action EQ "add") { retStatus = variables.wordPressBlogsDAO.saveIncludedPostsIDs(arguments.feedID,arguments.postID); } else if (arguments.action EQ "remove") { retStatus = variables.wordPressBlogsDAO.deleteIncludedPostsIDs(arguments.feedID,arguments.postID); } } else if (filterType EQ "included") { if (arguments.action EQ "remove") { retStatus = variables.wordPressBlogsDAO.saveExcludedPostsIDs(arguments.feedID,arguments.postID); } else if (arguments.action EQ "add") { retStatus = variables.wordPressBlogsDAO.deleteExcludedPostsIDs(arguments.feedID,arguments.postID); } } retStatus.status = true; break; case "youtube": if (filterType EQ "excluded") { if (arguments.action EQ "add") { retStatus = variables.youTubeChannelsDAO.saveIncludedPostsIDs(arguments.feedID,arguments.postID); } else if (arguments.action EQ "remove") { retStatus = variables.youTubeChannelsDAO.deleteIncludedPostsIDs(arguments.feedID,arguments.postID); } } else if (filterType EQ "included") { if (arguments.action EQ "remove") { retStatus = variables.youTubeChannelsDAO.saveExcludedPostsIDs(arguments.feedID,arguments.postID); } else if (arguments.action EQ "add") { retStatus = variables.youTubeChannelsDAO.deleteExcludedPostsIDs(arguments.feedID,arguments.postID); } } retStatus.status = true; break; } return retStatus; var smFeedArray = ArrayNew(1); var smFeedItems = arguments.feedItems; var maxItems = ArrayLen(smFeedItems); var smFeedData = StructNew(); var smItm = 1; var feedSourceIDList = ""; var sortOrder = "asc"; var sortField = "SERVICETYPE"; if ( arguments.renderedItemCount LTE maxItems ) maxItems = arguments.renderedItemCount; for ( smItm=1; smItm LTE maxItems; smItm=smItm+1 ) { smFeedData = StructNew(); smFeedData.FeedID = smFeedItems[smItm].FEEDID; // F19805E9-C299-E910-82557D859967B3DF smFeedData.FeedName = smFeedItems[smItm].FEEDNAME; // SUNY Potsdam smFeedData.FeedImage = smFeedItems[smItm].FEEDIMAGE; // https://graph.facebook.com/114157705283651/picture/ smFeedData.FeedLink = smFeedItems[smItm].FEEDLINK; // http://www.facebook.com/SUNYPotsdam smFeedData.ServiceLink = smFeedItems[smItm].SERVICELINK; // http://www.facebook.com/ smFeedData.ServiceLogo = smFeedItems[smItm].SERVICELOGO; // /ADF/apps/pt_social_media/images/facebook-32.png smFeedData.ServiceType = smFeedItems[smItm].SERVICETYPE; // facebook // If the Service Type is WORDPRESS and an FEEDIMAGE was provided use the FEEDIMAGE for the Service Logo if ( smFeedItems[smItm].SERVICETYPE IS "wordpress" AND LEN(TRIM(smFeedItems[smItm].FEEDIMAGE)) ) smFeedData.ServiceLogo = smFeedItems[smItm].FEEDIMAGE; // If the FeedID has not been added to the list then add it AND add the struct to the Feed Source Array if ( ListFindNoCase(feedSourceIDList,smFeedItems[smItm].FEEDID) EQ 0 ) { feedSourceIDList = ListAppend(feedSourceIDList,smFeedItems[smItm].FEEDID); ArrayAppend(smFeedArray,smFeedData); } } //Application.ptSocialMedia.utils.doDump(feedSourceIDList,"feedSourceIDList",0); //Application.ptSocialMedia.utils.doDump(smFeedArray,"smFeedArray",0); // Sort the Source Data by SERVICETYPE if ( ArrayLen(smFeedArray) ) { smFeedArray = application.ptSocialMedia.data.arrayOfStructsSort( aOfS=smFeedArray ,key=sortField ,sortOrder=sortOrder ,sortType="textnocase" ); } return smFeedArray; var foundID = false; var filterField = "excluded"; var appConfigStruct = application.ptSocialMedia.getAppConfig(); var filteredPostData = application.ptsocialmedia.socialMediaCacheDAO.getFilteredPostData(); if ( structKeyExists(appConfigStruct,"filterType") AND LEN(TRIM(appConfigStruct['filterType'])) ) filterType = appConfigStruct['filterType']; if ( filterType EQ "excluded") filterField = "included"; currFilterList = filteredPostData.values["#arguments.service##filterField#List"]; if ( listfind(currFilterList,arguments.postID) ) foundID = true; return foundID; // Add the errorStruct to the application.ptSocialMedia.feedErrors Array ArrayAppend(application.ptSocialMedia.appErrors,errorStruct); --->