Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
function showlatestpostswiththumbs(json) {
document.write('
');- ');
' + monthnames[parseInt(showmonth, 10)] + ' ' + showday + ' ' + showyear + ' ');
');' + posttitle + ' ');'); '); ');
');for (var i = 0; i < posts_no; i++) {
var entry = json.feed.entry[i];
var posttitle = entry.title.$t;
var postsurl;
if (i == json.feed.entry.length) break;
for (var k = 0; k < entry.link.length; k++) {
if (entry.link[k].rel == 'replies' && entry.link[k].type == 'text/html') {
var commentstext = entry.link[k].title;
var commentsurl = entry.link[k].href;
}
if (entry.link[k].rel == 'alternate') {
postsurl = entry.link[k].href;
break;
}
}
var recenthumb;
try {
recenthumb = entry.media$thumbnail.url;
} catch (error) {
s = entry.content.$t;
a = s.indexOf("<img");
b = s.indexOf("src="", a);
c = s.indexOf(""", b + 5);
d = s.substr(b + 5, c - b - 5);
if ((a != -1) && (b != -1) && (c != -1) && (d != "")) {
recenthumb = d;
} else recenthumb = 'http://2.bp.blogspot.com/-C3Mo0iKKiSw/VGdK808U7rI/AAAAAAAAAmI/W7Ae_dsEVAE/s1600/no-thumb.png';
}
var postdate = entry.published.$t;
var showyear = postdate.substring(0, 4);
var showmonth = postdate.substring(5, 7);
var showday = postdate.substring(8, 10);
var monthnames = new Array();
monthnames[1] = "Jan";
monthnames[2] = "Feb";
monthnames[3] = "Mar";
monthnames[4] = "Apr";
monthnames[5] = "May";
monthnames[6] = "Jun";
monthnames[7] = "Jul";
monthnames[8] = "Aug";
monthnames[9] = "Sep";
monthnames[10] = "Oct";
monthnames[11] = "Nov";
monthnames[12] = "Dec";
document.write('
if (posts_date == true) document.write('
if (showpoststhumbs == true)
document.write('
document.write('
var posts_details = '';
var flag = 0;
document.write('
if (showcommentslink == true) {
if (flag == 1) {
posts_details = posts_details + '
';
}
if (commentstext == '1 Comments') commentstext = '1 Comment';
if (commentstext == '0 Comments') commentstext = 'No Comments';
commentstext = '' + commentstext + '';
posts_details = posts_details + commentstext;
flag = 1;;
}
if (readmorelink == true) {
if (flag == 1) posts_details = posts_details + ' | ';
posts_details = posts_details + 'Read more';
flag = 1;;
}
document.write(posts_details);
document.write('
document.write('
}
document.write('
}