In my early two posts(I,II). I talk about Blogger in Draft new features, the Geotagging. There are many blogger discuss the new feature in comments of New feature: Geotagging by Blogger In Draft. Now, maybe you don't understand that this post i will talk about feed item and why i will remind it.
If you had read the post of blogger draft new feature. You will notice that the author offer a Gagdet(here). It's add a google map in you blogger that parser feed georss:point data of your post feed. And i found Blogger Developers Network announced a feature about media:thumbnail(here). It's talk about you can get a 72x72 pixel image in your feed if you add first image in your post. Those give me a idea. I modify my blog template that just list the post if you click the older post link in the footer of blog.
<b:if cond='data:blog.pageType == "index"'>
<!-- Show article title only -->
<div class='thumbnail_'>
<table>
<tr>
<td>
<script expr:src='"/feeds/posts/default/" + data:post.id + "?alt=json-in-script&callback=GetThumbnail"'
type='text/javascript'>
</script>
</td>
<td>
<h3 class='post-title' id='list-title'>
<a expr:href='data:post.url'>
<data:post.title/>
</a>
<h2 class='date-header'>
<data:post.dateHeader/>
</h2>
</h3>
</td>
</tr>
</table>
</div>
<b:else/>
<b:include data='post' name='post' />
</b:if>
function GetThumbnail(json) {
var url = (typeof(json.entry.media$thumbnail) != 'undefined') ? json.entry.media$thumbnail.url : " & quot;
if (url.length & gt; 0) document.write('<img src=\"' + url + '\"/>');
else document.write('<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsPeUmlIKKTCkO4u4w42SdR4ph9rwh6IgI53ESBC232pBzD8nlNbOZdUk-P5KtJh73TLP_fRMU_HR3CIY-vNDYriqFSfX2un2HH-mKa_w-iChRdLCYoCU3n0rbEPcfOOHMPdyxMxIkQyc4/" />');
}
The above code. javascript code pass one feed by pass data:post.id and execute callback functionGetThumbnail to write the image url.
get your blogger thumbnail←←
Excellent Blog. Thank you so much for sharing.
ReplyDeletepython training in bangalore | python online training
aws online training in bangalore | aws online training
artificial intelligence training in bangalore | artificial intelligence online training
machine learning training in bangalore | machine learning online training
data science training in bangalore | data science online training