';
for (var i = 0; i < data.feed.entry.length; i++) {
for (var j = 0; j < data.feed.entry[i].link.length; j++) {
if (data.feed.entry[i].link[j].rel == "alternate") {
posturl = data.feed.entry[i].link[j].href;
break
}
}
var posttitle = data.feed.entry[i].title.$t;
var postlabel = data.feed.entry[i].category[0].term;
var get_date = data.feed.entry[i].published.$t,
year = get_date.substring(0, 4),
month = get_date.substring(5, 7),
day = get_date.substring(8, 10),
date = month_format[parseInt(month, 10)] + ' ' + day + ', ' + year;
var content = data.feed.entry[i].content.$t;
var $content = $('
').html(content);
if (content.indexOf("http://www.youtube.com/embed/") > -1 || content.indexOf("https://www.youtube.com/embed/") > -1) {
var src2 = data.feed.entry[i].media$thumbnail.url;
var thumb = '
'
} else if (content.indexOf("
-1) {
var src = $content.find('img:first').attr('src');
var thumb = '
'
} else {
var thumb = '
'
}
htmlcode += '
' + postlabel + '' + thumb + '
'
}
htmlcode += '
';
$("#related-posts").html(htmlcode);
$('.related-img').each(function() {
$(this).attr('style', function(i, src) {
return src.replace('/default.jpg', '/mqdefault.jpg');
}).attr('style', function(i, src) {
return src.replace('s72-c', 's1600');
})
});
}
});
});
//]]>
</script>
Burada bir şeyleri düzenlemek lazım gibi geliyor ama ben bulamadım :)