HOME

translate

Kamis, 29 Desember 2011

Cara Membuat Daftar Isi Otomatis Berdasarkan Komentar


3546254_blogonol_posttitleal.jpg

cara pembuatannya, ikuti langkah berikut.

Log in ke blog anda
Klik Rancangan
Klik Tambah Gadget
Pilih HTML/ JavaScript 
Masukkan kode berikut ke dalamnya
<div style="width: 100%; height: 300px; overflow: auto;">
<!-- Alphabetical/chronological Post Title Listing with comment count Start -->
<script type="text/javascript">
function getYpipeTL(feed) {
document.write('<ul style="font-weight:bold">');
var i;
for (i = 0; i < feed.count ; i++)
{
var href = "'" + feed.value.items[i].link + "'";
var pTitle = feed.value.items[i].title;
var pComment = " \(" + feed.value.items[i].commentcount + " comments\)";
var pList = "<li>" + "<a href="+ href + '" target="_blank">' + pTitle;
document.write(pList);
document.write(pComment); //to remove comment count delete this line
document.write('</a></li>');
}
document.write('</ul>');
}
</script>
<script src="http://pipes.yahoo.com/pipes/pipe.run?
YourBlogUrl=http://www.ALAMAT BLOG ANDA DI SINI.blogspot.com
&Order=alphabet
&_id=401e43055731c1a29f1e1d3eb5e8e13f
&_callback=getYpipeTL
&_render=json"
type="text/javascript"></script>
<span style="font-size: 80%; float:right;">Get this <a href="http://blogonol.blogspot.com/2011/12/cara-membuat-daftar-isi-otomatis.html" target="_blank">widget</a></span>
<!-- Alphabetical Post Title Listing End -->
</div>

Ganti tulisan merah sesuai petunjuk
Selanjutnya klik Simpan dan lihat hasilnya
Selamat mencoba dan sukses selalu

Tidak ada komentar:

Posting Komentar

Related Posts Plugin for WordPress, Blogger...