Ni SS with Image
Dan Ini SS no image
Oke langsung saja ke TeKaPe XD
1) Cari Kode </head>
2) Setelah Kode Diatas ketemu , Kalian Letakan Kode dibawah ini tepat Diatas Kode tadi
<script type='text/javascript'>3) Cari kode <data:post.body/> dan ganti dengan kode dibawah ini
// ganti angka dibawah untuk mengatur jumlah karakter
summary_noimg = 350;
summary_img = 280;
// ganti angka dibawah untuk merubah ukuran thumbnail
img_thumb_height = 100;
img_thumb_width = 100;
// ganti dengan gambar sesuai selera anda
img_thumb_nosrc = "http://4.bp.blogspot.com/-zxPckZmJOK0/T_z_K1Tmd8I/AAAAAAAAApw/G2A5cq2Rj88/s77/noImageAvailable.jpg";
</script>
<script type='text/javascript'>
//<![CDATA[
function removeHtmlTag(strx,chop){
if(strx.indexOf("<")!=-1)
{
var s = strx.split("<");
for(var i=0;i<s.length;i++){
if(s[i].indexOf(">")!=-1){
s[i] = s[i].substring(s[i].indexOf(">")+1,s[i].length);
}
}
strx = s.join("");
}
chop = (chop < strx.length-1) ? chop : strx.length-2;
while(strx.charAt(chop-1)!=' ' && strx.indexOf(' ',chop)!=-1) chop++;
strx = strx.substring(0,chop-1);
return strx+'...';
}
function createSummaryAndThumb(pID){
var div = document.getElementById(pID);
var imgtag = "";
var img = div.getElementsByTagName("img");
var summ = summary_noimg;
// this block of code is used to add default thumbnail to post without images
if(img.length<=1) {
imgtag = '<div style="clear:both; margin:0 10px 10px 0px;float:left;"><img src="'+img_thumb_nosrc+'" width="'+img_thumb_width+'px" height="'+img_thumb_height+'px"/></div>';
summ = summary_noimg;
}
if(img.length>=1) {
imgtag = '<span style="float:left; padding:0px 10px 5px 0px;"><img src="'+img[0].src+'" width="'+img_thumb_width+'px" height="'+img_thumb_height+'px"/></span>';
summ = summary_img;
}
var summary = imgtag + '<div>' + removeHtmlTag(div.innerHTML,summ) + '</div>';
div.innerHTML = summary;
}
//]]>
</script>
<b:if cond='data:blog.pageType != "static_page"'>
<b:if cond='data:blog.pageType != "item"'>
<div expr:id='"summary" + data:post.id'><data:post.body/></div>
<script type='text/javascript'>
createSummaryAndThumb("summary<data:post.id/>");
</script>
<span class='rmlink' style='float:right;margin-top:10px'>
<a expr:href='data:post.url'>
</a>
</span>
<b:else/>
<data:post.body/>
</b:if>
<b:else/>
<data:post.body/>
</b:if>
Catatan : Jika Blog kalian sudah menggunakan Auto Readmore, Sebelum'y kalian hapus Auto readmore yg dulu ada ..
Oke sigitu dulu trik pagi ini .. semoga bermanfaat :D
thanks : Altecdz.blogspot.com
Nice Artikel Sob
ReplyDeletehttp://id-cyb3r.blogspot.com/
wah... membuat blog menjadi ringan ya..
ReplyDeletethanks infonya sob
ReplyDelete@all : thanks for visit blog me :D
ReplyDelete