Minggu, 13 November 2011

Membuat blog memiliki emotion

Duar.... udah lama gw gak ngeblog, gara - gara Penulisan Ilmiah jadi fokus ke PHP. Pas gw liat pengunjung perhari rame juga nih blog... T_T ga tega jadinya ngeliat blog terbengkalai ..kawkwkwkk. Nah saat itulah keinginan buat ngedit blog muncul dengan merubah tampilan blog. pada akhirnya kepikiran buat NGINSERT / MASUKI EMOTION buat KOMENTAR. sebenernya emotionya bisa kita costume sesuai keinginan tapi disini karena gw anak Kaskus makanya ane make emotion kaskus :cendol....seaching2 akhirnya bisa jg..soo... gw akan share yang tadi udah gw pelajari:


1. Tata Letak --->> Edit HTML / Template ----> Edit HTML

2. Centang "Expand Widget Template"

3. Lalu letakkan script berwana merah dibawah sebelum kode </body>


//<![CDATA[
a = document.getElementsByTagName('LABEL');
if(a) {
for(i=0; i < a.length; i++) {
_str = b.item(i).innerHTML.replace(/:a:/gi, "<img src='http://img51.imageshack.us/img51/7007/emokaskusalaysmall.gif' alt='' class='smiley'/>");
_str = _str.replace(/:b:/gi, "<img src='http://i306.photobucket.com/albums/nn252/cebong_ipit/templateanna/boy-emoticon-005.gif'' class='smiley'/>");
_str = _str.replace(/:c:/gi, "<img src='http://i306.photobucket.com/albums/nn252/cebong_ipit/templateanna/boy-emoticon-009.gif' alt='' class='smiley'/>");
_str = _str.replace(/:d:/gi, "<img src='http://i306.photobucket.com/albums/nn252/cebong_ipit/templateanna/boy-emoticon-013.gif' alt='' class='smiley'/>");
_str = _str.replace(/:e:/gi, "<img src='http://i306.photobucket.com/albums/nn252/cebong_ipit/templateanna/boy-emoticon-014.gif' alt='' class='smiley'/>");
_str = _str.replace(/:f:/gi, "<img src='http://i306.photobucket.com/albums/nn252/cebong_ipit/templateanna/boy-emoticon-020.gif' alt='' class='smiley'/>");
_str = _str.replace(/:g:/gi, "<img src='http://i306.photobucket.com/albums/nn252/cebong_ipit/templateanna/boy-emoticon-018.gif' alt='' class='smiley'/>");
_str = _str.replace(/:h:/gi, "<img src='http://i306.photobucket.com/albums/nn252/cebong_ipit/templateanna/emo-girl-001.gif' alt='' class='smiley'/>");
_str = _str.replace(/:i:/gi, "<img src='http://i306.photobucket.com/albums/nn252/cebong_ipit/templateanna/emo-girl-002.gif' alt='' class='smiley'/>");
_str = _str.replace(/:j:/gi, "<img src='http://i306.photobucket.com/albums/nn252/cebong_ipit/templateanna/emo-girl-005.gif' alt='' class='smiley'/>");
_str = _str.replace(/:k:/gi, "<img src='http://i306.photobucket.com/albums/nn252/cebong_ipit/templateanna/emo-girl-007.gif' alt='' class='smiley'/>");
_str = _str.replace(/:l:/gi, "<img src='http://i306.photobucket.com/albums/nn252/cebong_ipit/templateanna/emo-girl-009.gif' alt='' class='smiley'/>");
_str = _str.replace(/:m:/gi, "<img src='http://i306.photobucket.com/albums/nn252/cebong_ipit/templateanna/emo-girl-008.gif' alt='' class='smiley'/>");
_str = _str.replace(/:n:/gi, "<img src='http://i306.photobucket.com/albums/nn252/cebong_ipit/templateanna/emo-girl-012.gif' alt='' class='smiley'/>")


a.item(i).innerHTML = _str;
} }
a = document.getElementById('comments');
if(a) {
b = a.getElementsByTagName("DD");
for(i=0; i < b.length; i++) {
if (b.item(i).getAttribute('CLASS') == 'comment-body') {
_str = b.item(i).innerHTML.replace(/:nangis/gi, "<img src='http://i50.tinypic.com/2n9032t.jpg' alt='' class='smiley'/>");
_str = _str.replace(/:gotkp/gi, "<img src='http://img690.imageshack.us/img690/4295/emokaskusmenujutkpsmall.gif' alt='' class='smiley'/>");
_str = _str.replace(/:wow/gi, "<img src='http://img27.imageshack.us/img27/5623/emokaskusrayusmall.gif' alt='' class='smiley'/>");
_str = _str.replace(/:pertamax/gi, "<img src='http://img256.imageshack.us/img256/7218/emokaskus1stsmall.gif' alt='' class='smiley'/>");
_str = _str.replace(/:malu/gi, "<img src='http://img17.imageshack.us/img17/8236/malu2smallu.gif' alt='' class='smiley'/>");
_str = _str.replace(/:newyear/gi, "<img src='http://img682.imageshack.us/img682/2443/newyearsmall.gif' alt='' class='smiley'/>")
_str = _str.replace(/:cekpm/gi, "<img src='http://static.kaskus.us/images/smilies/cekpms.gif' alt='' class='smiley'/>")
_str = _str.replace(/:kiss/gi, "<img src='http://static.kaskus.us/images/smilies/cewek.gif' alt='' class='smiley'/>")
_str = _str.replace(/:rate5/gi, "<img src='http://static.kaskus.us/images/smilies/rate5.gif' alt='' class='smiley'/>")
_str = _str.replace(/:bingung/gi, "<img src='http://static.kaskus.us/images/smilies/bolakbalik.gif' alt='' class='smiley'/>")
_str = _str.replace(/:keren/gi, "<img src='http://static.kaskus.us/images/smilies/cool2.gif' alt='' class='smiley'/>")
_str = _str.replace(/:matabelo/gi, "<img src='http://static.kaskus.us/images/smilies/matabelo1.gif' alt='' class='smiley'/>")
_str = _str.replace(/:beer/gi, "<img src='http://static.kaskus.us/images/smilies/sumbangan/smiley_beer.gif' alt='' class='smiley'/>")
_str = _str.replace(/:cendol/gi, "<img src='http://static.kaskus.us/images/smilies/toastcendol.gif' alt='' class='smiley'/>")
b.item(i).innerHTML = _str;
}} }
a = document.getElementById('comments');
if(a) {
c = a.getElementsByTagName("DD");
for(i=0; i < c.length; i++) {
if (c.item(i).getAttribute('CLASS') == 'owner-Body') {
_str = _str.replace(/:gotkp/gi, "<img src='http://img690.imageshack.us/img690/4295/emokaskusmenujutkpsmall.gif' alt='' class='smiley'/>");
_str = _str.replace(/:wow/gi, "<img src='http://img27.imageshack.us/img27/5623/emokaskusrayusmall.gif' alt='' class='smiley'/>");
_str = _str.replace(/:pertamax/gi, "<img src='http://img256.imageshack.us/img256/7218/emokaskus1stsmall.gif' alt='' class='smiley'/>");
_str = _str.replace(/:malu/gi, "<img src='http://img17.imageshack.us/img17/8236/malu2smallu.gif' alt='' class='smiley'/>");
_str = _str.replace(/:newyear/gi, "<img src='http://img682.imageshack.us/img682/2443/newyearsmall.gif' alt='' class='smiley'/>")
_str = _str.replace(/:cekpm/gi, "<img src='http://static.kaskus.us/images/smilies/cekpms.gif' alt='' class='smiley'/>")
_str = _str.replace(/:kiss/gi, "<img src='http://static.kaskus.us/images/smilies/cewek.gif' alt='' class='smiley'/>")
_str = _str.replace(/:rate5/gi, "<img src='http://static.kaskus.us/images/smilies/rate5.gif' alt='' class='smiley'/>")
_str = _str.replace(/:bingung/gi, "<img src='http://static.kaskus.us/images/smilies/bolakbalik.gif' alt='' class='smiley'/>")
_str = _str.replace(/:keren/gi, "<img src='http://static.kaskus.us/images/smilies/cool2.gif' alt='' class='smiley'/>")
_str = _str.replace(/:matabelo/gi, "<img src='http://static.kaskus.us/images/smilies/matabelo1.gif' alt='' class='smiley'/>")
_str = _str.replace(/:beer/gi, "<img src='http://static.kaskus.us/images/smilies/sumbangan/smiley_beer.gif' alt='' class='smiley'/>")
_str = _str.replace(/:cendol/gi, "<img src='http://static.kaskus.us/images/smilies/toastcendol.gif' alt='' class='smiley'/>")
c.item(i).innerHTML = _str;
}
}
}
//]]>
</script>


