Home » Thủ thuật Blogger
Chèn biểu tượng cảm xúc vào nhận xét dạng input
Thứ Ba, 15 tháng 11, 2011
chắc hẳn bạn cũng biết rằng hệ thống nhận xét của Blogspot có phần khung viết nhận xét (Comments Form and Editor) dưới dạng nhúng từ bên ngoài qua thẻ iframe do đó chúng ta không thể chèn biểu tượng cảm xúc (Emoticons) vào nhận xét bằng phương pháp input như Wordpress. Để giải quyết vấn đề này, chỉ có một cách là tạo khung nhận xét riêng theo kiểu Wordpress cho Blogspot. Tuy nhiên tạm thời mình chưa tìm ra giải pháp vì thế có thể áp dụng một thủ thuật trung gian, tức là tạo tính năng chèn biểu tượng cảm xúc trực tiếp vào một vùng text (textarea) kết hợp nút chọn để người dùng copy mã nhập rồi dán vào khung viết nhận xét, ngoài ra còn có chức năng chèn các thẻ như , , , . Hy vọng đây sẽ là bàn đạp để chúng ta tiến thêm một bước trong công cuộc hiện đại hóa hệ thống nhận xét của Blogspot.
Bạn có thể xem Demo ở phần viết bình luận của Thủ thuật Blogger.
Thủ thuật này đã kết hợp thủ thuật tạo bộ biểu tượng cảm xúc cho nhận xét vì thế nếu áp dụng thủ thuật này thì bạn cần tháo thủ thuật cũ liên quan (nếu đã cài đặt rồi) và thực hiện theo các bước sau đây:
Bước 1. Đăng nhập Blogger, vào Design >> Edit HTML, chọn Expand Widget Templates. Đặt đoạn code sau đây vào trước thẻ </body>. Đây là script chức năng cho bộ biểu tượng cảm xúc hoạt động.
<b:if cond='data:blog.pageType == "item"'>
<script type='text/javascript'>
//<![CDATA[
//Emoticons for Blogger Comments || Author: Huynh Nhat Ha || http://www.thuthuatblogger.info || © Copyright 2010
function emoticonBloggerHuynhNhatHa() {
if(!document.getElementById) {return;} // no support
bodyText = document.getElementById('comments-block');
theText = bodyText.innerHTML;
theText = theText.replace(/:1\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDJZpnmP15OSSymdfSK26rcR7-jNCra0z_iM13nMfXwX84Oyf2Q2Vm20_ZIiekdpjvWHLuduAk8kPgGtEWQYeT0M5lc6_MqDsTOTdPMdcQ_nCnFr1ifq3elLHBme3BkHqipGkWoI4WUM0y/s1600/49.gif" />');
theText = theText.replace(/:2\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJBwhB9uLTt1ZxfFQNY7uGwN2pkGgzUpEzOW8iztvsAFOLWqW40KzO1W2j0NVqamFISvMpyi7brzDZxRVoevGR19cwH8WKL7cY9ECMsaEL4A4mNHtx3VMqFmbkdlgUnxGE4lSgxQab6b-7/s1600/102.gif" />');
theText = theText.replace(/:3\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOvyegHVNfnWCT4lMHeGg168F9PpUvpjLtHJRV5RQvd05taW87FbgEVhFRxH39svKzIHyLvO2HnAY16EZSfO94kq_HaebLClDDHDxnCapFuVeoZc_aznsb1BQUN0kqO71jS3_QX9PLEjf2/s1600/113.gif" />');
theText = theText.replace(/:4\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5Ib_ZBY_MknIwkewY5EwiHRGPAmJn7U_inmKX_Ojv2OZI9UpIoP-9T_yN4v3yPEe1bLt2EK4IeRXhbQmEce2hVqXZv9xhtX5oHLoEuMZ4TUqDoIZvexz6AOvd5TILTHWUeyG5j02FZ82l/s1600/93.gif" />');
theText = theText.replace(/:5\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3ILIrbeoptdZ8fGP34RMVD5UXuG4EK0XatCvyoNEg2g_UW_cYnTCLvaST2R6Rhu4W4JHlpjuJ_Irw2AW03_xFOxTcfTVmSY8JWqIuXgcIlTRd6pSLW2xS8vg9FdP9E3kG7fPM2C16M4l-/s1600/61.gif" />');
theText = theText.replace(/:6\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBezHnSeogm9Bd3SikNi3otqy7oamn0Vz7BRSBs0RIZLpcOCIH4a9UdFvR_FjZYw2ZOdajbiqyMtDq31m5uqbi1HPQI6V4-nJbxBWW2WSfflD0NQNvE_GDwmXL8TPIxJl1VghtwvtQpgZK/s1600/134.gif" />');
theText = theText.replace(/:7\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsNnKgdYeNGmMwVzQgEC3R9oEsCphyphenhyphenBvzP_BJckNVb21Gbgx7_4hDhlgiMT_Umvf9s5HnZWVQtoKLYhI-UIDySSaaz3gNrbI-7GmVM2nm4WybVQXRq_pM3O1PDRnnyUiGrPpsbRlOJ_w64/s1600/39.gif" />');
theText = theText.replace(/:8\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXwN1piPG6_MhdgposoS-zndePugifCwFBqJv4kwbof5lrlXB2vsjMJpPp1AuQ3_C7ocO5rMjvHoyUxp8-Z6AI7oD5FukWjxByzouULb9_nZhqPbbUEPdYCYYJTRuOQ3z6G1Rm2vYy-qIJ/s1600/106.gif" />');
theText = theText.replace(/:9\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiy8Z_Zty0NORNVm9XkUwpxzuOrWTo9YVrxyJ9s7CXwHk_ItPdTRQyg2Ek3wDi4Lp-b0jQA8V3W4382Q7hLUytrP23Q5MidTcTv8z2Djj_GEH7ZSbJLb2vrwl7nMYQzFKnae5K6zU7SntQj/s1600/43.gif" />');
theText = theText.replace(/:A\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlYzEiBFsnswnHm0GI1Xvp_yTw-Lg4CBWEgx4eLRGOtqFLdtpDUyXPUxGvF7NhZyILrYsenS4uN7wmUWyl4pm79GyomKduN8MNauO4IrtRFhk1ZtE4uMSqFZIN6WHAVN6Rm_qQEDWcRWWe/s1600/111.gif" />');
theText = theText.replace(/:B\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZExEHPVir1hEf3AfIhbgIUl5LjFqVSUYHxFUyBq1sFWEM2-kKXOZjn2Gb0u8i_RUv7J6dz07ZmTC29r2dKTLiaCC_0m2AOTsHHo6FqkKkGwlV-DtV8c6G9bFcAGmZ6akDYvzLihv6NdfU/s1600/48.gif" />');
theText = theText.replace(/:C\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1iG00MRsSBhEadAP3mzWty5qpkAmd-q7X0QxZh61Q6HPn2YIEaJVeF6cmF0WODVVi8TLiFJk14tcheQDsMvEbe9Jp7ORGi-dwj75-oOUoQXhyFBp7QO4oZHVTH0QYerwnnOUHCgHnEkVz/s1600/54.gif" />');
theText = theText.replace(/:D\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7-cTf-h5i2-Me5ZxgZQSt50cqV_3RdE464u6ex6AXDJZYd_woKBQU95iHirA0O0OK7MACRZwR62kjlgQHc0ap8TFkMZdlyQO_d7yN_VtrK1SfPCwWp8-MOnvLFiP3X3QDaFREbe3khLiM/s1600/63.gif" />');
theText = theText.replace(/:E\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjZOBkzS1fJ4Z4IFe69DCqVHXw4nlp57AgiSondDMVB8rlwNG3R7zgiGO7yNC26KRPZ_ClZX3KRqs05rNMEXT2sf5Vdi-69g9xlRGstPNt7jIOlqM53Rs8jk5SkH2KVLQ8aLrXheYI8xqn/s1600/100.gif" />');
theText = theText.replace(/:F\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisGxaHe3__v3jFD7y3iMiuFVpmxMtld6nLYvyq9yfbtOcm0CtUHt2VC6IMKRaF63a2dITbHPDDzhyphenhyphenqFmboN7fBozjOYsIWaDxBtxhiUzXEM_CFnr0U0m7fJs3Su4zHk0jS-QGXk6_4e4OP/s1600/45.gif" />');
theText = theText.replace(/:G\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiktX-xeLul2Kb_7vdjRW9a5wmQiIjZXyErZ6DMudzsr3Kx5lcITN4FmrZXLAbBduqFjuBQxTkiYtFjE9YA-rjRNov9IrIL2YZKwzQcE8iltieonbzqWKy00hiwg8ERuGGZyEv4w0C60d3G/s1600/77.gif" />');
theText = theText.replace(/:H\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvXdx90qkM9CZHxCAjowh8TlTUSwm6GqNyGxOBn-6TOSp48N7vUCoefP3_Kq5wWBmLxC3CwJofSR_qu2mY-FZRLVCJZOD0f88a7uNyeme42E5hJceJAvUVcYeDEgVq5KeMpOHwRZUygR5m/s1600/86.gif" />');
theText = theText.replace(/:I\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0ANR2nhbxk4r7xHhtFYPv71CR8Yf-XubshTl20txI9LV8_frpLJFvHwNI8kuGFyd-nqapuf_XImZsjQHtXFWLOw_LMUw7m_kvEvu6sko8e9d1CsdT1JdUy0RHE3AH_pFF5s4eySoqWCYV/s1600/94.gif" />');
theText = theText.replace(/:J\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOUE_-VG9_2ic07yCv8kWRyLlWMI1nGrbNEYRshrsUCdaym66KIHPDayNV3mqQydxyQKdNL9Xec7v_i1_WjDWquTMVJE4sxhudL283l4VgRCaL0TIXyuZOZY771itzUhb_M2Vs3adzRyl_/s1600/83.gif" />');
theText = theText.replace(/:K\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhm4XCt5NUqnHhHaYvqWPw-H9cu5Lb8uoQhT2nQSCqPFslDc99VZndRJUz5Mbct4CvgGZshIehIsTlbmY6GJfv4A68aGOvqFojTLAVlu6HvoPXUT_-ot27cUvk_kSfVDxIGHL-GIYtyQnrz/s1600/59.gif" />');
theText = theText.replace(/:L\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZDegHzFyFhzgawpn4B6THniWiJBRT51i39zCnKiDc5RSrBMhgVIYIJ0AiLMmhph7kTDjHlwMV_TwefldC0WuUD53IPnRFnB7UgzA5t6NOs0fjN-5rwXD340sVAPwUyRJs4RbW0f6Q4zp1/s1600/soldierbaby.gif" />');
theText = theText.replace(/:M\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj03SgQ1GJz6O7z_i277fnCopJ5i68yPPfrnQhCjXp_Ml7F3IJs9h5Zrp9aHGMiIWoq5oV4nzjVzdsmOj1_x9pRBIOGyrgEQ5J1ryx5wYpYql-KR4jAI1euRYwuaLAG5L6SFzAmkDARmYwY/s1600/alo.gif" />');
theText = theText.replace(/:N\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJfSgJXH_v2rIIgj4oo7nzPCdWK7HOyKTbXiUA5Q5L4FXBfE8ZslndEznmhOzmgYlGf0uJvratoTMdFVOerZqcB2l5WaI3RPRFSF7L7bI-HSlD96p5wiahuGtSdBCKWNDqN_BsnX69ebhw/s1600/shutup.gif" />');
theText = theText.replace(/:O\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjWn5KTxDvvw7n41DE5G6VGrDLGshAyfCoTTm9hbjBwHxLuxblCUkDCqM0fniu7IlVMgjgkeJvLSO1zo9PnfE-SOfamNsmAphQ6F6hvgFeoJlrMHw8oy0s1MCgVRYDHZFwBaeI6VuwKEu9/s1600/yeulam.gif" />');
theText = theText.replace(/:P\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwLkl5Bo84sg0FZy5b7TkjRkTjTYSy0oq94REQRD87ki8Fym8UmJS0ofBNC4OhkFIhueN329iZY9OmZyjpYkb-TIIAuOorrkOic1gw5Pv3e0ntfJVCccjiO7x1cJvUSA8dw-3i7oBkn4hM/s1600/datbomb.gif" />');
bodyText.innerHTML = theText;}
//]]>
</script>
<script type='text/javascript'>
emoticonBloggerHuynhNhatHa();
</script>
</b:if>
Cần chú ý để chức năng biểu tượng cảm xúc hoạt động trong phần nhận xét thì bạn phải thay đổi ID comments-block cho phù hợp. ID này nằm trong một thẻ chỉ định thành phần chứa các dữ liệu của nhận xét, thẻ này thường nằm ngay trước dòng <b:loop values='data:post.comments' var='comment'>. Tùy theo cách đặt tên của người thiết kế Template mà id này có thể có tên khác nhau ví dụ: comments-block, comments-block3, comments_block, cm_block, commentsblock …
Bước 2. Tìm đến đoạn code như bên dưới. Đoạn code này biểu thị phần khung viết nhận xét.
<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%'/>
Đặt trước đoạn code trên bằng đoạn code bên dưới:
<script type='text/javascript'>
//<![CDATA[
// Script to insert Emoticons and Links on Blogspot Comments V1 by www.thuthuatblogger.info
function comments_URL() {
var r = prompt("Nhập địa chỉ trang", "http://");
var p = prompt("Nhập link text hiển thị", "Text");
if(r != "") ; if(p != ""){
document.getElementById('comments_input').value += "<a href='" + r + "' rel='nofollow'>" + p + "<\/a>";
} else {
alert("Bạn đã nhập xong dữ liệu");
}
}
function comments_HTML() {
document.getElementById('comments_input').value += '<a href=\'http://URL dẫn đến link \'>Trang<\/a>';
}
function comments_B() {
document.getElementById('comments_input').value += '<b><\/b>';
}
function comments_I() {
document.getElementById('comments_input').value += '<i><\/i>';
}
function comments_EM() {
document.getElementById('comments_input').value += '<em><\/em>';
}
function moreSmilies() {
document.getElementById('smiley-more').style.display = 'inline';
document.getElementById('smiley-toggle').innerHTML = '<a href="javascript:lessSmilies()">« Less</a></span>';
}
function lessSmilies() {
document.getElementById('smiley-more').style.display = 'none';
document.getElementById('smiley-toggle').innerHTML = '<a href="javascript:moreSmilies()">More »</a>';
}
//]]>
</script>
<style>
#comments_insert {padding:0;margin:0;width:600px;float:left;text-align: center}
#comments_insert img {padding:0;border:none;margin:2px}
.text_style_wrap {margin-top:10px;}
.text_style {border:1px solid #069;padding:3px;background: #d8eaee}
#comments_insert a {text-decoration:none}
#comments_HTML {display: none}
#comments_input {margin-top:10px}
.tooltip{outline:none;cursor:help;text-decoration:none;position:relative}
.tooltip span{margin-left:-999em;position:absolute}
.tooltip:hover span{border-radius:5px 5px;-moz-border-radius:5px;-webkit-border-radius:5px;box-shadow:5px 5px 5px rgba(0,0,0,0.1);-webkit-box-shadow:5px 5px rgba(0,0,0,0.1);-moz-box-shadow:5px 5px rgba(0,0,0,0.1);font-family:Calibri,Tahoma,Geneva,sans-serif;position:absolute;left:1em;top:2em;z-index:99;margin-left:0;width:300px}
.tooltip:hover img{border:0;margin:-10px 0 0 -55px;float:left;position:absolute}
.tooltip:hover em{font-family:Candara,Tahoma,Geneva,sans-serif;font-size:1.2em;font-weight:bold;display:block;padding:0.2em 0 0.6em 0}
.help{padding: 0.8em 1em; background: #FFCCAA; border: 1px solid #FF3334;text-align:justify;color:#000}
</style>
<!--[if IE]> <style> #comments_URL {display: none} #comments_HTML {display:inline} </style> <![endif]-->
<div id='comments_insert'>
<a href='javascript: void(0);' onClick='document.getElementById("comments_input").value += ":1) ";'><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDJZpnmP15OSSymdfSK26rcR7-jNCra0z_iM13nMfXwX84Oyf2Q2Vm20_ZIiekdpjvWHLuduAk8kPgGtEWQYeT0M5lc6_MqDsTOTdPMdcQ_nCnFr1ifq3elLHBme3BkHqipGkWoI4WUM0y/s1600/49.gif' style='border: 0; padding:0' title='hê hê hê'/></a>
<a href='javascript: void(0);' onClick='document.getElementById("comments_input").value += ":2) ";'><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJBwhB9uLTt1ZxfFQNY7uGwN2pkGgzUpEzOW8iztvsAFOLWqW40KzO1W2j0NVqamFISvMpyi7brzDZxRVoevGR19cwH8WKL7cY9ECMsaEL4A4mNHtx3VMqFmbkdlgUnxGE4lSgxQab6b-7/s1600/102.gif' style='border: 0; padding:0' title='hôn hôn'/></a>
<a href='javascript: void(0);' onClick='document.getElementById("comments_input").value += ":3) ";'><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOvyegHVNfnWCT4lMHeGg168F9PpUvpjLtHJRV5RQvd05taW87FbgEVhFRxH39svKzIHyLvO2HnAY16EZSfO94kq_HaebLClDDHDxnCapFuVeoZc_aznsb1BQUN0kqO71jS3_QX9PLEjf2/s1600/113.gif' style='border: 0; padding:0' title='ua ua ua'/></a>
<a href='javascript: void(0);' onClick='document.getElementById("comments_input").value += ":4) ";'><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5Ib_ZBY_MknIwkewY5EwiHRGPAmJn7U_inmKX_Ojv2OZI9UpIoP-9T_yN4v3yPEe1bLt2EK4IeRXhbQmEce2hVqXZv9xhtX5oHLoEuMZ4TUqDoIZvexz6AOvd5TILTHWUeyG5j02FZ82l/s1600/93.gif' style='border: 0; padding:0' title='nhìn nè'/></a>
<a href='javascript: void(0);' onClick='document.getElementById("comments_input").value += ":5) ";'><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3ILIrbeoptdZ8fGP34RMVD5UXuG4EK0XatCvyoNEg2g_UW_cYnTCLvaST2R6Rhu4W4JHlpjuJ_Irw2AW03_xFOxTcfTVmSY8JWqIuXgcIlTRd6pSLW2xS8vg9FdP9E3kG7fPM2C16M4l-/s1600/61.gif' style='border: 0; padding:0' title='vỗ tay'/></a>
<span id='smiley-more' style='display: none;'>
<a href='javascript: void(0);' onClick='document.getElementById("comments_input").value += ":6) ";'><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBezHnSeogm9Bd3SikNi3otqy7oamn0Vz7BRSBs0RIZLpcOCIH4a9UdFvR_FjZYw2ZOdajbiqyMtDq31m5uqbi1HPQI6V4-nJbxBWW2WSfflD0NQNvE_GDwmXL8TPIxJl1VghtwvtQpgZK/s1600/134.gif' style='border: 0; padding:0' title='tát bớp'/></a>
<a href='javascript: void(0);' onClick='document.getElementById("comments_input").value += ":7) ";'><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsNnKgdYeNGmMwVzQgEC3R9oEsCphyphenhyphenBvzP_BJckNVb21Gbgx7_4hDhlgiMT_Umvf9s5HnZWVQtoKLYhI-UIDySSaaz3gNrbI-7GmVM2nm4WybVQXRq_pM3O1PDRnnyUiGrPpsbRlOJ_w64/s1600/39.gif' style='border: 0; padding:0' title='rơi lệ'/></a>
<a href='javascript: void(0);' onClick='document.getElementById("comments_input").value += ":8) ";'><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXwN1piPG6_MhdgposoS-zndePugifCwFBqJv4kwbof5lrlXB2vsjMJpPp1AuQ3_C7ocO5rMjvHoyUxp8-Z6AI7oD5FukWjxByzouULb9_nZhqPbbUEPdYCYYJTRuOQ3z6G1Rm2vYy-qIJ/s1600/106.gif' style='border: 0; padding:0' title='money money'/></a>
<a href='javascript: void(0);' onClick='document.getElementById("comments_input").value += ":9) ";'><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiy8Z_Zty0NORNVm9XkUwpxzuOrWTo9YVrxyJ9s7CXwHk_ItPdTRQyg2Ek3wDi4Lp-b0jQA8V3W4382Q7hLUytrP23Q5MidTcTv8z2Djj_GEH7ZSbJLb2vrwl7nMYQzFKnae5K6zU7SntQj/s1600/43.gif' style='border: 0; padding:0' title='lêu lêu'/></a>
<a href='javascript: void(0);' onClick='document.getElementById("comments_input").value += ":A) ";'><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlYzEiBFsnswnHm0GI1Xvp_yTw-Lg4CBWEgx4eLRGOtqFLdtpDUyXPUxGvF7NhZyILrYsenS4uN7wmUWyl4pm79GyomKduN8MNauO4IrtRFhk1ZtE4uMSqFZIN6WHAVN6Rm_qQEDWcRWWe/s1600/111.gif' style='border: 0; padding:0' title='lắc đầu'/></a>
<a href='javascript: void(0);' onClick='document.getElementById("comments_input").value += ":B) ";'><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZExEHPVir1hEf3AfIhbgIUl5LjFqVSUYHxFUyBq1sFWEM2-kKXOZjn2Gb0u8i_RUv7J6dz07ZmTC29r2dKTLiaCC_0m2AOTsHHo6FqkKkGwlV-DtV8c6G9bFcAGmZ6akDYvzLihv6NdfU/s1600/48.gif' style='border: 0; padding:0' title='khóc ròng'/></a>
<a href='javascript: void(0);' onClick='document.getElementById("comments_input").value += ":C) ";'><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1iG00MRsSBhEadAP3mzWty5qpkAmd-q7X0QxZh61Q6HPn2YIEaJVeF6cmF0WODVVi8TLiFJk14tcheQDsMvEbe9Jp7ORGi-dwj75-oOUoQXhyFBp7QO4oZHVTH0QYerwnnOUHCgHnEkVz/s1600/54.gif' style='border: 0; padding:0' title='I don’t know'/></a>
<a href='javascript: void(0);' onClick='document.getElementById("comments_input").value += ":D) ";'><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7-cTf-h5i2-Me5ZxgZQSt50cqV_3RdE464u6ex6AXDJZYd_woKBQU95iHirA0O0OK7MACRZwR62kjlgQHc0ap8TFkMZdlyQO_d7yN_VtrK1SfPCwWp8-MOnvLFiP3X3QDaFREbe3khLiM/s1600/63.gif' style='border: 0; padding:0' title='hi hi hi'/></a>
<a href='javascript: void(0);' onClick='document.getElementById("comments_input").value += ":E) ";'><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjZOBkzS1fJ4Z4IFe69DCqVHXw4nlp57AgiSondDMVB8rlwNG3R7zgiGO7yNC26KRPZ_ClZX3KRqs05rNMEXT2sf5Vdi-69g9xlRGstPNt7jIOlqM53Rs8jk5SkH2KVLQ8aLrXheYI8xqn/s1600/100.gif' style='border: 0; padding:0' title='đá một phát'/></a>
<a href='javascript: void(0);' onClick='document.getElementById("comments_input").value += ":F) ";'><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisGxaHe3__v3jFD7y3iMiuFVpmxMtld6nLYvyq9yfbtOcm0CtUHt2VC6IMKRaF63a2dITbHPDDzhyphenhyphenqFmboN7fBozjOYsIWaDxBtxhiUzXEM_CFnr0U0m7fJs3Su4zHk0jS-QGXk6_4e4OP/s1600/45.gif' style='border: 0; padding:0' title='cười lớn giơ răng'/></a>
<a href='javascript: void(0);' onClick='document.getElementById("comments_input").value += ":G) ";'><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiktX-xeLul2Kb_7vdjRW9a5wmQiIjZXyErZ6DMudzsr3Kx5lcITN4FmrZXLAbBduqFjuBQxTkiYtFjE9YA-rjRNov9IrIL2YZKwzQcE8iltieonbzqWKy00hiwg8ERuGGZyEv4w0C60d3G/s1600/77.gif' style='border: 0; padding:0' title='cụng ly'/></a>
<a href='javascript: void(0);' onClick='document.getElementById("comments_input").value += ":H) ";'><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvXdx90qkM9CZHxCAjowh8TlTUSwm6GqNyGxOBn-6TOSp48N7vUCoefP3_Kq5wWBmLxC3CwJofSR_qu2mY-FZRLVCJZOD0f88a7uNyeme42E5hJceJAvUVcYeDEgVq5KeMpOHwRZUygR5m/s1600/86.gif' style='border: 0; padding:0' title='chém gió'/></a>
<a href='javascript: void(0);' onClick='document.getElementById("comments_input").value += ":I) ";'><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0ANR2nhbxk4r7xHhtFYPv71CR8Yf-XubshTl20txI9LV8_frpLJFvHwNI8kuGFyd-nqapuf_XImZsjQHtXFWLOw_LMUw7m_kvEvu6sko8e9d1CsdT1JdUy0RHE3AH_pFF5s4eySoqWCYV/s1600/94.gif' style='border: 0; padding:0' title='bắt tay'/></a>
<a href='javascript: void(0);' onClick='document.getElementById("comments_input").value += ":J) ";'><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOUE_-VG9_2ic07yCv8kWRyLlWMI1nGrbNEYRshrsUCdaym66KIHPDayNV3mqQydxyQKdNL9Xec7v_i1_WjDWquTMVJE4sxhudL283l4VgRCaL0TIXyuZOZY771itzUhb_M2Vs3adzRyl_/s1600/83.gif' style='border: 0; padding:0' title='ăn ăn ăn'/></a>
<a href='javascript: void(0);' onClick='document.getElementById("comments_input").value += ":K) ";'><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhm4XCt5NUqnHhHaYvqWPw-H9cu5Lb8uoQhT2nQSCqPFslDc99VZndRJUz5Mbct4CvgGZshIehIsTlbmY6GJfv4A68aGOvqFojTLAVlu6HvoPXUT_-ot27cUvk_kSfVDxIGHL-GIYtyQnrz/s1600/59.gif' style='border: 0; padding:0' title='byyeee'/></a>
<a href='javascript: void(0);' onClick='document.getElementById("comments_input").value += ":L) ";'><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZDegHzFyFhzgawpn4B6THniWiJBRT51i39zCnKiDc5RSrBMhgVIYIJ0AiLMmhph7kTDjHlwMV_TwefldC0WuUD53IPnRFnB7UgzA5t6NOs0fjN-5rwXD340sVAPwUyRJs4RbW0f6Q4zp1/s1600/soldierbaby.gif' style='border: 0; padding:0' title='nhóc lính'/></a>
<a href='javascript: void(0);' onClick='document.getElementById("comments_input").value += ":M) ";'><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj03SgQ1GJz6O7z_i277fnCopJ5i68yPPfrnQhCjXp_Ml7F3IJs9h5Zrp9aHGMiIWoq5oV4nzjVzdsmOj1_x9pRBIOGyrgEQ5J1ryx5wYpYql-KR4jAI1euRYwuaLAG5L6SFzAmkDARmYwY/s1600/alo.gif' style='border: 0; padding:0' title='Alo'/></a>
<a href='javascript: void(0);' onClick='document.getElementById("comments_input").value += ":N) ";'><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJfSgJXH_v2rIIgj4oo7nzPCdWK7HOyKTbXiUA5Q5L4FXBfE8ZslndEznmhOzmgYlGf0uJvratoTMdFVOerZqcB2l5WaI3RPRFSF7L7bI-HSlD96p5wiahuGtSdBCKWNDqN_BsnX69ebhw/s1600/shutup.gif' style='border: 0; padding:0' title='Shup up'/></a>
<a href='javascript: void(0);' onClick='document.getElementById("comments_input").value += ":O) ";'><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjWn5KTxDvvw7n41DE5G6VGrDLGshAyfCoTTm9hbjBwHxLuxblCUkDCqM0fniu7IlVMgjgkeJvLSO1zo9PnfE-SOfamNsmAphQ6F6hvgFeoJlrMHw8oy0s1MCgVRYDHZFwBaeI6VuwKEu9/s1600/yeulam.gif' style='border: 0; padding:0' title='Yêu lắm đó'/></a>
<a href='javascript: void(0);' onClick='document.getElementById("comments_input").value += ":P) ";'><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwLkl5Bo84sg0FZy5b7TkjRkTjTYSy0oq94REQRD87ki8Fym8UmJS0ofBNC4OhkFIhueN329iZY9OmZyjpYkb-TIIAuOorrkOic1gw5Pv3e0ntfJVCccjiO7x1cJvUSA8dw-3i7oBkn4hM/s1600/datbomb.gif' style='border: 0; padding:0' title='Đặt bom'/></a>
</span>
<span id='smiley-toggle'><a href='javascript:moreSmilies()'>
More →</a></span>
<div class='text_style_wrap'>
<a href='javascript: void(0);' onClick='comments_B()'><span class='text_style'><b>Chữ đậm</b></span></a>
<a href='javascript: void(0);' onClick='comments_I()'><span class='text_style'><i>Chữ nghiêng</i></span></a>
<a href='javascript: void(0);' onClick='comments_EM()'><span class='text_style'><em>Chữ nghiêng 2</em></span></a>
<a href='javascript: void(0);' id='comments_HTML' onClick='comments_HTML()'><span class='text_style'>Chèn Link</span></a>
<a href='javascript: void(0);' id='comments_URL' onClick='comments_URL()'><span class='text_style'>Chèn Link</span></a>
<script type='text/javascript'>
function openup_parseHTML() { window.open("http://ha-escapexml.blogspot.com", "followblog", "height=540, width=450, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, directories=no, status=no" ); }
</script>
<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</span></a>
<a class='tooltip' href='javascript: void(0);'><b style='color:#F00'>Help ?</b><span class='help'>Nhấn vào biểu tượng hoặc kiểu chữ hoặc chèn link sau đó nhấn nút Chọn rồi copy (Ctrl + C) để paste (Ctrl + V) vào khung viết bình luận. Mã hóa code nếu bạn muốn đưa code vào bình luận.</span></a>
</div>
<form name='comments_form'>
<textarea cols='70' id='comments_input' rows='1' style='background: #F8F8FF;margin-bottom:7px'/>
<br/>
<a href='javascript: void(0);' onClick='document.getElementById("comments_input").select();'><span class='text_style'>Chọn</span></a>
<a href='javascript: void(0);' onClick='document.comments_form.reset();'><span class='text_style'>Xóa</span></a>
</form>
</div>
Lưu Template. Trên đây mình gắn sẳn 25 biểu tượng cảm xúc, nếu các bạn muốn thêm thì có thể tự nghiên cứu để gắn thêm vào, đảm bảo sự đồng nhất biểu tượng theo thứ tự ở Bước 1 và Bước 2. Những phần được đánh dấu màu đỏ là những phần bạn có thể tùy biến theo ý thích của mình.
THEO: THUTHUATBLOGGER.IFNO
Bạn có thể xem Demo ở phần viết bình luận của Thủ thuật Blogger.
Thủ thuật này đã kết hợp thủ thuật tạo bộ biểu tượng cảm xúc cho nhận xét vì thế nếu áp dụng thủ thuật này thì bạn cần tháo thủ thuật cũ liên quan (nếu đã cài đặt rồi) và thực hiện theo các bước sau đây:
Bước 1. Đăng nhập Blogger, vào Design >> Edit HTML, chọn Expand Widget Templates. Đặt đoạn code sau đây vào trước thẻ </body>. Đây là script chức năng cho bộ biểu tượng cảm xúc hoạt động.
<b:if cond='data:blog.pageType == "item"'>
<script type='text/javascript'>
//<![CDATA[
//Emoticons for Blogger Comments || Author: Huynh Nhat Ha || http://www.thuthuatblogger.info || © Copyright 2010
function emoticonBloggerHuynhNhatHa() {
if(!document.getElementById) {return;} // no support
bodyText = document.getElementById('comments-block');
theText = bodyText.innerHTML;
theText = theText.replace(/:1\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDJZpnmP15OSSymdfSK26rcR7-jNCra0z_iM13nMfXwX84Oyf2Q2Vm20_ZIiekdpjvWHLuduAk8kPgGtEWQYeT0M5lc6_MqDsTOTdPMdcQ_nCnFr1ifq3elLHBme3BkHqipGkWoI4WUM0y/s1600/49.gif" />');
theText = theText.replace(/:2\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJBwhB9uLTt1ZxfFQNY7uGwN2pkGgzUpEzOW8iztvsAFOLWqW40KzO1W2j0NVqamFISvMpyi7brzDZxRVoevGR19cwH8WKL7cY9ECMsaEL4A4mNHtx3VMqFmbkdlgUnxGE4lSgxQab6b-7/s1600/102.gif" />');
theText = theText.replace(/:3\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOvyegHVNfnWCT4lMHeGg168F9PpUvpjLtHJRV5RQvd05taW87FbgEVhFRxH39svKzIHyLvO2HnAY16EZSfO94kq_HaebLClDDHDxnCapFuVeoZc_aznsb1BQUN0kqO71jS3_QX9PLEjf2/s1600/113.gif" />');
theText = theText.replace(/:4\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5Ib_ZBY_MknIwkewY5EwiHRGPAmJn7U_inmKX_Ojv2OZI9UpIoP-9T_yN4v3yPEe1bLt2EK4IeRXhbQmEce2hVqXZv9xhtX5oHLoEuMZ4TUqDoIZvexz6AOvd5TILTHWUeyG5j02FZ82l/s1600/93.gif" />');
theText = theText.replace(/:5\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3ILIrbeoptdZ8fGP34RMVD5UXuG4EK0XatCvyoNEg2g_UW_cYnTCLvaST2R6Rhu4W4JHlpjuJ_Irw2AW03_xFOxTcfTVmSY8JWqIuXgcIlTRd6pSLW2xS8vg9FdP9E3kG7fPM2C16M4l-/s1600/61.gif" />');
theText = theText.replace(/:6\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBezHnSeogm9Bd3SikNi3otqy7oamn0Vz7BRSBs0RIZLpcOCIH4a9UdFvR_FjZYw2ZOdajbiqyMtDq31m5uqbi1HPQI6V4-nJbxBWW2WSfflD0NQNvE_GDwmXL8TPIxJl1VghtwvtQpgZK/s1600/134.gif" />');
theText = theText.replace(/:7\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsNnKgdYeNGmMwVzQgEC3R9oEsCphyphenhyphenBvzP_BJckNVb21Gbgx7_4hDhlgiMT_Umvf9s5HnZWVQtoKLYhI-UIDySSaaz3gNrbI-7GmVM2nm4WybVQXRq_pM3O1PDRnnyUiGrPpsbRlOJ_w64/s1600/39.gif" />');
theText = theText.replace(/:8\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXwN1piPG6_MhdgposoS-zndePugifCwFBqJv4kwbof5lrlXB2vsjMJpPp1AuQ3_C7ocO5rMjvHoyUxp8-Z6AI7oD5FukWjxByzouULb9_nZhqPbbUEPdYCYYJTRuOQ3z6G1Rm2vYy-qIJ/s1600/106.gif" />');
theText = theText.replace(/:9\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiy8Z_Zty0NORNVm9XkUwpxzuOrWTo9YVrxyJ9s7CXwHk_ItPdTRQyg2Ek3wDi4Lp-b0jQA8V3W4382Q7hLUytrP23Q5MidTcTv8z2Djj_GEH7ZSbJLb2vrwl7nMYQzFKnae5K6zU7SntQj/s1600/43.gif" />');
theText = theText.replace(/:A\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlYzEiBFsnswnHm0GI1Xvp_yTw-Lg4CBWEgx4eLRGOtqFLdtpDUyXPUxGvF7NhZyILrYsenS4uN7wmUWyl4pm79GyomKduN8MNauO4IrtRFhk1ZtE4uMSqFZIN6WHAVN6Rm_qQEDWcRWWe/s1600/111.gif" />');
theText = theText.replace(/:B\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZExEHPVir1hEf3AfIhbgIUl5LjFqVSUYHxFUyBq1sFWEM2-kKXOZjn2Gb0u8i_RUv7J6dz07ZmTC29r2dKTLiaCC_0m2AOTsHHo6FqkKkGwlV-DtV8c6G9bFcAGmZ6akDYvzLihv6NdfU/s1600/48.gif" />');
theText = theText.replace(/:C\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1iG00MRsSBhEadAP3mzWty5qpkAmd-q7X0QxZh61Q6HPn2YIEaJVeF6cmF0WODVVi8TLiFJk14tcheQDsMvEbe9Jp7ORGi-dwj75-oOUoQXhyFBp7QO4oZHVTH0QYerwnnOUHCgHnEkVz/s1600/54.gif" />');
theText = theText.replace(/:D\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7-cTf-h5i2-Me5ZxgZQSt50cqV_3RdE464u6ex6AXDJZYd_woKBQU95iHirA0O0OK7MACRZwR62kjlgQHc0ap8TFkMZdlyQO_d7yN_VtrK1SfPCwWp8-MOnvLFiP3X3QDaFREbe3khLiM/s1600/63.gif" />');
theText = theText.replace(/:E\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjZOBkzS1fJ4Z4IFe69DCqVHXw4nlp57AgiSondDMVB8rlwNG3R7zgiGO7yNC26KRPZ_ClZX3KRqs05rNMEXT2sf5Vdi-69g9xlRGstPNt7jIOlqM53Rs8jk5SkH2KVLQ8aLrXheYI8xqn/s1600/100.gif" />');
theText = theText.replace(/:F\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisGxaHe3__v3jFD7y3iMiuFVpmxMtld6nLYvyq9yfbtOcm0CtUHt2VC6IMKRaF63a2dITbHPDDzhyphenhyphenqFmboN7fBozjOYsIWaDxBtxhiUzXEM_CFnr0U0m7fJs3Su4zHk0jS-QGXk6_4e4OP/s1600/45.gif" />');
theText = theText.replace(/:G\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiktX-xeLul2Kb_7vdjRW9a5wmQiIjZXyErZ6DMudzsr3Kx5lcITN4FmrZXLAbBduqFjuBQxTkiYtFjE9YA-rjRNov9IrIL2YZKwzQcE8iltieonbzqWKy00hiwg8ERuGGZyEv4w0C60d3G/s1600/77.gif" />');
theText = theText.replace(/:H\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvXdx90qkM9CZHxCAjowh8TlTUSwm6GqNyGxOBn-6TOSp48N7vUCoefP3_Kq5wWBmLxC3CwJofSR_qu2mY-FZRLVCJZOD0f88a7uNyeme42E5hJceJAvUVcYeDEgVq5KeMpOHwRZUygR5m/s1600/86.gif" />');
theText = theText.replace(/:I\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0ANR2nhbxk4r7xHhtFYPv71CR8Yf-XubshTl20txI9LV8_frpLJFvHwNI8kuGFyd-nqapuf_XImZsjQHtXFWLOw_LMUw7m_kvEvu6sko8e9d1CsdT1JdUy0RHE3AH_pFF5s4eySoqWCYV/s1600/94.gif" />');
theText = theText.replace(/:J\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOUE_-VG9_2ic07yCv8kWRyLlWMI1nGrbNEYRshrsUCdaym66KIHPDayNV3mqQydxyQKdNL9Xec7v_i1_WjDWquTMVJE4sxhudL283l4VgRCaL0TIXyuZOZY771itzUhb_M2Vs3adzRyl_/s1600/83.gif" />');
theText = theText.replace(/:K\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhm4XCt5NUqnHhHaYvqWPw-H9cu5Lb8uoQhT2nQSCqPFslDc99VZndRJUz5Mbct4CvgGZshIehIsTlbmY6GJfv4A68aGOvqFojTLAVlu6HvoPXUT_-ot27cUvk_kSfVDxIGHL-GIYtyQnrz/s1600/59.gif" />');
theText = theText.replace(/:L\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZDegHzFyFhzgawpn4B6THniWiJBRT51i39zCnKiDc5RSrBMhgVIYIJ0AiLMmhph7kTDjHlwMV_TwefldC0WuUD53IPnRFnB7UgzA5t6NOs0fjN-5rwXD340sVAPwUyRJs4RbW0f6Q4zp1/s1600/soldierbaby.gif" />');
theText = theText.replace(/:M\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj03SgQ1GJz6O7z_i277fnCopJ5i68yPPfrnQhCjXp_Ml7F3IJs9h5Zrp9aHGMiIWoq5oV4nzjVzdsmOj1_x9pRBIOGyrgEQ5J1ryx5wYpYql-KR4jAI1euRYwuaLAG5L6SFzAmkDARmYwY/s1600/alo.gif" />');
theText = theText.replace(/:N\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJfSgJXH_v2rIIgj4oo7nzPCdWK7HOyKTbXiUA5Q5L4FXBfE8ZslndEznmhOzmgYlGf0uJvratoTMdFVOerZqcB2l5WaI3RPRFSF7L7bI-HSlD96p5wiahuGtSdBCKWNDqN_BsnX69ebhw/s1600/shutup.gif" />');
theText = theText.replace(/:O\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjWn5KTxDvvw7n41DE5G6VGrDLGshAyfCoTTm9hbjBwHxLuxblCUkDCqM0fniu7IlVMgjgkeJvLSO1zo9PnfE-SOfamNsmAphQ6F6hvgFeoJlrMHw8oy0s1MCgVRYDHZFwBaeI6VuwKEu9/s1600/yeulam.gif" />');
theText = theText.replace(/:P\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwLkl5Bo84sg0FZy5b7TkjRkTjTYSy0oq94REQRD87ki8Fym8UmJS0ofBNC4OhkFIhueN329iZY9OmZyjpYkb-TIIAuOorrkOic1gw5Pv3e0ntfJVCccjiO7x1cJvUSA8dw-3i7oBkn4hM/s1600/datbomb.gif" />');
bodyText.innerHTML = theText;}
//]]>
</script>
<script type='text/javascript'>
emoticonBloggerHuynhNhatHa();
</script>
</b:if>
Cần chú ý để chức năng biểu tượng cảm xúc hoạt động trong phần nhận xét thì bạn phải thay đổi ID comments-block cho phù hợp. ID này nằm trong một thẻ chỉ định thành phần chứa các dữ liệu của nhận xét, thẻ này thường nằm ngay trước dòng <b:loop values='data:post.comments' var='comment'>. Tùy theo cách đặt tên của người thiết kế Template mà id này có thể có tên khác nhau ví dụ: comments-block, comments-block3, comments_block, cm_block, commentsblock …
Bước 2. Tìm đến đoạn code như bên dưới. Đoạn code này biểu thị phần khung viết nhận xét.
<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%'/>
Đặt trước đoạn code trên bằng đoạn code bên dưới:
<script type='text/javascript'>
//<![CDATA[
// Script to insert Emoticons and Links on Blogspot Comments V1 by www.thuthuatblogger.info
function comments_URL() {
var r = prompt("Nhập địa chỉ trang", "http://");
var p = prompt("Nhập link text hiển thị", "Text");
if(r != "") ; if(p != ""){
document.getElementById('comments_input').value += "<a href='" + r + "' rel='nofollow'>" + p + "<\/a>";
} else {
alert("Bạn đã nhập xong dữ liệu");
}
}
function comments_HTML() {
document.getElementById('comments_input').value += '<a href=\'http://URL dẫn đến link \'>Trang<\/a>';
}
function comments_B() {
document.getElementById('comments_input').value += '<b><\/b>';
}
function comments_I() {
document.getElementById('comments_input').value += '<i><\/i>';
}
function comments_EM() {
document.getElementById('comments_input').value += '<em><\/em>';
}
function moreSmilies() {
document.getElementById('smiley-more').style.display = 'inline';
document.getElementById('smiley-toggle').innerHTML = '<a href="javascript:lessSmilies()">« Less</a></span>';
}
function lessSmilies() {
document.getElementById('smiley-more').style.display = 'none';
document.getElementById('smiley-toggle').innerHTML = '<a href="javascript:moreSmilies()">More »</a>';
}
//]]>
</script>
<style>
#comments_insert {padding:0;margin:0;width:600px;float:left;text-align: center}
#comments_insert img {padding:0;border:none;margin:2px}
.text_style_wrap {margin-top:10px;}
.text_style {border:1px solid #069;padding:3px;background: #d8eaee}
#comments_insert a {text-decoration:none}
#comments_HTML {display: none}
#comments_input {margin-top:10px}
.tooltip{outline:none;cursor:help;text-decoration:none;position:relative}
.tooltip span{margin-left:-999em;position:absolute}
.tooltip:hover span{border-radius:5px 5px;-moz-border-radius:5px;-webkit-border-radius:5px;box-shadow:5px 5px 5px rgba(0,0,0,0.1);-webkit-box-shadow:5px 5px rgba(0,0,0,0.1);-moz-box-shadow:5px 5px rgba(0,0,0,0.1);font-family:Calibri,Tahoma,Geneva,sans-serif;position:absolute;left:1em;top:2em;z-index:99;margin-left:0;width:300px}
.tooltip:hover img{border:0;margin:-10px 0 0 -55px;float:left;position:absolute}
.tooltip:hover em{font-family:Candara,Tahoma,Geneva,sans-serif;font-size:1.2em;font-weight:bold;display:block;padding:0.2em 0 0.6em 0}
.help{padding: 0.8em 1em; background: #FFCCAA; border: 1px solid #FF3334;text-align:justify;color:#000}
</style>
<!--[if IE]> <style> #comments_URL {display: none} #comments_HTML {display:inline} </style> <![endif]-->
<div id='comments_insert'>
<a href='javascript: void(0);' onClick='document.getElementById("comments_input").value += ":1) ";'><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDJZpnmP15OSSymdfSK26rcR7-jNCra0z_iM13nMfXwX84Oyf2Q2Vm20_ZIiekdpjvWHLuduAk8kPgGtEWQYeT0M5lc6_MqDsTOTdPMdcQ_nCnFr1ifq3elLHBme3BkHqipGkWoI4WUM0y/s1600/49.gif' style='border: 0; padding:0' title='hê hê hê'/></a>
<a href='javascript: void(0);' onClick='document.getElementById("comments_input").value += ":2) ";'><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJBwhB9uLTt1ZxfFQNY7uGwN2pkGgzUpEzOW8iztvsAFOLWqW40KzO1W2j0NVqamFISvMpyi7brzDZxRVoevGR19cwH8WKL7cY9ECMsaEL4A4mNHtx3VMqFmbkdlgUnxGE4lSgxQab6b-7/s1600/102.gif' style='border: 0; padding:0' title='hôn hôn'/></a>
<a href='javascript: void(0);' onClick='document.getElementById("comments_input").value += ":3) ";'><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOvyegHVNfnWCT4lMHeGg168F9PpUvpjLtHJRV5RQvd05taW87FbgEVhFRxH39svKzIHyLvO2HnAY16EZSfO94kq_HaebLClDDHDxnCapFuVeoZc_aznsb1BQUN0kqO71jS3_QX9PLEjf2/s1600/113.gif' style='border: 0; padding:0' title='ua ua ua'/></a>
<a href='javascript: void(0);' onClick='document.getElementById("comments_input").value += ":4) ";'><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5Ib_ZBY_MknIwkewY5EwiHRGPAmJn7U_inmKX_Ojv2OZI9UpIoP-9T_yN4v3yPEe1bLt2EK4IeRXhbQmEce2hVqXZv9xhtX5oHLoEuMZ4TUqDoIZvexz6AOvd5TILTHWUeyG5j02FZ82l/s1600/93.gif' style='border: 0; padding:0' title='nhìn nè'/></a>
<a href='javascript: void(0);' onClick='document.getElementById("comments_input").value += ":5) ";'><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3ILIrbeoptdZ8fGP34RMVD5UXuG4EK0XatCvyoNEg2g_UW_cYnTCLvaST2R6Rhu4W4JHlpjuJ_Irw2AW03_xFOxTcfTVmSY8JWqIuXgcIlTRd6pSLW2xS8vg9FdP9E3kG7fPM2C16M4l-/s1600/61.gif' style='border: 0; padding:0' title='vỗ tay'/></a>
<span id='smiley-more' style='display: none;'>
<a href='javascript: void(0);' onClick='document.getElementById("comments_input").value += ":6) ";'><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBezHnSeogm9Bd3SikNi3otqy7oamn0Vz7BRSBs0RIZLpcOCIH4a9UdFvR_FjZYw2ZOdajbiqyMtDq31m5uqbi1HPQI6V4-nJbxBWW2WSfflD0NQNvE_GDwmXL8TPIxJl1VghtwvtQpgZK/s1600/134.gif' style='border: 0; padding:0' title='tát bớp'/></a>
<a href='javascript: void(0);' onClick='document.getElementById("comments_input").value += ":7) ";'><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsNnKgdYeNGmMwVzQgEC3R9oEsCphyphenhyphenBvzP_BJckNVb21Gbgx7_4hDhlgiMT_Umvf9s5HnZWVQtoKLYhI-UIDySSaaz3gNrbI-7GmVM2nm4WybVQXRq_pM3O1PDRnnyUiGrPpsbRlOJ_w64/s1600/39.gif' style='border: 0; padding:0' title='rơi lệ'/></a>
<a href='javascript: void(0);' onClick='document.getElementById("comments_input").value += ":8) ";'><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXwN1piPG6_MhdgposoS-zndePugifCwFBqJv4kwbof5lrlXB2vsjMJpPp1AuQ3_C7ocO5rMjvHoyUxp8-Z6AI7oD5FukWjxByzouULb9_nZhqPbbUEPdYCYYJTRuOQ3z6G1Rm2vYy-qIJ/s1600/106.gif' style='border: 0; padding:0' title='money money'/></a>
<a href='javascript: void(0);' onClick='document.getElementById("comments_input").value += ":9) ";'><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiy8Z_Zty0NORNVm9XkUwpxzuOrWTo9YVrxyJ9s7CXwHk_ItPdTRQyg2Ek3wDi4Lp-b0jQA8V3W4382Q7hLUytrP23Q5MidTcTv8z2Djj_GEH7ZSbJLb2vrwl7nMYQzFKnae5K6zU7SntQj/s1600/43.gif' style='border: 0; padding:0' title='lêu lêu'/></a>
<a href='javascript: void(0);' onClick='document.getElementById("comments_input").value += ":A) ";'><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlYzEiBFsnswnHm0GI1Xvp_yTw-Lg4CBWEgx4eLRGOtqFLdtpDUyXPUxGvF7NhZyILrYsenS4uN7wmUWyl4pm79GyomKduN8MNauO4IrtRFhk1ZtE4uMSqFZIN6WHAVN6Rm_qQEDWcRWWe/s1600/111.gif' style='border: 0; padding:0' title='lắc đầu'/></a>
<a href='javascript: void(0);' onClick='document.getElementById("comments_input").value += ":B) ";'><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZExEHPVir1hEf3AfIhbgIUl5LjFqVSUYHxFUyBq1sFWEM2-kKXOZjn2Gb0u8i_RUv7J6dz07ZmTC29r2dKTLiaCC_0m2AOTsHHo6FqkKkGwlV-DtV8c6G9bFcAGmZ6akDYvzLihv6NdfU/s1600/48.gif' style='border: 0; padding:0' title='khóc ròng'/></a>
<a href='javascript: void(0);' onClick='document.getElementById("comments_input").value += ":C) ";'><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1iG00MRsSBhEadAP3mzWty5qpkAmd-q7X0QxZh61Q6HPn2YIEaJVeF6cmF0WODVVi8TLiFJk14tcheQDsMvEbe9Jp7ORGi-dwj75-oOUoQXhyFBp7QO4oZHVTH0QYerwnnOUHCgHnEkVz/s1600/54.gif' style='border: 0; padding:0' title='I don’t know'/></a>
<a href='javascript: void(0);' onClick='document.getElementById("comments_input").value += ":D) ";'><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7-cTf-h5i2-Me5ZxgZQSt50cqV_3RdE464u6ex6AXDJZYd_woKBQU95iHirA0O0OK7MACRZwR62kjlgQHc0ap8TFkMZdlyQO_d7yN_VtrK1SfPCwWp8-MOnvLFiP3X3QDaFREbe3khLiM/s1600/63.gif' style='border: 0; padding:0' title='hi hi hi'/></a>
<a href='javascript: void(0);' onClick='document.getElementById("comments_input").value += ":E) ";'><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjZOBkzS1fJ4Z4IFe69DCqVHXw4nlp57AgiSondDMVB8rlwNG3R7zgiGO7yNC26KRPZ_ClZX3KRqs05rNMEXT2sf5Vdi-69g9xlRGstPNt7jIOlqM53Rs8jk5SkH2KVLQ8aLrXheYI8xqn/s1600/100.gif' style='border: 0; padding:0' title='đá một phát'/></a>
<a href='javascript: void(0);' onClick='document.getElementById("comments_input").value += ":F) ";'><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisGxaHe3__v3jFD7y3iMiuFVpmxMtld6nLYvyq9yfbtOcm0CtUHt2VC6IMKRaF63a2dITbHPDDzhyphenhyphenqFmboN7fBozjOYsIWaDxBtxhiUzXEM_CFnr0U0m7fJs3Su4zHk0jS-QGXk6_4e4OP/s1600/45.gif' style='border: 0; padding:0' title='cười lớn giơ răng'/></a>
<a href='javascript: void(0);' onClick='document.getElementById("comments_input").value += ":G) ";'><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiktX-xeLul2Kb_7vdjRW9a5wmQiIjZXyErZ6DMudzsr3Kx5lcITN4FmrZXLAbBduqFjuBQxTkiYtFjE9YA-rjRNov9IrIL2YZKwzQcE8iltieonbzqWKy00hiwg8ERuGGZyEv4w0C60d3G/s1600/77.gif' style='border: 0; padding:0' title='cụng ly'/></a>
<a href='javascript: void(0);' onClick='document.getElementById("comments_input").value += ":H) ";'><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvXdx90qkM9CZHxCAjowh8TlTUSwm6GqNyGxOBn-6TOSp48N7vUCoefP3_Kq5wWBmLxC3CwJofSR_qu2mY-FZRLVCJZOD0f88a7uNyeme42E5hJceJAvUVcYeDEgVq5KeMpOHwRZUygR5m/s1600/86.gif' style='border: 0; padding:0' title='chém gió'/></a>
<a href='javascript: void(0);' onClick='document.getElementById("comments_input").value += ":I) ";'><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0ANR2nhbxk4r7xHhtFYPv71CR8Yf-XubshTl20txI9LV8_frpLJFvHwNI8kuGFyd-nqapuf_XImZsjQHtXFWLOw_LMUw7m_kvEvu6sko8e9d1CsdT1JdUy0RHE3AH_pFF5s4eySoqWCYV/s1600/94.gif' style='border: 0; padding:0' title='bắt tay'/></a>
<a href='javascript: void(0);' onClick='document.getElementById("comments_input").value += ":J) ";'><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOUE_-VG9_2ic07yCv8kWRyLlWMI1nGrbNEYRshrsUCdaym66KIHPDayNV3mqQydxyQKdNL9Xec7v_i1_WjDWquTMVJE4sxhudL283l4VgRCaL0TIXyuZOZY771itzUhb_M2Vs3adzRyl_/s1600/83.gif' style='border: 0; padding:0' title='ăn ăn ăn'/></a>
<a href='javascript: void(0);' onClick='document.getElementById("comments_input").value += ":K) ";'><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhm4XCt5NUqnHhHaYvqWPw-H9cu5Lb8uoQhT2nQSCqPFslDc99VZndRJUz5Mbct4CvgGZshIehIsTlbmY6GJfv4A68aGOvqFojTLAVlu6HvoPXUT_-ot27cUvk_kSfVDxIGHL-GIYtyQnrz/s1600/59.gif' style='border: 0; padding:0' title='byyeee'/></a>
<a href='javascript: void(0);' onClick='document.getElementById("comments_input").value += ":L) ";'><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZDegHzFyFhzgawpn4B6THniWiJBRT51i39zCnKiDc5RSrBMhgVIYIJ0AiLMmhph7kTDjHlwMV_TwefldC0WuUD53IPnRFnB7UgzA5t6NOs0fjN-5rwXD340sVAPwUyRJs4RbW0f6Q4zp1/s1600/soldierbaby.gif' style='border: 0; padding:0' title='nhóc lính'/></a>
<a href='javascript: void(0);' onClick='document.getElementById("comments_input").value += ":M) ";'><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj03SgQ1GJz6O7z_i277fnCopJ5i68yPPfrnQhCjXp_Ml7F3IJs9h5Zrp9aHGMiIWoq5oV4nzjVzdsmOj1_x9pRBIOGyrgEQ5J1ryx5wYpYql-KR4jAI1euRYwuaLAG5L6SFzAmkDARmYwY/s1600/alo.gif' style='border: 0; padding:0' title='Alo'/></a>
<a href='javascript: void(0);' onClick='document.getElementById("comments_input").value += ":N) ";'><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJfSgJXH_v2rIIgj4oo7nzPCdWK7HOyKTbXiUA5Q5L4FXBfE8ZslndEznmhOzmgYlGf0uJvratoTMdFVOerZqcB2l5WaI3RPRFSF7L7bI-HSlD96p5wiahuGtSdBCKWNDqN_BsnX69ebhw/s1600/shutup.gif' style='border: 0; padding:0' title='Shup up'/></a>
<a href='javascript: void(0);' onClick='document.getElementById("comments_input").value += ":O) ";'><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjWn5KTxDvvw7n41DE5G6VGrDLGshAyfCoTTm9hbjBwHxLuxblCUkDCqM0fniu7IlVMgjgkeJvLSO1zo9PnfE-SOfamNsmAphQ6F6hvgFeoJlrMHw8oy0s1MCgVRYDHZFwBaeI6VuwKEu9/s1600/yeulam.gif' style='border: 0; padding:0' title='Yêu lắm đó'/></a>
<a href='javascript: void(0);' onClick='document.getElementById("comments_input").value += ":P) ";'><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwLkl5Bo84sg0FZy5b7TkjRkTjTYSy0oq94REQRD87ki8Fym8UmJS0ofBNC4OhkFIhueN329iZY9OmZyjpYkb-TIIAuOorrkOic1gw5Pv3e0ntfJVCccjiO7x1cJvUSA8dw-3i7oBkn4hM/s1600/datbomb.gif' style='border: 0; padding:0' title='Đặt bom'/></a>
</span>
<span id='smiley-toggle'><a href='javascript:moreSmilies()'>
More →</a></span>
<div class='text_style_wrap'>
<a href='javascript: void(0);' onClick='comments_B()'><span class='text_style'><b>Chữ đậm</b></span></a>
<a href='javascript: void(0);' onClick='comments_I()'><span class='text_style'><i>Chữ nghiêng</i></span></a>
<a href='javascript: void(0);' onClick='comments_EM()'><span class='text_style'><em>Chữ nghiêng 2</em></span></a>
<a href='javascript: void(0);' id='comments_HTML' onClick='comments_HTML()'><span class='text_style'>Chèn Link</span></a>
<a href='javascript: void(0);' id='comments_URL' onClick='comments_URL()'><span class='text_style'>Chèn Link</span></a>
<script type='text/javascript'>
function openup_parseHTML() { window.open("http://ha-escapexml.blogspot.com", "followblog", "height=540, width=450, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, directories=no, status=no" ); }
</script>
<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</span></a>
<a class='tooltip' href='javascript: void(0);'><b style='color:#F00'>Help ?</b><span class='help'>Nhấn vào biểu tượng hoặc kiểu chữ hoặc chèn link sau đó nhấn nút Chọn rồi copy (Ctrl + C) để paste (Ctrl + V) vào khung viết bình luận. Mã hóa code nếu bạn muốn đưa code vào bình luận.</span></a>
</div>
<form name='comments_form'>
<textarea cols='70' id='comments_input' rows='1' style='background: #F8F8FF;margin-bottom:7px'/>
<br/>
<a href='javascript: void(0);' onClick='document.getElementById("comments_input").select();'><span class='text_style'>Chọn</span></a>
<a href='javascript: void(0);' onClick='document.comments_form.reset();'><span class='text_style'>Xóa</span></a>
</form>
</div>
Lưu Template. Trên đây mình gắn sẳn 25 biểu tượng cảm xúc, nếu các bạn muốn thêm thì có thể tự nghiên cứu để gắn thêm vào, đảm bảo sự đồng nhất biểu tượng theo thứ tự ở Bước 1 và Bước 2. Những phần được đánh dấu màu đỏ là những phần bạn có thể tùy biến theo ý thích của mình.
THEO: THUTHUATBLOGGER.IFNO
Comments[ 0 ]
Đăng nhận xét