', '
" irow="" rowofvideos="rgFinal.join('');" htmltoset="getStartOfHtml()"/>'] return ret.join(''); } function setCarouselContents(){ var paramUser = getParamUser(); var recipe = "3"; //s.getCookieForRecVidABTest(); var paramABTestBucket = getParamABTestBucket(recipe); var baseurl = "http://ift.tt/MPRFVM";//"http://ift.tt/MPRFVM" //The current url var paramCurrentUrl = "&url=" + encodeURIComponent(TWP.Data.NN.canonicalURL);//we have confirmation this is preferred over 'href' //test url - we need this especially for recipe 4. Other recipes may work at least partially with prodprev urls //var paramCurrentUrl = "&url=" + encodeURIComponent("/entertainment/tv/tbss-men-at-work-a-rerun-before-its-even-started/2012/05/23/gJQAcSedkU_story.html"); var rgUrlGetRecommendedVideos = [baseurl, "/search-recommendation/videos.jsonp?callback=?", paramUser, paramABTestBucket, paramCurrentUrl]; var urlGetRecommendedVideos = rgUrlGetRecommendedVideos.join(''); $.ajax({ dataType:"json", url:urlGetRecommendedVideos, timeout:2000, success:function(data){ if(data == null || data.results == undefined || data.results == null){ return; } //constants - the size of images, count of items per row var itemsPerRow = 3; //the following five lines specify the size. Note that only those sizes automatically generated by Methode are supported. // var photoPathPrefix = "http://ift.tt/MPRERP"; var photoPathPrefix; var maxPhotoWidth = 172; var maxPhotoHeight = 114; var photoWidth = maxPhotoWidth + ""; var photoHeight = maxPhotoHeight + ""; var maxPhotoHeightpx = maxPhotoHeight + "px"; var minPhotoWidthpx = maxPhotoWidth + "px"; var blankImageUrl = "http://ift.tt/OHNtvw"; var results = data.results; //we want to only show full rows. It was decided partial rows look like an error. var countResultsToShow = results.length = maxPhotoWidth && photo.path != undefined && photo.path != null){ photoPath = photo.path; } //construct the div, by concatenating the array var rgDiv=['']; arrayOfHtmlDivs[i] = rgDiv.join(''); } var rgFinal = new Array(); var iRow = 0; for(var i=0; i']; var rowStart = rgRowStart.join(''); rgFinal.push(rowStart); for(var j=0; j
No comments:
Post a Comment