4. Lalu Cari kode ini <b:if cond='data:post.embedCommentForm'>
copy paste kode berwana hijau dibawah ini. lalu copy dibawah code
<b:if cond='data:post.embedCommentForm'>

<div style='-moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; width: 200; text-align: center; border: 0px solid #90be35; padding: 5px; background: #ffffff; height:350'>

        <b>
        <img border='0' height='30' src='http://img690.imageshack.us/img690/4295/emokaskusmenujutkpsmall.gif' width='30'/> :gotkp|
        <img border='0' height='30' src='http://img27.imageshack.us/img27/5623/emokaskusrayusmall.gif' width='30'/> :wow|
        <img border='0' height='30' src='http://img256.imageshack.us/img256/7218/emokaskus1stsmall.gif' width='30'/> :pertamax|
        <img border='0' height='30' src='http://img17.imageshack.us/img17/8236/malu2smallu.gif' width='30'/> :malu|
 <img border='0' height='30' src='http://static.kaskus.us/images/smilies/cekpms.gif' width='30'/> :cekpm |
 <img border='0' height='30' src='http://static.kaskus.us/images/smilies/cewek.gif' width='30'/> :kiss | <p/>
 <img border='0' height='30' src='http://static.kaskus.us/images/smilies/rate5.gif' width='30'/> :rate5 |
 <img border='0' height='30' src='http://static.kaskus.us/images/smilies/bolakbalik.gif' width='30'/> :bingung |
 <img border='0' height='30' src='http://static.kaskus.us/images/smilies/cool2.gif' width='30'/> :keren |
 <img border='0' height='30' src='http://static.kaskus.us/images/smilies/matabelo1.gif' width='30'/> :matabelo |
 <img border='0' height='30' src='http://static.kaskus.us/images/smilies/sumbangan/smiley_beer.gif' width='30'/> :beer |
 <img border='0' height='30' src='http://static.kaskus.us/images/smilies/toastcendol.gif' width='30'/> :cendol |
        </b>
        </div>

2 komentar:

Jangan Lupa Komentarnya Ya....