Pada postingan kali ini akan membahas bagaimana cara memasang emoticon pada komentar di blog. Tutorial ini saya dapatkan dari blog tetangga dan saya coba sendiri ternyata berhasil.


Bagi sobat yang tertarik untuk memasang emoticon di blogn sobat, simak saja tutorialnya dibawah ini.

Cara memasang emoticon pada komentar blog :

1. Login ke akun blogger sobat.
2. Pada Dashboard pilih Template » Edit HTML
3. Cari kode </body> atau Ctrl + F pada keyboard kemudian ketikkan </body> teka enter.
4. Copy-Paste code dibawah dan letakkan tepat di atas kode </body>

<b:if cond='data:blog.pageType == &quot;item&quot;'>  
<script type='text/javascript'>
//<![CDATA[
var emoRange = "#comments p, div.emoWrap",
    putEmoAbove = "iframe#comment-editor",
    emoMessage = "Untuk menyisipkan Emoticon Sobat harus menambahkan setidaknya satu spasi sebelum kode.";

// Emoticon bar before comment-form
$(function() {
    $(putEmoAbove)
        .before('<div style="text-align:center" class="emoWrap"> :) :)) ;(( :-) =)) ;( ;-( :d :-d @-) :p :o :&gt;) (o) [-( :-? (p) :-s (m) 8-) :-t :-b  b-( :-# =p~ $-) (b) (f) x-) (k) (h) (c) cheer <br/><b>Klik untuk melihat kode!</b><br/>Untuk menyisipkan Emoticon Sobat harus menambahkan setidaknya satu spasi sebelum kode.</div>');
    var emo = function(emo, imgRep, emoKey) {
        $(emoRange)
            .each(function() {
            $(this)
                .html($(this)
                .html()
                .replace(/<br>:/g, "<br> :")
                .replace(/<br>;/g, "<br> ;")
                .replace(/<br>=/g, "<br> =")
                .replace(/<br>\^/g, "<br> ^")
                .replace(emo, " <img style='max-height:24px' src='" + imgRep + "' class='emo delayLoad' alt='" + emoKey + "' />"));
        });
    };
    emo(/\s:\)\)+/g, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhecRtBATIqt0R5BFM3ixk1-9Ha1SXOSI0FHRVR7AuZnQi4xha2p4Pz8mN6IvaBzhlfU6jPqmO1hJnXEn6hhtLyDN3hCWI2FQ4Cg82B8ru3rhevkPF2SLf6kSl4tU58x73tw9uwnn_LLp8/s36/03.gif", ":))");
    emo(/\s;\(\(+/g, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeF5tmRQzhO5G42MAGjQGFkpMf8O1aCbnDtwIPyRyxrUrukEH96UugyRWwOqu7yZzftVjlAEg7otYbwsyhtJgoynu-YuBTNTZte65W0aR6UcUbYZhiZpxhoTUUYQFapCWxgTK6eIu6w-k/s47/06.gif", ";((");
    emo(/\s:\)+/g, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigvlXnej5RoosYe-sAaZbgXBtxldGp729h8fxQnxnReT031yUACJW8OSgM9KHE_Syljd-btJZGzoI_NjXAH2PxAXzgamy_UVIaq7DvnuE8KTyiI7cn9ZDaZ0qH7miCqsCog-uJPQXiZAo/s36/01.gif", ":)");
    emo(/\s:-\)+/g, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDM-v_F4dfkaygzyjwCaBip5ZdGqe8pOgJCd4Y9BrZ1_rOQ_Buf9os631zoSchuwySCrJKZu2FgJkEklgnqKuA0jo_SFotHNwjxsArg7PojYnw8zBwQ5pL7zGpfTdzSmYpYWGxN7-0Abs/s36/02.gif", ":-)");
    emo(/\s=\)\)+/g, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifLB2c9sUP9tCTy1xR1D9ggMOT_Z7n8JCzgRniywlHS_7AaCfZJWpXq5pzKhH5IpdOfppzDvPU-Mwj5iNfWM8A6nQvj8C6f7djcqdVMGXcT6fApvZuj1QojDKSBBY-oX8cRySisHR3v5s/s36/03a.gif", "=))");
    emo(/\s;\(+/g, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7UEWuqXdAiR1lMV2wIHQW8Pz073Q7G1pzO__2RSbSU7Do7K2I7-mrNWCWL3jjhMzhFLCbw1VudnCrvkEuBAsFrS-M0L5KKRGWyTxzLZwSmLDfPexq-kH4RsYdIPXnCEeAAYBJX1hmwRM/s36/04.gif", ";(");
    emo(/\s;-\(+/g, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiiFsT90OIg1jcFZH_K5DQ7VSruclp5c0Q11RSm-xEOVK_dylirus7lks8av6-4fopxL6u3MO3tSm-UszB0VYjxVn7i4HrOaDSPmhGhhmVXKEAUX-NF7RGJrxSEUBx0BTejZDHwHEKwLYk/s36/05.gif", ";-(");
    emo(/\s:d/ig, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbdIFJLpEpXp7YiB3z7m5LcMlbSUNqmuiNLEDw5xjJhKwfysqY40Vrt3Gi3VUESOYzGlwNfR6YBhhIGlIBjy5pgCbxMScOrdfmRMvvXCzYim5H4bEWxfYl0D4hC8VA-1rcNpWCpJO_r1c/s36/7.gif", ":d");
    emo(/\s:-d/ig, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXKohQhcxjh05iapT8XfKaqxI10d410vr2DW3vicZdp7kWu2smDsnTnE-odZlf9Y73cvyO5mhcQqwcuciDwV2HaTt_HGrsbssAZHfH9b7Cj0fx-C_X4VbAbN-eLMwOn8Ja_w8iPJsbIE4/s36/8.gif", ":-d");
    emo(/\s@-\)+/g, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTwnxqDVQd0DP6jAvIX4jXYQ3AZ5b2ZOhkb3woIpqY0hVcIeDe6AvA_gmbRv9ee-CxGypdaXGq9TxZ6qP-9TBcRkzseHz63xA1h0tH50JWOXcC8fK3RsD6y_vU0s7GDkM2EdUsEOL_IDY/s36/09.gif", "@-)");
    emo(/\s:p/ig, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYfceDLeYGaBXcRuLoxiVgH889n0gWJCfoAQ3-TBZ2nCdzP7p8OLyzYSctbzR9_8FzRqrJCqUUharVcIysHkhXGlKS-IXukj9khM67hFy4t9JchSzUAFnYIXx3d8QZTfEhiSwPi9Bg7kI/s36/10.gif", ":p");
    emo(/\s:o/ig, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1awkvPV6QNfDZhxdwnRWsR6P8IWtj1f1JnLAQRnedJEUJQT0yX2R1qian6yBYpc5EMuwygYMs-i3O3yZ5eWFVcFgFtUDEyJqpNai0ZAwF-NIXXM1nJ4DyQ4tWIEEPlsNonH5C7f-I6S4/s36/11.gif", ":o");
    emo(/\s:&gt;\)+/g, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiL6DlSme2sXRK1bDqRMZ08q63nCEKTs83FsK-PH8aXw-k87yNO0Zu7UDknmYtqXpFnJL32T30v0ZNk1fJq7E1rzh54frydN7fi8VTU7uK2W-QEODocHWumEcmHxbgIl6CTRk_6d62OUUI/s36/12.gif", ":&gt;)");
    emo(/\s\(o\)+/ig, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgS4IR3It0KP0uLEaLU7d4x6ybG6n24kZpvI_PL8zOLrM2ZjqYS37FLbE_9havKIjXNmVMtN5hD_I7xtD61S7aP42KwG8bshAXVp5YYsF3MaflW9Rt4UhRtVqqWmrp_K3i8byWVIIP10kg/s36/13.gif", "(o)");
    emo(/\s\[-\(+/g, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBC1eAIvMwyfxSUT2NTbTjzG1EAIeZGXJqhULQXHRcP4YAVDrQpC7qE94Cs9-OIbY2v_mU3ySl4KZE7ReoBQZdqvORadknRRUhq46or4NSTb7uHHw4v-mnHZwfP4i6hamr09ET_3mkFs4/s36/14.gif", "[-(");
    emo(/\s:-\?/g, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_PRCQoWvMoFXAN9nYLlBsZG3aH1u2-MggS4FM2-EhpBP9bpOue2BHBlbDU7VOuw6miJaNfxVSrD_MvNnTbbECPSFg7oi7m_vUI7N-8EuHHkIZclEOVaXEVMLCK1ATgqH7JJIpQXob-Fg/s36/15.gif", ":-?");
    emo(/\s\(p\)+/ig, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgl98xh2OL-kchnVgK_Waai6mwvZxrqyqVXVGpRPgJlFpnA9qaMy2r3yjdox-wLii-xqSruL0RXt4iEBR5B8jESdP9vhrxcT7AhNIBU-mmL8hXc-VsYgoVasVEI5oVzBUnKO25deVOVk5E/s36/16.gif", "(p)");
    emo(/\s:-s/ig, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjV-2rUHqyT7Oq13DP1nggwAfcR_gbetxEd8BGgTCoBYZL226UKMDRqlcJOybWHaDVnh_d_Pbf6icRYFzmkatzCn7zKGkPX9qJTRo0tB1RudHmLUwgbpVsXfMvc9D7qjvJ0acv5Sxci1a4/s36/17.gif", ":-s");
    emo(/\s\(m\)+/ig, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRoTa5nwxVsiQEOMgKtHTisg2JP0MEcpENabAvjV-3qe6lvIzS6uWweNB_jzT3R_0Y1IjXsQX5Q73bvFsuFByYHmADHjoOuPDPoMsHbxpSrnSJ9fKgOkwqLdIVKW4BDggrVYgxoHki6Os/s36/18.gif", "(m)");
    emo(/\s8-\)+/ig, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnEbwWw1gI_tXoAfQC7oS5e4XILlSv6VqCQUlRpkB8ldUZDC1CLSlHBMGyc4uO2Jg15KiAqKiVYSJr7fBB4De5IaZhddNBiERmHJaH-h-KdKKO4UNnM3I5Aux9ZPcM1S4JEFxjYEiaKWc/s36/19.gif", "8-)");
    emo(/\s:-t/ig, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBy5gzdZ_kplWCdEC4A0OptIKKfvwf5wUt5xlPh59Y1qwLv3Bx_uD4Fbm4zdbf2pgOvi6bbCTJkhoiuAforA2Yq2esPEuzpb2j7wN9CBPap6f3ycbwKK-79zdNHhKoX9puUQwS2syHyW4/s36/20.gif", ":-t");
    emo(/\s:-b/ig, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfRJpX3bWMr_qdVDsoi1FV1lRhsdk7Su_1ngw6HLrPj6u9r1QEPTQFl2CVJ5uTx0ZYVUURgv4IE1-TMNDm4ybDphjlxL7OJXMCWKfarLZwjTB16I9TedwGAH3QKK7XaONJcEK2H6-Zqfk/s36/21.gif", ":-b");
    emo(/\sb-\(+/ig, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhq9M4PdSirma2W3rR4CIBFBOugDLPSZzrT-E7wpfvr0_bCSNqU4YCd2O5lQ4VNJZ7aAIlD-sAJ_vQyrlvh0OAMnsPwlq6s-OB3DTxke_yz-1iOaEX5t8o7YYUnbO_40qb8-k11VzDwNiA/s35/22.gif", "b-(");
    emo(/\s:-#/ig, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSyH3YfUy_7IZtNQL3fZ8DSz66MuYzTm2GHmCboHBD-ZG29pNmPIPgP1NamOJn1gjzKifV5lWT4ML3j_cR9ywxwBbR1r4KRXOWqQbSCnz6sqpnXuhDBCcZbcYrFVUU0sqdFa0zjMX4g7E/s36/23.gif", ":-#");
    emo(/\s=p~/ig, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj65_57GRq1QvuUP3eRfMnVz4yXe6cnbjo8sAZ2lr2oj0PapJqSvTrEGkOWk-920l-p2x_iXX5PnTI-BdfFWtJpXhdbuYPaaxB1PZ3BDNqX04yHBhUOAw5l_spVF03J30QGdxmCjSMiu9c/s36/24.gif", "=p~");
    emo(/\s\$-\)+/ig, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyaWhXj0ayAZx_ixB7bhjq4EdmvpySEFe1S0aC4vc2jbOppPHn1hBWMNQ0mU66BLlqz3RKVm-KNa-xRBRxKzbZ-2c5O5g8BSX8pHhnIdwCwlM6eErKcd3pq7wdh9JkuDLQUUh57496fSw/s36/25.gif", "$-)");
    emo(/\s\(b\)+/ig, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1Lt81oArqyQi7UGCV7MW5u4TXzh7V7KXHFoSr6x6F7BK31UQANwBo9g0VycHv9IBGf1AT1s4y2x7OBzGHYT94Xab8n-rY8S5UC3cTajdJpBNwFZsr3-0UfSpy_ZytBeSDVMbtbqIMLLQ/s36/26.gif", "(b)");
    emo(/\s\(f\)+/ig, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdKx0oPpWu0FyOOQVIqr83R2TOaVvJQWwNjXX7DGbjYNzKWwp2QTUuxDnH1_1PSaBr4TKG32mXlOIHFMYZYZFvTnsaAyvSkrZAhv978iOB2qhrkmtS55GqEEDD4kXOKubTElFLEpUyXuU/s36/27.gif'", "(f)");
    emo(/\sx-\)+/ig, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2Zg0dfHobXAmIYHr6v6NaWBn8bzWunOJnpqj4BU8ukV_UBVNWOO0Gq6cV3B099MabZ1FffaKcRw2lq8SWsQW03fbejzcQbviycVzeMfoDMZ06-b6wh-GJJzyuAM2v7O5AdD8GUFHcocI/s36/28.gif", "x-)");
    emo(/\s\(k\)+/ig, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZyDswCKVqN04BziRCyXUHnY1cZNnuM7838UXKOcwsOM1DRONnnZqEktJNqbjUJogxlaxoHALdBOng9YSGRh5zjOOAnfVFwvnQ9-HEDhj4abpJEk0PWcaVrredsRVyFBsB0mnAhiEAd5k/s36/29.gif", "(k)");
    emo(/\s\(h\)+/ig, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrnjhcvHVOBJ1kQ8dSCoVQeIKtznLo2GfA8XJS_IkAjC4Tz6cXRFYeT_DpV2FWCxgW5moDYHGlBtSO2pWtmze_6QCnyUgSdGpNMSOWoDG2JpuOAhLCvHU2PJEw8RNB6TizK9DhQ2TgWw4/s36/30.gif", "(h)");
    emo(/\s\(c\)+/ig, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfNFYq2vT-0Lz0Uv2paOPxf_1o_lJ_4V__OKVq4mz6CFFd_DyyfE6ed_UZHrOzxFXCiFVl4w8Bst5qBI3ChMc9oDcaUWsrA9Cgj5kCLtMjglBX5fXaKWNCNckdpcoUu570dZQV1PcSTuA/s36/31.gif", "(c)");
    emo(/\scheer/ig, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEheP57dB5S7eHull1zGyZ_MeGYHiGiZayF9Opbh4862A9BenDM-iyKlpJcC3q5-cTztrUy1S3g3ah8g7f1ac7oXK5HDD-gdpuxh24uLZiIAwc4O1GOi7rZxGk0NSh1hAk3hMoClvnG_Nxk/s36/32.gif", "cheer");
 
// Show alert one times!
    $('div.emoWrap')
        .one("click", function() {
        if (emoMessage) {
            alert(emoMessage);
        }
    });
    // Click to show the code!
       $('.emo')
        .css('cursor', 'pointer')
        .live("click", function(e) {
        $('.emoKey')
            .remove();
        $(this)
            .after('<input class="emoKey" type="text" size="' + this.alt.length + '" value=" ' + this.alt + '" />');
$('.emoKey')
            .trigger("select");
e.stopPropagation();
    });
    $('.emoKey')
        .live("click", function() {
        $(this)
            .focus()
            .select();
    });

});
//]]>
</script>
</b:if>

4. Save template untuk menyimpan pengeditan yang soba lakukan.
5. Done ... Coba lihat dibagian komentar sobat....

Somoga bermanfaat.

0 comments:

Post a Comment

 
Top