Search This Blog

Cara Memasang Kode Anti Komentar Spam di Blog

Cara Memasang Kode Anti Komentar Spam di Blog

loading...
loading...
Setelah mencoba beberapa kode, akhirnya inilah kode anti spam comment yang berfungsi di blog ini. Simpan di atas kode </body>

<script type='text/javascript'>
//<![CDATA[
$(function(){$('#comments p').find('a').contents().unwrap();});
//]]>
</script>

Tapi.... itu link hidup di komentar cuma mati doang! Teks-nya tetap muncul! Maka..... ini dia cara ampuhnya:

1. Simpan kode berikut ini di atas kode ]]</b:skin> atau </style> :

#comments p a {display:none;}

2. Simpan kode berikut ini di atas kode </head> :

<script type='text/javascript'>
jQuery(document).ready(function(){
 jQuery("#comments p").find("a").replaceWith("<mark>Spam Detected!</mark> Link aktif otomatis terhapus!!!");
});
</script>

3. Pastikan di template Anda ada koe jQuery seperti ini:

<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
<script src="http://code.jquery.com/jquery-migrate-1.2.1.min.js"></script>

Jika belum ada, pasang kode jQuery terbaru itu di atas kode </head>

4. Save template!

Demikian Cara Memasang Kode Anti Komentar Spam di Blog berdasarkan pengalaman terkini. 

loading...


No comments:

Contact Us

Name

Email *

Message *

loading...
>
Back To Top
close

Get paid to share your links!