Blogger Hacks : Read More Hack with Image

0 comments
Save to del.icio.us 0 hits!

We have seen Read more function whicj is used to cut our post on homepage, post will appear fully when we click read more link. It's cut automatically and if we insert image, it appears thumbnail.

Here is the hack which AUTOMATICALLY create image thumbnail for you.


Lets see the Steps to follow :




1) Go to Layout Section and Click on Edit HTML

2) Now, find <data:post.body/>(Using Ctrl + F)

3) Copy the code below and paste it after <data:post.body/>(what you have searched
above)


<script type='text/javascript'>
summary_noimg = 430;
summary_img = 340;
img_thumb_height = 100;
img_thumb_width = 120;
</script>
<script src='http://ankitbajaj151.googlepages.com/readmore.js' type='text/javascript'/>
<b:if cond='data:blog.pageType != &quot;item&quot;'>
<div expr:id='&quot;summary&quot; + data:post.id'><data:post.body/></div>
<script type='text/javascript'>createSummaryAndThumb(&quot;summary<data:post.id/>&quot;);</script>
<span class='rmlink' style='float:right'><a expr:href='data:post.url'>Read more</a></span>
</b:if>
<b:if cond='data:blog.pageType == &quot;item&quot;'><data:post.body/></b:if>


4) Fianlly, Save the template.


Note : You can edit the code as per your requirement

summary_noimg = 430; is post cut height without image
summary_img = 340; is post cut height with image
img_thumb_height = 100; is thumbnail image height
img_thumb_width = 120; is thumbnail image width

Related Posts :



Comments
0 comments
Do you have any suggestions? Add your comment. Please don't spam!
Subscribe to my feed

Post a Comment

About Me

Latest posts

Blogger Zone