Abstract subjects, real art

‘,
‘]

return ret.join(”);
}

function setCarouselContents(){
var paramUser = getParamUser();
var recipe = “3”; //s.getCookieForRecVidABTest();
var paramABTestBucket = getParamABTestBucket(recipe);
var baseurl = “http://md1.washingtonpost.com”;//”http://md1.washingtonpost.com”

//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://img.wpdigital.net/rf/image_172x114″;
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://img.wpdigital.net/wp-srv/images/spacer.gif”;

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=[”];

Comments

comments

About the Author