Sebenarnya ini adalah versi Read More punyanya o-om (Agus Ramadhani) yang saya modifikasi dengan tambahan thumbnail. Mohon maaf bagi beliau yang tulisannya saya comot. hihii :))
Langsung saja kita mulai.
Pertama, masuk ke mode Design > Edit HTML (Expand Widget Template) lalu temukan kode </head>
dan letakkan kode berikut tepat diatasnya:
<script type='text/javascript'>
var thumbnail_mode = "float" ;summary_noimg = 250;
summary_img = 250;
img_thumb_height = 120;
img_thumb_width = 120;
</script>
<script type='text/javascript'>
//<![CDATA[
/******************************************
Auto-readmore link script, version 2.0 (for blogspot)
(C)2008 by Anhvo
visit http://en.vietwebguide.com to get more cool hacks
********************************************/
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;
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>
Langkah kedua, temukan kode <data:post.body/> atau <p><data:post.body/></p>
ganti salah satu kode di atas dengan kode di bawah ini:
<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'><a expr:href='data:post.url'><img alt='read_more' src='http://i945.photobucket.com/albums/ad291/zeromania/read_more_biru.png'/></a></span>
</b:if>
<b:if cond='data:blog.pageType == "item"'><data:post.body/></b:if>
Keterangan:
- summary_noimg = 250 : berarti jumlah karakter yg dipenggal tanpa gambar
- summary_img = 250 : berarti jumlah karakter yg dipenggal disertai dg gambar
- img_thumb_height = 120 dan img_thumb_width = 120 : ukuran gambar dalam satuan piksel
- http://i945.photobucket.com/albums/ad291/zeromania/read_more_biru.png : bisa sobat ganti dengan URL dimana menyimpan logo read morenya
Terakhir jangan lupa simpan template Anda dan lihat hasilnya..
Untuk pilihan icon Read More, bisa menggunakan beberapa tombol berikut:
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi56PzgZGPqbqfAta-k8y7QHQIvqY785qcKbmrXuMrvoKnB0xSkCI02yTiWytOGEG-4G1kqK57a0oxW1whoz4L1vFQA1PXYGL_yvDz9jg2NZ5fIIBl9nIHnvFbeFQSpVkzNSl1ulUY0H3M/s1600/readmor5.png
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzkRBOm5xJa_bOzr0a7YqmVLrxK7O07w4q7lBx2m1mEZegD6Me_lQgiTITNKQpXYuV7c7UxkfcvH4JFr5KM_cdZTMs6GBzpgunMaMo7X3lLd8y9yJ4Ifi_FVj4792y5E86Jl8HJmauPU4/s1600/readmor6.png
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglid142B6zaf8Qup96nPhR2TJKk4jaTdJRt5usjQKz8-FdzI4s3s1DLOA8dO4Q_Bk3iFJpcgpNKhlmFob87X1qFp8HVO7X3_bElgUEaYG56JI7YfAexPSHqMXaix01cMQN5w7mhfoqex0/s1600/readmor7.png
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLJe5DL4Jj-yTencX-jTm28ZAwbnv9ddn0pK456E2BPp0PugcVR7nZABxxUXqDUP2Yu8fYTGK0mdi4JS5YT6q7MjYo_9SCTi5LiRNCTEWTVYO2PGEfY6Zk6AyB1z3ETZhyphenhyphenaujOjmsvBOQ/s1600/readmor8.png
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCIqA23fw38eZojgsVveKnQd6BKSprHq3cY-sog7df2rR9hXoeaUrF6TkacWrQf1JLgSMBJqkZJ3h_ptRptOSJqJajKwfsuy7tCrmuasIc3bbVxa4JBt5lXlvV9v7v2MJrh8QYcpawHAY/s1600/readmore2.png
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHEgh23OtUnudxMlwk2v7I0OvGyMVa5WoBZb6ADE9b8YFBnOMwHVGwsXA2o9RFSt39D68a0k_S31pJcb9rfw6tSMq3V_rerL3TXx67hfbcGY7iW2VSYkdYqWHF9KBh62d3Tpj6WKLOjao/s1600/readmor10.png
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1foexkVxrwtvk7B4gZ5cj0SspjH0IYqZH25BNdKJ53Sm9NKC7VmJJcfcouTb36m4EQz9wyHz4yHrbm2f6Py_KN-uvPyT_yJUgRCPGesOZIauEmRXQxc9oPn-tGDu-rQmsWtOridKFYXY/s1600/readmore1.png
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCIqA23fw38eZojgsVveKnQd6BKSprHq3cY-sog7df2rR9hXoeaUrF6TkacWrQf1JLgSMBJqkZJ3h_ptRptOSJqJajKwfsuy7tCrmuasIc3bbVxa4JBt5lXlvV9v7v2MJrh8QYcpawHAY/s1600/readmore2.png
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiC87XVRlF0uGQd9Nx3U4TYNWWbHYnHK79rPxi1F_OscQbyNchsx4etNuq1ZqJE_Su1-NNRoeHJLs89kj7c_58gaodHZVkyUgPx3nqmrGWA7iXHuAfocSbMMMKO5Yw9-j0G_S1dZayhbZU/s1600/readmore3.png
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjvsdTAQEWbruNSGTKFli7MhyphenhyphendVBFp5desKLI3Zve8WeKUDg6z-a37VTcIYCvC3sy4SX4tR99UHxUGccwCMOjKS2UDuku7minu9nFmQjrNlPAbBLLKDD58_H9v-n_czeEKSf4Y2uWqu2I/s1600/readmore4.png
Selamat mencoba :))
ok say aadd linknya. tks
BalasHapus@Sang Cerpenis bercerita terimakasih :))
BalasHapusboleh ni dicoba^^ \
BalasHapusmaksih infonya
@chikarei: yups, dicoba ajah :))
BalasHapuswih bagus nih, aku save ya sob :)
BalasHapus@four dreams silahkan sob.. Hehe :))
BalasHapusmakasih infonya fren...thx dah mampir yah, aku dah follow, follow me ya fren...;D
BalasHapus@Lisna Lina "Lily" Simangunsong okeh.. Sama2. Salam kenal :))
BalasHapuswah.wah..mantaf..mantaf....bole dicoba juga neh
BalasHapus@julicavero : ok brow.. Silahkan dicoba
BalasHapussiap dicoba.....
BalasHapus@Septian
BalasHapusok bro,,, thx udah berkunjung :))
@_@ haduh masih bingung... tolong carikan ato buatkan video tutorial edit html yang ini dunk... tentang jump break. Bisa nggak? kalo dah dapat comenntar di blogku ya...
BalasHapus>> http://netterondemand.blogspot.com/
pa mungkin... Templatnya harus diganti kali ya...??
BalasHapus@ うちはサスケ :
BalasHapussebenarnya mudah saja sob.. jangan dilihat kode2 yg panjang itu. cyukup ikuti langkah tempatkan kode yg pertama (yg panjang itu)
lalu ikuti langkah ke2nya.. selesai!!!
oya jangan lupa klik Expand Widget Templates agar kode yg dicari ketemu !!
ok, good lack
read morenya ada yg lain kah?
BalasHapusbisa diganti sama gambar yg lain gak?
hehehehh
@Luthfie chan: bisa donk, asal kamu punya gambar dan URL-nya. diganti foto owa juga bisa klo mau narsis... kwkwwk
BalasHapus