Kalau ingin memberi nomor pada komentar maka blog akan cantik dan akan banyak pengunjungnya. Bila ini terjadi, trafik blog akan banyak orang yang berkunjung sehingga ramai lalulintas blog anda.
Berikut caranya :
1. Masuk Dasbor Blog
2. ke Template
3. Edit HTML
4. Cari Kode " <b:loop values='data:post.comments' var='comment'> "
5. Masukan code ini di atas nomor kode nomor 4 :
<script type='text/javascript'>var CommentsCounter=0;</script>
6. Cari kode " <data:commentPostedByMsg/> " masukan code ini di bawahny :
<span class='comm-num'>
<a expr:href='data:comment.url' title='Comment Link'>
<script type='text/javascript'>
CommentsCounter=CommentsCounter 1;
document.write(CommentsCounter)
</script>
</a>
</span>
7. Cari kode " </head> "<a expr:href='data:comment.url' title='Comment Link'>
<script type='text/javascript'>
CommentsCounter=CommentsCounter 1;
document.write(CommentsCounter)
</script>
</a>
</span>
8. masukan kode ini di atas </head> :
<style type="text/css">
.comm-num a:link, .comm-num a:visited {
color: white !important;
text-decoration: none !important;
background: url(http://i50.tinypic.com/egx3t3.jpg) no-repeat;
width: 50px;
height: 48px;
float: right;
display: block;
margin-right: 5px;
margin-top: -10px; /*comments-counter position*/
text-align: center;
font-family: 'Century Gothic','Lucida Grande',Arial,Helvetica,Sans-Serif;
font-size: 15px;
font-weight: normal;
}
.comm-num a:hover, .comm-num a:active {
color: gray !important;
text-decoration: none !important;
}
</style>
.comm-num a:link, .comm-num a:visited {
color: white !important;
text-decoration: none !important;
background: url(http://i50.tinypic.com/egx3t3.jpg) no-repeat;
width: 50px;
height: 48px;
float: right;
display: block;
margin-right: 5px;
margin-top: -10px; /*comments-counter position*/
text-align: center;
font-family: 'Century Gothic','Lucida Grande',Arial,Helvetica,Sans-Serif;
font-size: 15px;
font-weight: normal;
}
.comm-num a:hover, .comm-num a:active {
color: gray !important;
text-decoration: none !important;
}
</style>
Terahir Save dan Lihat Hasilnya :D
0 komentar:
Post a Comment
Tolong Komentarnya Sob...:D