Thứ Ba, 23 tháng 7, 2013

Chèn bộ mặt cười (Emoticons) dạng input cho comment của blogspot style 2

Emoticons input for comment of blogger blogspot - Chèn bộ mặt cười vào khung comments blogger
Hôm nay namkna hướng dẫn các bạn cách tạo bôm mặt cười (Emoticons) cho phàn comment của blogger. Với bản này khi bạn bấm vào một mặt cười sẽ có một khung hiện ký tự chèn vào blog ra và bạn chỉ càn copy dán vào là xong.
Trong tiện ích này mình kết hợp cả popup hướng dẫn mọi người sử dụng tiện ích khi truy cập blog của bạn.

Bấm vào để xem demo: View Demo

Ảnh minh họa:
Chèn bộ mặt cười (Emoticons) dạng input cho comment của blogspot style 2

Làm thế nào để cài đặt Emoticons cho blogger

1- Đăng nhập (login) vào Blog
2- Vào Mẫu (Template)
3- Chọn Chỉnh sử HTML (Edit HTML) => Tiếp tục (Proceed) => Chọn  Mở rộng tiện ích mẫu  Expand Template Widgets)
4- Chèn code sau trước thẻ </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 = "Click vào biểu tượng sau đó copy xuống khung comment";
//]]>
</script>
<script type='text/javascript'>
//<![CDATA[
// 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 (sm) (fu) (ku) (bg) (lol)<br/><b><a href="javascript:openup_parseHTML()" rel="nofollow" title="Mã hóa code trước khi đưa vào bình luận"><span class="text_style">Mã hóa code đưa vào comments</span></a></b></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/AVvXsEjEwY8uboXo9FWLs1nh6lGtrpGUWCwOfGwpLFeT1rNcjCBE4JFlWTmhXJf_xcMfuv4pVn4Sgd2qKDXjr6Ha389Thp3pJWy2ASwKEY8mtx9hR6v-JwxW6CJksSO0a8-t6HRegK9sQzO3zoA/s1600/38-namkna-blogspot-com.gif", ":))");
emo(/\s;\(\(+/g, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoLMQjMW56xP342xu5JZyIcNwZ6IEqJloV6dgcCBkn_lPi0YYLu5CeeyoIlo2lOM6lOYedVrYx8TUuL5IWHYTf7H81R_F27uwJm0jBNbc2XTJ0xyqKCl-8KkJYOx8j0GBAcC09BmrvtkM/s1600/39-namkna-blogspot-com.gif", ";((");
emo(/\s:\)+/g, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgio9-ZNGS9VLvm-YfSzoS1COH2yJQW2GIYD49FA-yo-G2J8waNst71f-VTtWl2u3d8iKz4v01BMKj4d7n3fitcbknT-KuFfHB1Myf67wnF7K3iH4zx9-gpt7e7G2QiiUU2u32SsWGoi2o/s1600/01-namkna.gif", ":)");
emo(/\s:-\)+/g, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwv4GOfhM-erZsXUxIFNjK2VZgMsV6CZwoQYLcZPjh8Qoc2k15vwjGvZ6yGliNGe_xFHUnxpQ4jekAbfxXiTf0IXh_zJNwRCXDpStCbH7M7PlmTg0c7KbCAbkVy3_Zo68u0MYpfqAvdo8/s1600/02-namkna.gif", ":-)");
emo(/\s=\)\)+/g, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2dHZdpTgTpzGZBVpPJ9W0Pmq3AQ5pZV48NqxgJ7Dzu9yCHaAzRPv29Yc-K2W0W6-qsKGUzYV-SsET-yW5MdUU6XmQD2GUW3ygcdil6LbESl7JFoiwjwxaBxUt0awJFgdHxKe8O_WVJ1E/s1600/03-namkna1.gif", "=))");
emo(/\s;\(+/g, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTaBg7yVa9crsPJxQiB3N3AlI7zpFjMjOkunpYUqtbgiNZD8j-tK_TOxVXVZ7KRMztXKliy0sj9x5049p6iBHCaU93Ug-oidpFJ6KZbYV0xtYSmnbRCbp2Ph2JL8JKXfigOW86x34owOk/s1600/04-namkna.gif", ";(");
emo(/\s;-\(+/g, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIHV_HzdiVf9-K1VrGvWeUz6az0E0wjVA7Vw6MwXC394BrJIgcQhcudVTOpdNPgRT2aBF9eWV1bqerrZjjP3owcmuoGfgb-Y_NeO8q2G7kmF0JbYTduPaAEiNBjjmyqFgaJTNnyruXDYE/s1600/05-namkna.gif", ";-(");
emo(/\s:d/ig, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhp1wXIWzUKEMQKHsJXc9aodkDH96h5DRCu9CeITlEZwqnrZFuETjILjU3ycqD8GHn1b_BASsQW-gRBt3CApC43IJoDwAa80xkv5Vpkm7Z9xAn7JaRdXjDu2aue5xSZoJSmIBvnPHvmi6Q/s1600/07-namkna.gif", ":d");
emo(/\s:-d/ig, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhs8KGobn0Vwv-4sSmyajR-m638ClYzum_MV1fxrFmnAlwJ56Y5PsO8zuJSUo7wmN1Qdq3C8GeSOKOqDhle3BgD3uoswYCRxnClNz84i8OBiyVd9Ko7t9krI0q0BY_BdUhRgCjv4puseas/s1600/08-namkna.gif", ":-d");
emo(/\s@-\)+/g, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJXHQNy0VCPKebcI_3uE-RyaDxT0f7zDJoPjPQhVFpjNLLzFUlrQgKTZx4j4wc5JZbwzHU0yBNLd5z7cMnqhU2GzzNP7AxSntq_oUO3mYmgS90oRUyIUVkeoBUtKOvvmz1uKx_8tcMmcw/s1600/09-namkna-blogspot-com.gif", "@-)");
emo(/\s:p/ig, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgr5EF7ZDhelA1hADLTvhlFKoPH9OqPerH9NoBQdFvFwDRNuO3ImdbS5-EmM2a3mTokMKjgnNSN0b56m5DUSN1DsJHIcGACa56qIn8ppaTR4hQkVwpV1uQgoRTiZSx81Fw4H9bArlG0zC8/s1600/10-namkna-blogspot-com.gif", ":p");
emo(/\s:o/ig, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXCWiMtbVanUw61kK2QunjPX08CrTj4ZQQ1_13FIFXb3xRfwX1HMCzG9e8GF02KwjuZLYJ-Drjjc67Of1kSqlRjKtsgBD8d4x-pyd-4iPZ_VAeEnWfg9gs1vBmSeoLVZpMQHBYTUTRIjA/s1600/11-namkna-blogspot-com.gif", ":o");
emo(/\s:&gt;\)+/g, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyD021BwMPLpGoBqKlUCi2P0v-0nUqG_k4LZOIZM8_5VAVB-P_aYACyVsIuNNbB3z1EMYZaNfK7nQmKygHKkD42W_oPuuPZs2fPK7GyZfsrCFIUT54bRXUEXxfks5iXsDJJ-ZUCTHs138/s1600/12-namkna-blogspot-com.gif", ":&gt;)");
emo(/\s\(o\)+/ig, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjibdkygQHJFceHAjNuMdSPVMWsPJl5kserjzvp42t6_QpaNlbXKuJkw0htWQMW7hpL2e85bCJtq331J3idVq7DTxN81s7_iM1Qf1CLOvoTupfOALwEePxBRuit2lm7IyjYGNDsDmRthzc/s1600/13-namkna-blogspot-com.gif", "(o)");
emo(/\s\[-\(+/g, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVFwoVcNJor1SwKEYwiS11DOcDzBB-ObK68GZ1IuQzyhCEKf_0LYQxt55VDMgcVbxD2NP6oqrFks15PraQ3YW1FJQqeGXexZBMkDCCDJGqCvbUAVgIojoM_RlN9ApAZI9T94oqUjRkbhM/s1600/14-namkna-blogspot-com.gif", "[-(");
emo(/\s:-\?/g, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiG19Q5zOBXU52bAcwrnd4VT_rGzMtKPjis82-dodLMwOE_gTBb_M3jqkLUz9aLtrBTEUqgKt67k6iKWBbKXQeQ-KHcaRlxQvySoZsLadzBJr3JKlYqgxaZDK0CkiFKHkUdWPxB9gEnn0s/s1600/15-namkna-blogspot-com.gif", ":-?");
emo(/\s\(p\)+/ig, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZjKVNGjIP6hWRpRPQi7GP0Z5zEPRyBAAgYyo_teiuZ87dPgX7Lz5Xoo2hcKRz9F785IhHoRxCpsAKJgtHvXcr_XZYT4TvyQvNo-vIPOJcJ7TweHOrpt5FAuK7_TLbjKOyMJ9c2fuvNOo/s1600/16-namkna-blogspot-com.gif", "(p)");
emo(/\s:-s/ig, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOVEaxfjnjU2AX9OF3Rkck5MFH2pOKby1527NDft9RVdBqpqrnkLzwny4xrsia5AQeoF5R2DPdm_IOf6M6kpj6u_sDWqnRP3a1aln_uwtNj3h5T7z6COPDwG0joYdPoPQkc-vN4yvluCA/s1600/17-namkna-blogspot-com.gif", ":-s");
emo(/\s\(m\)+/ig, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOtKiorQfdmuoiILQUK98FZMXyMubnmG-eWW80KTar8PNIf52er5iW6PpAw_G5ogyOr6vaMwCjGbC89pvh4wzpz71nnAuolZhQAYPIdaUbHIObwn7MFE1nCx3KMQ8wKpcBKtuGtRjuiiI/s1600/18-namkna-blogspot-com.gif", "(m)");
emo(/\s8-\)+/ig, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4gZDCficfvWfTEUuFwicCwL7VuoacgvtQYbcw_WIDIdKN5cVLe_T_K9ERodrgArXqjrvuwNEON-AC-Ysam1gvmAj7YKM3UPZUR6KpGkAMwCx63j6j_NlxcZdpLLByq6dDYMM4x1Xm_f0/s1600/19-namkna-blogspot-com.gif", "8-)");
emo(/\s:-t/ig, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJZiUvGS2-NnVZ7xCb8En46irqc813-xuY6r9jsGuND_McXHouyqYxQCP2kHwK7Xqr0WFHfA0-sIBN5suGQr3h6dUN5Ehitut0hHhhv2UNMCs8pEUGe6-d1EG1m-0Rl4mRy5CwjV54SvE/s1600/20-namkna-blogspot-com.gif", ":-t");
emo(/\s:-b/ig, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiD2d5e5trIhwv9XjkyXm6w4T-r9upBBY-J-NpEFmjBtR0Jl82GJ_9k5IU3eCMQEGNrHVACD6Pb5p-D1TE6zQE3JS66JLps7ZWIO9xy57qWoUVFjCfHFsxWB399kmiRjPV2C8EN_-L9R8o/s1600/21-namkna-blogspot-com.gif", ":-b");
emo(/\sb-\(+/ig, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgAXwGaXvc6WS4TGCrNWhpGH-9_ell7LZB6F_G9P25f_1YQZvh02bFHJqBKPoJczqJLxCF7PRoWxQf0CQgSzuNcy9BNaFduY_eNNBJg1_jvtEQwdg0V-KC0q28cWCJ5_mH9cuIM7UY0qjI/s1600/22-namkna-blogspot-com.gif", "b-(");
emo(/\s:-#/ig, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQc9ValYzcZ8uZzNChIEfolkNqyd2Qqgk_g-4w4JOJGyB6PY7EuyXuqvssVzJxkFQII70CQKKpZ90h1Km7CzPHxetOrYcD-NfQq3GC6Av3A0Mecpy2ijsa8VFLGI12CSDKINPOHAVEcfY/s1600/23-namkna-blogspot-com.gif", ":-#");
emo(/\s=p~/ig, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4c93KTkjDGVt1RYDLm7xtHVPIfifjELbn7otC4KCbWLCr951WEGjagZHSOTqC3xhL-f9YnmTR4n3typypWUsSzuBvqNDVGWK21GmL1nh-dR-xH07NVjyqqWoG-RLs6lCoGQfJwEkAtc8/s1600/24-namkna-blogspot-com.gif", "=p~");
emo(/\s\$-\)+/ig, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXLX7WO7qBc7m3GbwGftRYR8goJC1fzayv3whaVrzyo6YXS2X37R_zN1Mj1uY7PUnjkUDXfqUPZIH9KtlYU-ef4vm8kt8Kj1hmPEG8NqbkniUPZE3zjjyHA5n4WhHMVaVQMB69QNxvvlM/s1600/25-namkna-blogspot-com.gif", "$-)");
emo(/\s\(b\)+/ig, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjB_K-QpggRWKNmB25wCVqo8iiXTkaaJAJ3KsdLr0w9kKps7jBX28nfVCCBnfXNN_ODCghhHqsUADL0cjH0ol7POcxqcxGh6YJEtbc3cL-QjGIInd-oZpzwqnBd9qaUzClO14UyjV6ylJY/s1600/26-namkna-blogspot-com.gif", "(b)");
emo(/\s\(f\)+/ig, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQNwbvYs13tPuFPnREDiSDvNSnsqZB4NWgzQUGIeNHlSuHbtyOSKT6Fjk7U3Y4M2Wr-GJYe-xPNAYhfBbCLnPe_NY0n5WAJBIp4H503Ks-O7pAj43b3AEr0E_BPp4P2-hc1tZxby4f1Eg/s1600/27-namkna-blogspot-com.gif'", "(f)");
emo(/\sx-\)+/ig, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdu875z9TS9tGGPaLBmgwK-3D58jP7WYCMIGqPTSx15Ykuikbyiv5x5-3uFOF7WQuGotSrhr2L3veqLKvE6r0ejrFa3SWkorlS8xP4uQCiN5j5eTIlWlh9rhYLWtjh-Prr0GoHf2x3uYk/s1600/28-namkna-blogspot-com.gif", "x-)");
emo(/\s\(k\)+/ig, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2ZIOnFg8-e77a__ADAhlbcAafPhC4BuugCGMtm8i1IF5kMcSPaCJjarIyHm67vyAXy9PFd3cwrcLijXn0f1yglXaV5LrikQ0AXWEQYxxSa8N-hydRUNPpBFWJKozdAUgBd6cdP52nssc/s1600/29-namkna-blogspot-com.gif", "(k)");
emo(/\s\(h\)+/ig, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEheTKHTj9YtdDnmbVDciPalvTvWtGLmCwdmrfY3viR5wKkPtw2zlY2qAzKMbGY8Ez-lpX2Zp0HbphW5vQz_TsgNmSUPPIFO91Ofn0DR1Hmd8hhEHBWnK_lWk6QFkTmcuUzQM5vHst17P4o/s1600/30-namkna-blogspot-com.gif", "(h)");
emo(/\s\(c\)+/ig, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEil7jU53gBjOF1SRo-wQhiO7PzkJggqsgFril1a_6ckT8xW_mBtg0iuanzwcphsgtsWaUU7E9S8CioXJhES0IgUJl4M-x8L6d8u3Mi776FR6sK3G_d6av3fIiKtyUYLxC6pRGPriLnaDbM/s1600/31-namkna-blogspot-com.gif", "(c)");
emo(/\scheer/ig, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7k55NNPSNTth3R7O3dixN_E8Cph6wg4QDynVSCbOX8nK6jxgKEWIVOnPFD7ASFUWs9xhi5hSA79LPejJs_R-bmM0BkKTk5joBvQgsTFTl4eA2gTZGbWnAv9wb-U9r9G7xIUOusEwZn2E/s1600/32-namkna-blogspot-com.gif", "cheer");
emo(/\s\(s\m\)+/ig, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTfCu11l4lqlzbByOugbTsPHHvW71cOno2UAD19hUgKscnMGR2Dt_5_dEDC4kpQeXwL9uEo7fzY9zWKskL5U4yzc6SmpWO678qd_Kf5bjEmDWXVkotSaEXgmU-ZTpYPQEaCY8XyhES19Q/s1600/33-namkna-blogspot-com.gif", "(sm)");
emo(/\s\(f\u\)+/ig, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgysmCtVW_h0ca2GsDrIUUclYHf-cWwa4pogGrU-eiTgIBOZliftFuBk-DLEotULasA_zGwPvu-Xu4SyLY_-uxeAzxJIrn53T7EYUc7KpGfn4uMu3P7kh16RK7F4-bafp26iEGgkTWDj-4/s1600/34-namkna-blogspot-com.gif", "(fu)");
emo(/\s\(k\u\)+/ig, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpTq5Blx5w3s4tpVpHEdnthGuPXg69OE2V99M6Ay88euKOlY_1gcgv_lc3cyZP_7G7D-YPjOGRF2Lltmo-ZEDqyX3k1PjtfR4f9FWdCJTJKe1OU5QRM3EVObHVZx4QKoZyBR0dR49eXf4/s1600/35-namkna-blogspot-com.gif", "(ku)");
emo(/\s\(b\g\)+/ig, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgo8IcNEKI69f6nPbakU-gcfyaBRg5OjrSZo5sDAd-femShqPEw87TjzX4kmA6kaP2GzaNuqkRFjirukZd869pBH2tR25yTGH6YMOnHfHYaEvEXpDmldTrxz8-y4zOAZu0otLUpTG8IDRw/s1600/36-namkna-blogspot-com.gif", "(bg)");
emo(/\s\(l\o\l\)+/ig, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrMjGLh7YFLwMQAYN1Fs53OhLlNwVfCeOtMmhSJ9gDiwLLD3fiOGHHnDhlMM-wYhCmULk71mWbuaKpZuD0tch1Hgx6hfE0ZIzcM-P6Qw-GRdt1MTDJaBbrSwbZBMdrdrbc0PpEQhDyZCI/s1600/37-namkna-blogspot-com.gif", "(lol)");

// 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>
<script type='text/javascript'>
//<![CDATA[
$(document).ready(function() {
$('.separator a').attr({'class':'fancy','data-fancybox-group':'gallery'});
$('.fancy')
.fancybox({padding: 5, openEffect : 'elastic', openSpeed : 400, closeEffect : 'elastic', closeSpeed : 400, closeClick : true, helpers : {overlay : null}});
});
//]]>
</script>
</b:if>
<b:if cond='data:blog.pageType == &quot;static_page&quot;'>
<script type='text/javascript'>
//<![CDATA[
$(document).ready(function() {
$('.separator a').attr({'class':'fancy','data-fancybox-group':'gallery'});
$('.fancy')
.fancybox({padding: 5, openEffect : 'elastic', openSpeed : 400, closeEffect : 'elastic', closeSpeed : 400, closeClick : true, helpers : {overlay : null}});
});
//]]>
</script>
<script type='text/javascript'>
//<![CDATA[
var emoRange = "#comments p, div.emoWrap",
putEmoAbove = "iframe#comment-editor",
emoMessage = "Chọn mặt cười sau đó copy xuống khung comment";
//]]>
</script>
<script type='text/javascript'>
//<![CDATA[
// 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 (sm) (fu) (ku) (bg) (lol) <br/><b><a href="javascript:openup_parseHTML()" rel="nofollow" title="Mã hóa code trước khi đưa vào bình luận"><span class="text_style">Mã hóa code đưa vào comments</span></a></b></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/AVvXsEjEwY8uboXo9FWLs1nh6lGtrpGUWCwOfGwpLFeT1rNcjCBE4JFlWTmhXJf_xcMfuv4pVn4Sgd2qKDXjr6Ha389Thp3pJWy2ASwKEY8mtx9hR6v-JwxW6CJksSO0a8-t6HRegK9sQzO3zoA/s1600/38-namkna-blogspot-com.gif", ":))");
emo(/\s;\(\(+/g, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoLMQjMW56xP342xu5JZyIcNwZ6IEqJloV6dgcCBkn_lPi0YYLu5CeeyoIlo2lOM6lOYedVrYx8TUuL5IWHYTf7H81R_F27uwJm0jBNbc2XTJ0xyqKCl-8KkJYOx8j0GBAcC09BmrvtkM/s1600/39-namkna-blogspot-com.gif", ";((");
emo(/\s:\)+/g, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgio9-ZNGS9VLvm-YfSzoS1COH2yJQW2GIYD49FA-yo-G2J8waNst71f-VTtWl2u3d8iKz4v01BMKj4d7n3fitcbknT-KuFfHB1Myf67wnF7K3iH4zx9-gpt7e7G2QiiUU2u32SsWGoi2o/s1600/01-namkna.gif", ":)");
emo(/\s:-\)+/g, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwv4GOfhM-erZsXUxIFNjK2VZgMsV6CZwoQYLcZPjh8Qoc2k15vwjGvZ6yGliNGe_xFHUnxpQ4jekAbfxXiTf0IXh_zJNwRCXDpStCbH7M7PlmTg0c7KbCAbkVy3_Zo68u0MYpfqAvdo8/s1600/02-namkna.gif", ":-)");
emo(/\s=\)\)+/g, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2dHZdpTgTpzGZBVpPJ9W0Pmq3AQ5pZV48NqxgJ7Dzu9yCHaAzRPv29Yc-K2W0W6-qsKGUzYV-SsET-yW5MdUU6XmQD2GUW3ygcdil6LbESl7JFoiwjwxaBxUt0awJFgdHxKe8O_WVJ1E/s1600/03-namkna1.gif", "=))");
emo(/\s;\(+/g, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTaBg7yVa9crsPJxQiB3N3AlI7zpFjMjOkunpYUqtbgiNZD8j-tK_TOxVXVZ7KRMztXKliy0sj9x5049p6iBHCaU93Ug-oidpFJ6KZbYV0xtYSmnbRCbp2Ph2JL8JKXfigOW86x34owOk/s1600/04-namkna.gif", ";(");
emo(/\s;-\(+/g, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIHV_HzdiVf9-K1VrGvWeUz6az0E0wjVA7Vw6MwXC394BrJIgcQhcudVTOpdNPgRT2aBF9eWV1bqerrZjjP3owcmuoGfgb-Y_NeO8q2G7kmF0JbYTduPaAEiNBjjmyqFgaJTNnyruXDYE/s1600/05-namkna.gif", ";-(");
emo(/\s:d/ig, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhp1wXIWzUKEMQKHsJXc9aodkDH96h5DRCu9CeITlEZwqnrZFuETjILjU3ycqD8GHn1b_BASsQW-gRBt3CApC43IJoDwAa80xkv5Vpkm7Z9xAn7JaRdXjDu2aue5xSZoJSmIBvnPHvmi6Q/s1600/07-namkna.gif", ":d");
emo(/\s:-d/ig, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhs8KGobn0Vwv-4sSmyajR-m638ClYzum_MV1fxrFmnAlwJ56Y5PsO8zuJSUo7wmN1Qdq3C8GeSOKOqDhle3BgD3uoswYCRxnClNz84i8OBiyVd9Ko7t9krI0q0BY_BdUhRgCjv4puseas/s1600/08-namkna.gif", ":-d");
emo(/\s@-\)+/g, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJXHQNy0VCPKebcI_3uE-RyaDxT0f7zDJoPjPQhVFpjNLLzFUlrQgKTZx4j4wc5JZbwzHU0yBNLd5z7cMnqhU2GzzNP7AxSntq_oUO3mYmgS90oRUyIUVkeoBUtKOvvmz1uKx_8tcMmcw/s1600/09-namkna-blogspot-com.gif", "@-)");
emo(/\s:p/ig, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgr5EF7ZDhelA1hADLTvhlFKoPH9OqPerH9NoBQdFvFwDRNuO3ImdbS5-EmM2a3mTokMKjgnNSN0b56m5DUSN1DsJHIcGACa56qIn8ppaTR4hQkVwpV1uQgoRTiZSx81Fw4H9bArlG0zC8/s1600/10-namkna-blogspot-com.gif", ":p");
emo(/\s:o/ig, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXCWiMtbVanUw61kK2QunjPX08CrTj4ZQQ1_13FIFXb3xRfwX1HMCzG9e8GF02KwjuZLYJ-Drjjc67Of1kSqlRjKtsgBD8d4x-pyd-4iPZ_VAeEnWfg9gs1vBmSeoLVZpMQHBYTUTRIjA/s1600/11-namkna-blogspot-com.gif", ":o");
emo(/\s:&gt;\)+/g, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyD021BwMPLpGoBqKlUCi2P0v-0nUqG_k4LZOIZM8_5VAVB-P_aYACyVsIuNNbB3z1EMYZaNfK7nQmKygHKkD42W_oPuuPZs2fPK7GyZfsrCFIUT54bRXUEXxfks5iXsDJJ-ZUCTHs138/s1600/12-namkna-blogspot-com.gif", ":&gt;)");
emo(/\s\(o\)+/ig, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjibdkygQHJFceHAjNuMdSPVMWsPJl5kserjzvp42t6_QpaNlbXKuJkw0htWQMW7hpL2e85bCJtq331J3idVq7DTxN81s7_iM1Qf1CLOvoTupfOALwEePxBRuit2lm7IyjYGNDsDmRthzc/s1600/13-namkna-blogspot-com.gif", "(o)");
emo(/\s\[-\(+/g, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVFwoVcNJor1SwKEYwiS11DOcDzBB-ObK68GZ1IuQzyhCEKf_0LYQxt55VDMgcVbxD2NP6oqrFks15PraQ3YW1FJQqeGXexZBMkDCCDJGqCvbUAVgIojoM_RlN9ApAZI9T94oqUjRkbhM/s1600/14-namkna-blogspot-com.gif", "[-(");
emo(/\s:-\?/g, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiG19Q5zOBXU52bAcwrnd4VT_rGzMtKPjis82-dodLMwOE_gTBb_M3jqkLUz9aLtrBTEUqgKt67k6iKWBbKXQeQ-KHcaRlxQvySoZsLadzBJr3JKlYqgxaZDK0CkiFKHkUdWPxB9gEnn0s/s1600/15-namkna-blogspot-com.gif", ":-?");
emo(/\s\(p\)+/ig, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZjKVNGjIP6hWRpRPQi7GP0Z5zEPRyBAAgYyo_teiuZ87dPgX7Lz5Xoo2hcKRz9F785IhHoRxCpsAKJgtHvXcr_XZYT4TvyQvNo-vIPOJcJ7TweHOrpt5FAuK7_TLbjKOyMJ9c2fuvNOo/s1600/16-namkna-blogspot-com.gif", "(p)");
emo(/\s:-s/ig, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOVEaxfjnjU2AX9OF3Rkck5MFH2pOKby1527NDft9RVdBqpqrnkLzwny4xrsia5AQeoF5R2DPdm_IOf6M6kpj6u_sDWqnRP3a1aln_uwtNj3h5T7z6COPDwG0joYdPoPQkc-vN4yvluCA/s1600/17-namkna-blogspot-com.gif", ":-s");
emo(/\s\(m\)+/ig, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOtKiorQfdmuoiILQUK98FZMXyMubnmG-eWW80KTar8PNIf52er5iW6PpAw_G5ogyOr6vaMwCjGbC89pvh4wzpz71nnAuolZhQAYPIdaUbHIObwn7MFE1nCx3KMQ8wKpcBKtuGtRjuiiI/s1600/18-namkna-blogspot-com.gif", "(m)");
emo(/\s8-\)+/ig, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4gZDCficfvWfTEUuFwicCwL7VuoacgvtQYbcw_WIDIdKN5cVLe_T_K9ERodrgArXqjrvuwNEON-AC-Ysam1gvmAj7YKM3UPZUR6KpGkAMwCx63j6j_NlxcZdpLLByq6dDYMM4x1Xm_f0/s1600/19-namkna-blogspot-com.gif", "8-)");
emo(/\s:-t/ig, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJZiUvGS2-NnVZ7xCb8En46irqc813-xuY6r9jsGuND_McXHouyqYxQCP2kHwK7Xqr0WFHfA0-sIBN5suGQr3h6dUN5Ehitut0hHhhv2UNMCs8pEUGe6-d1EG1m-0Rl4mRy5CwjV54SvE/s1600/20-namkna-blogspot-com.gif", ":-t");
emo(/\s:-b/ig, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiD2d5e5trIhwv9XjkyXm6w4T-r9upBBY-J-NpEFmjBtR0Jl82GJ_9k5IU3eCMQEGNrHVACD6Pb5p-D1TE6zQE3JS66JLps7ZWIO9xy57qWoUVFjCfHFsxWB399kmiRjPV2C8EN_-L9R8o/s1600/21-namkna-blogspot-com.gif", ":-b");
emo(/\sb-\(+/ig, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgAXwGaXvc6WS4TGCrNWhpGH-9_ell7LZB6F_G9P25f_1YQZvh02bFHJqBKPoJczqJLxCF7PRoWxQf0CQgSzuNcy9BNaFduY_eNNBJg1_jvtEQwdg0V-KC0q28cWCJ5_mH9cuIM7UY0qjI/s1600/22-namkna-blogspot-com.gif", "b-(");
emo(/\s:-#/ig, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQc9ValYzcZ8uZzNChIEfolkNqyd2Qqgk_g-4w4JOJGyB6PY7EuyXuqvssVzJxkFQII70CQKKpZ90h1Km7CzPHxetOrYcD-NfQq3GC6Av3A0Mecpy2ijsa8VFLGI12CSDKINPOHAVEcfY/s1600/23-namkna-blogspot-com.gif", ":-#");
emo(/\s=p~/ig, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4c93KTkjDGVt1RYDLm7xtHVPIfifjELbn7otC4KCbWLCr951WEGjagZHSOTqC3xhL-f9YnmTR4n3typypWUsSzuBvqNDVGWK21GmL1nh-dR-xH07NVjyqqWoG-RLs6lCoGQfJwEkAtc8/s1600/24-namkna-blogspot-com.gif", "=p~");
emo(/\s\$-\)+/ig, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXLX7WO7qBc7m3GbwGftRYR8goJC1fzayv3whaVrzyo6YXS2X37R_zN1Mj1uY7PUnjkUDXfqUPZIH9KtlYU-ef4vm8kt8Kj1hmPEG8NqbkniUPZE3zjjyHA5n4WhHMVaVQMB69QNxvvlM/s1600/25-namkna-blogspot-com.gif", "$-)");
emo(/\s\(b\)+/ig, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjB_K-QpggRWKNmB25wCVqo8iiXTkaaJAJ3KsdLr0w9kKps7jBX28nfVCCBnfXNN_ODCghhHqsUADL0cjH0ol7POcxqcxGh6YJEtbc3cL-QjGIInd-oZpzwqnBd9qaUzClO14UyjV6ylJY/s1600/26-namkna-blogspot-com.gif", "(b)");
emo(/\s\(f\)+/ig, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQNwbvYs13tPuFPnREDiSDvNSnsqZB4NWgzQUGIeNHlSuHbtyOSKT6Fjk7U3Y4M2Wr-GJYe-xPNAYhfBbCLnPe_NY0n5WAJBIp4H503Ks-O7pAj43b3AEr0E_BPp4P2-hc1tZxby4f1Eg/s1600/27-namkna-blogspot-com.gif'", "(f)");
emo(/\sx-\)+/ig, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdu875z9TS9tGGPaLBmgwK-3D58jP7WYCMIGqPTSx15Ykuikbyiv5x5-3uFOF7WQuGotSrhr2L3veqLKvE6r0ejrFa3SWkorlS8xP4uQCiN5j5eTIlWlh9rhYLWtjh-Prr0GoHf2x3uYk/s1600/28-namkna-blogspot-com.gif", "x-)");
emo(/\s\(k\)+/ig, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2ZIOnFg8-e77a__ADAhlbcAafPhC4BuugCGMtm8i1IF5kMcSPaCJjarIyHm67vyAXy9PFd3cwrcLijXn0f1yglXaV5LrikQ0AXWEQYxxSa8N-hydRUNPpBFWJKozdAUgBd6cdP52nssc/s1600/29-namkna-blogspot-com.gif", "(k)");
emo(/\s\(h\)+/ig, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEheTKHTj9YtdDnmbVDciPalvTvWtGLmCwdmrfY3viR5wKkPtw2zlY2qAzKMbGY8Ez-lpX2Zp0HbphW5vQz_TsgNmSUPPIFO91Ofn0DR1Hmd8hhEHBWnK_lWk6QFkTmcuUzQM5vHst17P4o/s1600/30-namkna-blogspot-com.gif", "(h)");
emo(/\s\(c\)+/ig, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEil7jU53gBjOF1SRo-wQhiO7PzkJggqsgFril1a_6ckT8xW_mBtg0iuanzwcphsgtsWaUU7E9S8CioXJhES0IgUJl4M-x8L6d8u3Mi776FR6sK3G_d6av3fIiKtyUYLxC6pRGPriLnaDbM/s1600/31-namkna-blogspot-com.gif", "(c)");
emo(/\scheer/ig, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7k55NNPSNTth3R7O3dixN_E8Cph6wg4QDynVSCbOX8nK6jxgKEWIVOnPFD7ASFUWs9xhi5hSA79LPejJs_R-bmM0BkKTk5joBvQgsTFTl4eA2gTZGbWnAv9wb-U9r9G7xIUOusEwZn2E/s1600/32-namkna-blogspot-com.gif", "cheer");
emo(/\s\(sm\)+/ig, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTfCu11l4lqlzbByOugbTsPHHvW71cOno2UAD19hUgKscnMGR2Dt_5_dEDC4kpQeXwL9uEo7fzY9zWKskL5U4yzc6SmpWO678qd_Kf5bjEmDWXVkotSaEXgmU-ZTpYPQEaCY8XyhES19Q/s1600/33-namkna-blogspot-com.gif", "(sm)");
emo(/\s\(f\u\)+/ig, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgysmCtVW_h0ca2GsDrIUUclYHf-cWwa4pogGrU-eiTgIBOZliftFuBk-DLEotULasA_zGwPvu-Xu4SyLY_-uxeAzxJIrn53T7EYUc7KpGfn4uMu3P7kh16RK7F4-bafp26iEGgkTWDj-4/s1600/34-namkna-blogspot-com.gif", "(fu)");
emo(/\s\(k\u\)+/ig, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpTq5Blx5w3s4tpVpHEdnthGuPXg69OE2V99M6Ay88euKOlY_1gcgv_lc3cyZP_7G7D-YPjOGRF2Lltmo-ZEDqyX3k1PjtfR4f9FWdCJTJKe1OU5QRM3EVObHVZx4QKoZyBR0dR49eXf4/s1600/35-namkna-blogspot-com.gif", "(ku)");
emo(/\s\(b\g\)+/ig, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgo8IcNEKI69f6nPbakU-gcfyaBRg5OjrSZo5sDAd-femShqPEw87TjzX4kmA6kaP2GzaNuqkRFjirukZd869pBH2tR25yTGH6YMOnHfHYaEvEXpDmldTrxz8-y4zOAZu0otLUpTG8IDRw/s1600/36-namkna-blogspot-com.gif", "(bg)");
emo(/\s\(l\o\l\)+/ig, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrMjGLh7YFLwMQAYN1Fs53OhLlNwVfCeOtMmhSJ9gDiwLLD3fiOGHHnDhlMM-wYhCmULk71mWbuaKpZuD0tch1Hgx6hfE0ZIzcM-P6Qw-GRdt1MTDJaBbrSwbZBMdrdrbc0PpEQhDyZCI/s1600/37-namkna-blogspot-com.gif", "(lol)");

// 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>

<div class='cleared'/>
<script type='text/javascript'>
function openup_parseHTML() { window.open(&quot;http://namkna.blogspot.com/p/code-convert-for-blogspot-chuyen-doi.html&quot;, &quot;followblog&quot;, &quot;height=700, width=630, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, directories=no, status=no&quot; ); }
</script>
5- Lưu mẫu lại.
- Lúc này khung comments của bạn đã xuất hiện các biểu tượng mặt cười nhưng chưa di chuyển khi Trả Lời comments nên không thuận tiện trong việc chèn mặt cười vào comment.

Tùy biến cho mẫu threaded comment của blogger.

- Bước tiếp theo sẽ giúp cho khung mặt cười trên di chuyển theo nhận xét.
1- Vào Mẫu (Template) => Chọn Chỉnh sử HTML (Edit HTML) => Tiếp tục (Proceed) => Chọn  Mở rộng tiện ích mẫu  Expand Template Widgets)
1- Tìmđoạn code như bên dưới.
<b:includable id='threaded-comment-form' var='post'>
<div class='comment-form'>
<a name='comment-form'/>
<b:if cond='data:mobile'>
<p><data:blogCommentMessage/></p>
<data:blogTeamBlogMessage/>
<a expr:href='data:post.commentFormIframeSrc' id='comment-editor-src'/>
<iframe allowtransparency='true' class='blogger-iframe-colorize blogger-comment-from-post' frameborder='0' height='410' id='comment-editor' name='comment-editor' src='' style='display: none' width='100%'/>
<b:else/>
<p><data:blogCommentMessage/></p>
<data:blogTeamBlogMessage/>
<a expr:href='data:post.commentFormIframeSrc' id='comment-editor-src'/>
<iframe allowtransparency='true' class='blogger-iframe-colorize blogger-comment-from-post' frameborder='0' height='410' id='comment-editor' name='comment-editor' src='' width='100%'/>
</b:if>
<data:post.friendConnectJs/>
<data:post.cmtfpIframe/>
<script type='text/javascript'>
BLOG_CMT_createIframe(&#39;<data:post.appRpcRelayPath/>&#39;, &#39;<data:post.communityId/>&#39;);
</script>
</div>
</b:includable>
- Thêm vào sau thẻ <b:else/> (phần mình tô màu xanh) đoạn code bên dưới:
<div id='threaded-comment-form'>
- Thêm vào trước thẻ </b:if> (phần mình tô màu xanh) đoạn code bên dưới:
</div>
- Xem hình minh họa dưới để thấy rõ hơn:
Chèn bộ mặt cười (Emoticons) dạng input cho comment của blogspot style 2
2- Tìm đoạn code sau:
document.getElementById(domId).insertBefore(replybox, null);
- Tahy thế nó thành đoạn code bên dưới:
document.getElementById(domId).insertBefore(document.getElementById('threaded-comment-form'), null);
3- Lưu mẫu của bạn lại và xem kết quả nha.
Theo: Troll VL

0 nhận xét:

Đăng nhận xét

Popular Posts