var reStr = ""; var iFrameApiURL = "www.facebook.com/plugins/like.php"; // TODO: move URL to config element var fbHref = TRIM(arguments.href); var fbLayout = "standard"; var fbLayoutOptions = "standard,button_count,box_count"; var fbShowFaces = false; var fbAction = "like"; var fbSend = false; var fbActionOptions = "like,recommend"; // Remember the 'Send' button option is its own argument var fbFont = ""; var fbFontOptions = "arial,lucida grande,segoe ui,tahoma,trebuchet ms,verdana"; var fbWidth = 450; var fbIFrameWidthXtra = 80; var fbIFrameHeightXtra = 80; var fbColorScheme = "light"; var fbColorSchemeOptions = "light,dark"; var iFrameHeight=35; var protocol = "http://"; var fbEmbedCodeOptions = "HTML5,XFBML,iFrame"; var fbEmbedCodeType = "XFBML"; var fbAppID = getFacebookAppID(); // Get the Facebook AppID from the config element // Check the Embed code type if ( ListFindNoCase(fbEmbedCodeOptions,arguments.embedType) ) fbEmbedCodeType = arguments.embedType; // Check the Protocal of the calling page to and keep call secure if needed if ( len(trim(cgi.https)) ) protocol = "https://"; // Set and Validate parameter values if ( ListFindNoCase(fbLayoutOptions,arguments.layout) ) fbLayout = arguments.layout; if ( arguments.show_faces AND fbLayout EQ "standard" ) fbShowFaces = true; // The SEND button option is not available for the IFRAME embedType if ( arguments.send AND arguments.embedType NEQ "iFrame" ) fbSend = true; if ( ListFindNoCase(fbActionOptions,arguments.action) ) fbAction = arguments.action; if ( IsNumeric(arguments.width) ) fbWidth = arguments.width; if ( fbEmbedCodeType EQ "iFrame" ) fbWidth = fbWidth + fbIFrameWidthXtra; if ( ListFindNoCase(fbFontOptions,arguments.font) ) fbFont = URLEncodedFormat(arguments.font); if ( ListFindNoCase(fbColorSchemeOptions,arguments.colorscheme) ) fbColorScheme = arguments.colorscheme; if ( fbEmbedCodeType EQ "iFrame" AND (fbShowFaces OR fbLayout EQ "box_count") ) iFrameHeight = fbIFrameHeightXtra; // Encode complex text values //fbHref=URLEncodedFormat(fbHref); // As of 1-15-2013 this extra encodeing causes the FB plugin to error fbFont=URLEncodedFormat(fbFont); // Load the Facebook Javascript SDK header (once per page) application.ptSocialMedia.socialMediaService.loadFacebookJS(); action="#fbAction#" font="#fbFont#" colorscheme="#fbColorScheme#" > // Load the Facebook Javascript SDK header (once per page) application.ptSocialMedia.socialMediaService.loadFacebookJS();
data-action="#fbAction#" data-colorscheme="#fbColorScheme#" data-font="#fbFont#">