‘;

oEngagementContainer_c33a5a00_f31b_11e7_bb37_5710a517c3f8.append(sHTML_c33a5a00_f31b_11e7_bb37_5710a517c3f8);
}
});
}

// Build engagement set
$.each(oResponse.assets, function(index) {
if (index == 1 && sOriginID_c33a5a00_f31b_11e7_bb37_5710a517c3f8 == null) {
sOriginID_c33a5a00_f31b_11e7_bb37_5710a517c3f8 = oResponse.assets[0].id;
}
// Display assets once origin is found
// Find origin then begin displaying assets
if (bFoundOrigin_c33a5a00_f31b_11e7_bb37_5710a517c3f8 == true) {
if (this.id == sOriginID_c33a5a00_f31b_11e7_bb37_5710a517c3f8) {
// Found orgin a second time. Stop gathering assets and kill next_url
bStop_c33a5a00_f31b_11e7_bb37_5710a517c3f8 = true;
sNextUrl_c33a5a00_f31b_11e7_bb37_5710a517c3f8 = null;
oEngagementMore_c33a5a00_f31b_11e7_bb37_5710a517c3f8.remove();
} else if (bStop_c33a5a00_f31b_11e7_bb37_5710a517c3f8 == false && this.id != ‘c33a5a00-f31b-11e7-bb37-5710a517c3f8’) {
// Display asset
var sHTML_c33a5a00_f31b_11e7_bb37_5710a517c3f8 = ”;
if (this.content.includes(‘engagement-asset’) && iDisplayCount_c33a5a00_f31b_11e7_bb37_5710a517c3f8 ‘ + this.content + ‘

‘;
}
}
} else {
if (this.id == sOriginID_c33a5a00_f31b_11e7_bb37_5710a517c3f8) {
// Origin found. Begin displaying assets
bFoundOrigin_c33a5a00_f31b_11e7_bb37_5710a517c3f8 = true;
} else {
// Origin found is false. Skip asset
// Fail-safe in case origin is not present in set. This can be removed when origin is fixed.
if (bFirstRun_c33a5a00_f31b_11e7_bb37_5710a517c3f8 == true) {
// Stored first id
sFirstID_c33a5a00_f31b_11e7_bb37_5710a517c3f8 = this.id;
bFirstRun_c33a5a00_f31b_11e7_bb37_5710a517c3f8 = false;
} else if (this.id == sFirstID_c33a5a00_f31b_11e7_bb37_5710a517c3f8) {
// We’ve started again. Force origin
sOriginID_c33a5a00_f31b_11e7_bb37_5710a517c3f8 = sFirstID_c33a5a00_f31b_11e7_bb37_5710a517c3f8;
bFoundOrigin_c33a5a00_f31b_11e7_bb37_5710a517c3f8 = true;
} // end Fail-safe
}
}

// Append engagement assets to container
oEngagementContainer_c33a5a00_f31b_11e7_bb37_5710a517c3f8.append(sHTML_c33a5a00_f31b_11e7_bb37_5710a517c3f8);

// Stop traversing asset array
if (iDisplayCount_c33a5a00_f31b_11e7_bb37_5710a517c3f8 >= iMaxDisplay_c33a5a00_f31b_11e7_bb37_5710a517c3f8) {
bStop_c33a5a00_f31b_11e7_bb37_5710a517c3f8 = true;
return false;
}
});

// Include block_id on newly added list items
oEngagementContainer_c33a5a00_f31b_11e7_bb37_5710a517c3f8.find(‘.engagement-item.original’).each(function() {
var sHref_c33a5a00_f31b_11e7_bb37_5710a517c3f8 = scrubURL($(this).find(“a.centered-content-link”).attr(“href”));

if(sHref_c33a5a00_f31b_11e7_bb37_5710a517c3f8!=”javascript:void(0)”){

// Add content discovery tracking

sHref_c33a5a00_f31b_11e7_bb37_5710a517c3f8 += ‘#tncms-source=endcard-gallery’;




// Add to image and headlines links
$(this).removeClass(‘original’).find(“a.centered-content-link”).attr(“href”, sHref_c33a5a00_f31b_11e7_bb37_5710a517c3f8);
}
});

// Check next URL
if (sNextUrl_c33a5a00_f31b_11e7_bb37_5710a517c3f8 && bStop_c33a5a00_f31b_11e7_bb37_5710a517c3f8 == false) {
// if origin hasn’t been found yet and we hit next_url. Trigger the set to pull in again.
if (bFoundOrigin_c33a5a00_f31b_11e7_bb37_5710a517c3f8 == false) {
// No origin yet. Call the populate function
__tnt.engagement.assets[“c33a5a00-f31b-11e7-bb37-5710a517c3f8″].populate(sNextUrl_c33a5a00_f31b_11e7_bb37_5710a517c3f8);
} else {
// Append sNextUrl_c33a5a00_f31b_11e7_bb37_5710a517c3f8 to engagement set
oEngagementContainer_c33a5a00_f31b_11e7_bb37_5710a517c3f8.append(”);

if (iDisplayCount_c33a5a00_f31b_11e7_bb37_5710a517c3f8

Source


Warning: A non-numeric value encountered in /home2/wadyk60ackgy/public_html/wp-content/themes/Newspaper/includes/wp_booster/td_block.php on line 353

LEAVE A REPLY