Monday, March 26, 2012

Meletakkan "Read More" Hack Secara Automatik Bersama Thumbnail

| |

1. Design > Edit HTML.
2. Tick pada kotak Expand Widgets.
3. Cari kod </head> tag
4. Gantikan dengan kod di bawah.

<script type='text/javascript'>
var thumbnail_mode = "no-float" ;
summary_noimg = 430;
summary_img = 340;
img_thumb_height = 100;
img_thumb_width = 120;
</script>
<script type='text/javascript' src='http://bloggerblogwidgets.googlecode.com/files/auto_readmore_blogger.js' ></script>
</head>

* numeric boleh tukar ikut kesesuaian saiz pada blog anda;
summary_noimg = 430; :Summary length if no image
summary_img = 340; :Summary length if it has image
img_thumb_height = 100; :Thumbnail image height
img_thumb_width = 120; :Thumbnail image width


5. Sekarang cari <data:post.body/> tag dalam template anda dan gantikan dengan kod yang di bawah.

<b:if cond='data:blog.pageType == &quot;item&quot;'>
<data:post.body/>
<b:else/>
<b:if cond='data:blog.pageType == &quot;static_page&quot;'>
<data:post.body/>
<b:else/>
<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>
<div style='clear: both;'/>
<span class='rmlink' style='font-weight:bold;padding:5px;float:right;text-align:right;'><a expr:href='data:post.url' >Read more ... </a></span>
</b:if>
</b:if>

6. Save template anda.

Sumber: Way2blogging

0 jejak:

Post a Comment