Saturday, May 9, 2009

Automatic Thumbnail and Readmore Function


Readmore function is used to cut our post on homepage, post will appear fully when we click readmore link.
It's cut automatically and if we insert image, it appears thumbnail. This is automatic readmore function with thumbnail. We just need to set up our HTML code. How to?

1. Go to "Layout" click "Edit HTML"
2. Tick on "Expand Widget Templates"
3. Find </head> code
4. Insert this javascript under </head> code
$6.00 Welcome Survey After Free Registration!
<script type='text/javascript'>var thumbnail_mode = &quot;no-float&quot; ;
summary_noimg = 430;
summary_img = 340;
img_thumb_height = 100;
img_thumb_width = 120;
</script>
<script src='http://kfile.110mb.com/summary-post.js' type='text/javascript'/>


Note :

You can cutomize this size

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

5. Find this code
<data:post.body/>

6. Replace with this code below
<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;padding-top:20px;'><a expr:href='data:post.url'> read more &#8220;<data:post.title/>&#8221;</a></span>

</b:if>
<b:if cond='data:blog.pageType == &quot;item&quot;'><data:post.body/></b:if>


7. Save

Now you can try to post and it cut automatically.


8. Done...

0 comments:

Post a Comment

 

My Blog List

Hello

All About Tutorial © 2008 Business Ads Ready is Designed by Ipiet Supported by Tadpole's Notez