Friday, 26 August 2011
Automatic Post Summaries for Blogger with Thumbnails
Do you like this story?
Wordpress users might have seen the wordpress excerpt thing, which displays a summary of your post. Now we have something similar for blogger.Actually i should say it is really amazing..This hack will automatically create post summaries with thumbnails.. you needn't need to add any extra code in every blogpost that you make..These summaries will be displayed on all pages other than the post page..Here in my blog i am using a modded version of the same which displays summaries on pages other than the post page and homepage.Check out some of my labels to see the hack in action..
First of all, this hack was developed by Blogger Sphera . I will try to explain his hack to you guys..
First of all Edit your blogger template
Find this code
and replace it with
Off course you can edit these parameters..
Now Find
Replace it with
<b:if cond='data:blog.pageType == "item"'>
<data:post.body/>
<b:else/>
<b:if cond='data:blog.pageType == "static_page"'>
<data:post.body/>
<b:else/>
<div expr:id='"summary" + data:post.id'>
<data:post.body/>
</div>
<script type='text/javascript'>
createSummaryAndThumb("summary<data:post.id/>");
</script>
<div style='clear: both;'/>
<span style='padding-top:5px;;float:right;text-align:right;'><a expr:href='data:post.url' rel='bookmark'><b>Read more >></b></a></span>
</b:if>
</b:if>
And you are done.. now you should have the post summaries on your homepage,search results,archive and label pages..
First of all, this hack was developed by Blogger Sphera . I will try to explain his hack to you guys..
First of all Edit your blogger template
Find this code
</head>
and replace it with
<script type='text/javascript'>
var thumbnail_mode = "float" ;
summary_noimg = 230;
summary_img = 140;
img_thumb_height = 100;
img_thumb_width = 100;
</script>
<script src='http://blogergadgets.googlecode.com/files/excerpt.js' type='text/javascript'/>
</head>
var thumbnail_mode = "float" ;
summary_noimg = 230;
summary_img = 140;
img_thumb_height = 100;
img_thumb_width = 100;
</script>
<script src='http://blogergadgets.googlecode.com/files/excerpt.js' type='text/javascript'/>
</head>
Off course you can edit these parameters..
Now Find
<data:post.body/>
Replace it with
<b:if cond='data:blog.pageType == "item"'>
<data:post.body/>
<b:else/>
<b:if cond='data:blog.pageType == "static_page"'>
<data:post.body/>
<b:else/>
<div expr:id='"summary" + data:post.id'>
<data:post.body/>
</div>
<script type='text/javascript'>
createSummaryAndThumb("summary<data:post.id/>");
</script>
<div style='clear: both;'/>
<span style='padding-top:5px;;float:right;text-align:right;'><a expr:href='data:post.url' rel='bookmark'><b>Read more >></b></a></span>
</b:if>
</b:if>
And you are done.. now you should have the post summaries on your homepage,search results,archive and label pages..
This post was written by: kashif
For Suggestions and complains email us at pakcompany@yahoo.comTwitter
Subscribe to:
Post Comments (Atom)
0 Responses to “Automatic Post Summaries for Blogger with Thumbnails”
Post a Comment