Chèn biểu tượng cảm xúc vào nhận xét dạng input
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/AVvXsEjVq_AnjEcxQosz33sKUqC_9-EQuOtBb-oXVDRT39nT2jDIh4NuS40bUTGfUvyIvaxIPgUhbZL73UJfUPdw0nAHKqWQOc13pfyshuJ1F74SZU7yodrs2PDX7J8_XT5g4kdRNnKoVHHX51_E/s1600/49.gif" />');
theText = theText.replace(/:2\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj97ALDrWn1XNXH9WG0EYg0kCLytPgk5zTDTPhbemy-ZKklzizWngJx09SfxWKFy5rDS1SjxWvqbl-cgi4NsWMNiN4O3yF8ImUDljTTu3jU52KUzEhrW4GAFDUAkv-WH8cfCCwuwMIhmQaM/s1600/102.gif" />');
theText = theText.replace(/:3\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOkjs6_UsXZxGXQ8M7ZDw4vLQbRguZWzAUP8QzeTaT0dWtxphX1-szvKfqDUco4lXVwcDkYHTnPwahmCe8iFT1YNP0z_YM-yVM2GorXSBO2UxGJz2AklwoRdXq_J551BvoTXmjmuC-jRzC/s1600/113.gif" />');
theText = theText.replace(/:4\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiH7RFSzhN0cY60BjzhFwJld1CzXG1QGVJl3z93Ran853LiCriLjuBX34Bd91EodMoKMm0PvSQ6t4dWAAKnA3WqO9CIdkDrZdQQHDdCTLefRJZ2N-Va22GF0wLeANRQNKIJtkdjAQ80SEBU/s1600/93.gif" />');
theText = theText.replace(/:5\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhY78V2oHn2QVEXZ8uqBsTp7Y1iV_eeP1bnfW07IMw2MkX8tCnSfjCPfy9rQ85gjryqtwWYulE6A6obX2TErq2GK1nKBzelaUYmx8Ay7vzoC1R0kech8coQvVIWLp8oWrc-_z8BKpiiwJ9z/s1600/61.gif" />');
theText = theText.replace(/:6\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgH33kHnc12GdYkkP5p4K4al4AoRJThXIYwhmwQ7WabVLRngGb-yeSgm8auuSEmtRgTGyxa3meKu5wFsiZAPC9CzijkI-eFCWLhDBbnPifNRUtrg1f2Gs3FblQdvUi8m-45niufC0vaZn9e/s1600/134.gif" />');
theText = theText.replace(/:7\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaUA9Qm2Gy6XB0SZpEBCZEjhrDJ73qb_bAogm7cbp8VXtzOJC6ev4EqFW5P8vthFODs6ulR6E8YcL8Z_AAgwd3PrtWwIMXKA9xJLopWJmKDP4YXvz9XmhSq6BNEyWM_7ygbnBK2-lKU0eJ/s1600/39.gif" />');
theText = theText.replace(/:8\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOlyk1lRz00t2gi1LhqEmgPeG7ODVSpx-ymFwqsmxFtWJhGQhrEKwiy_XgQXWerhIiHpDaUyJTvvEWgy4dScsggrGTxOnLJ-7hokb03qLg_DKKfCvYDXZ8ZoJhcKDKCEIQCuyAUjyWVO8x/s1600/106.gif" />');
theText = theText.replace(/:9\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-QXsDcVzdoNgZcdNKi-xxVWkHyNIWIpEFBeSPSXdsV6ofu_hEsrAfZO7txTMIwBwxgDMAyLQFu8s8jr2-sGZ6Bn0slQR358VgYfHlsR9vR6Mhw3tiLYyentNtaHy0EuCroAICCMGwTIX-/s1600/43.gif" />');
theText = theText.replace(/:A\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkkOGOjjICkOZ9QJza_OlT5NjkmaibgLM__Uf94nxtTBOJYiX3h6OqXlLaqduCBXb2OCmBkMtdST4YDEZrssrMW2sZ5Ar1PH413E0ElN-cBJdIYqRrz0_pqvVHozP70TCphncGXFEOfnMl/s1600/111.gif" />');
theText = theText.replace(/:B\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaol5Qe3SpMCSSWDqcvycaHr5MIUv3aeSaJN6kjVhpgFfmgL4HL0l0hbxBaWwMhSo31bp4VAyRrjaw3I4VfNxJKGjnHXg7lknDMfo6Sl6x8YCetV7OwWxlrF3KlPjZmO3a9N3-0osfufH7/s1600/48.gif" />');
theText = theText.replace(/:C\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpb6C1y258b-t7wWcfmPSJKeBzZr0kHLFYtPU4dZp1R8Ejjf8eSIP-mWJ7aricdjQ78Zmf5cPNVLyKraUGpGGUVlJQ6i3-Xnth9cUFzQ7RF9EXXbNGCWCuGjWJeGorlYTypboBufmmoRVb/s1600/54.gif" />');
theText = theText.replace(/:D\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEieUo2jdt-EnUrVu9ZkFf0M6BT6QxCnleiqGhIrI4Ps3j8lEqGcF61nU1II1u8DwLQKxqEM5Qc81_ztodWAMbeEzAoSAMsCTsPk1OdXGxqV3BIP_acqiQl6unruyLlbhCjqjtbedGQmAufe/s1600/63.gif" />');
theText = theText.replace(/:E\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKn3hYhHLQG_f3ixa_YtDbrdHC0bie8E_61fA9_os2Pw_xkNyJqAe8XZQJdUXQpsG9h_05qA_Pa6Fml1uBi2bBtBJvdUcqhxpEnK4FQYAEWdTUCwJfiTFk7BZMp4hpILbdkIdGR4Yq-p40/s1600/100.gif" />');
theText = theText.replace(/:F\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKNz3cPwktU5y1XQMhIMMvHntE831oROIlOFwiNqgTFOlF8INid1g1yHTv-mOC3Ci-kSZx14vJUkj4b7K4Ib9uv62llj52cNfQoIsE_vd0Fb8RNeKdUTjoE2WEz_fjCtaZSReeS5fnzEXy/s1600/45.gif" />');
theText = theText.replace(/:G\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhh8LSC4P-5BC-rysNsB6kD7dIV6HN438zWmh8lcxCUtuyb1qp0b80zl16uGnd4Wrur6VmuB2rw39R98Yc7JNLWx7cBeNNaHiXD7Sq0bWvPyQJ7jT-4H9yvdR1gYiYF6nBLoGv8Sq6VEQ4T/s1600/77.gif" />');
theText = theText.replace(/:H\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2BQ4UIqcJQil_mmOZ0ZjzU6PlnsAQh4njnVYPxvPFgbCR-700ARtuwkULfUhxy1XfehD4Y3713VlS61bbgQiiCKzDqHnPUsEikdkDF7p2hV6v_nDvU422M_0czJEVbGadeL2HlqOrQuEB/s1600/86.gif" />');
theText = theText.replace(/:I\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgOKKrqhDcbnFa_DyN9AKors-zy465rMq9oufFVOP4inZeXw-oiu8ux6-0Yh8KCt_xOYNGIWo1etv7fGaP7BAs7ceZ89nvVY_kTRL286wtjv4uAdY2FVi84HV0x4-RVIyMDnHhbwcFqkiz/s1600/94.gif" />');
theText = theText.replace(/:J\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1pUwC1jJyk-3sNy71BoGePCa70etIlC_SzDRS87yEOiP1vE3Cf7HLvbhjrkNdBRBzjAm7jCKi5ILoN_j2EcRcdLerw7Vlisg7JNb0PW-LG5iGRorYY_ui-5n4YHy2SXBkVLIRUwKccLVk/s1600/83.gif" />');
theText = theText.replace(/:K\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxgMa7O8Og1OhQQ7_PPX_aOKP09iDE5tYDYrdNPXhIWJldmYJF0VokWqIPRpEOfHmswt8OtWQ_C3YmfR1wE2b5xwcX-TKqFOMNiASfVftxlXghM_-szHtsJAf5LUv_9eNlyKjwbr6MmKOc/s1600/59.gif" />');
theText = theText.replace(/:L\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfAMSgPMIOIHXTJ0tErYInaqaZiE_nFefyi5HwoToHz7SDC_erTYAJQcgi92hrmhcn-m0kLKLYTUr-tVOAcFMSTAVPsxbhyphenhyphenWdvStQyEQLi8IMqW1A_JH1b8TsIiAWV-0UFbuGYcLX6H3Ed/s1600/soldierbaby.gif" />');
theText = theText.replace(/:M\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcPUeLd50i_es4WwT4yFXiyNIkKiCIErkclg5-kuuuDqNAQYLDRf6AfSjagTq4XF9w3IVHjcxOa-wX-8iHz3rtU9uWDs2T16yHwwxqEj83ijbLcnq7GgPPbsxbnbcke_wB_tT_wskPWVyG/s1600/alo.gif" />');
theText = theText.replace(/:N\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4eEdjfQT5gzODhyphenhyphenlyTx44ZXtMU9_YR_zy44R3B-7stb13d1dBGqitJ3COSbfATvWiY7fqTC8HNaxXREWG4wgs4TVl7QIDVOQmim-RiVATqHN2B3iX5k6iVh5X-bITQH29H9DmuDJgJ90Z/s1600/shutup.gif" />');
theText = theText.replace(/:O\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvcHBqx6bOw6pS1JBsspX4KpyurJLpuxFrUBSV1ikFVhokbRECyqZBrD1JFWPmS1MdXiZMg4aIkP-Z-c9w9LCUf_M-_Sv-ERMSevOF2-alYLFTuyWoGwc_eYwtBnNJxYG9OLmjJUVT7nQI/s1600/yeulam.gif" />');
theText = theText.replace(/:P\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeMlJaJsz00I1F1KB_YoidbUHIoekrvhdI8-bbRl0H3o2ND8CWcnQK3Kl_LKDxU9-1Un8BM9kQ1cJRpwPk_rimIkNe4teUgh5S4n5KwJiIayqonv8eHYrqGIuO6kSSfsjR2dGfehw7JWjQ/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/AVvXsEjVq_AnjEcxQosz33sKUqC_9-EQuOtBb-oXVDRT39nT2jDIh4NuS40bUTGfUvyIvaxIPgUhbZL73UJfUPdw0nAHKqWQOc13pfyshuJ1F74SZU7yodrs2PDX7J8_XT5g4kdRNnKoVHHX51_E/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/AVvXsEj97ALDrWn1XNXH9WG0EYg0kCLytPgk5zTDTPhbemy-ZKklzizWngJx09SfxWKFy5rDS1SjxWvqbl-cgi4NsWMNiN4O3yF8ImUDljTTu3jU52KUzEhrW4GAFDUAkv-WH8cfCCwuwMIhmQaM/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/AVvXsEhOkjs6_UsXZxGXQ8M7ZDw4vLQbRguZWzAUP8QzeTaT0dWtxphX1-szvKfqDUco4lXVwcDkYHTnPwahmCe8iFT1YNP0z_YM-yVM2GorXSBO2UxGJz2AklwoRdXq_J551BvoTXmjmuC-jRzC/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/AVvXsEiH7RFSzhN0cY60BjzhFwJld1CzXG1QGVJl3z93Ran853LiCriLjuBX34Bd91EodMoKMm0PvSQ6t4dWAAKnA3WqO9CIdkDrZdQQHDdCTLefRJZ2N-Va22GF0wLeANRQNKIJtkdjAQ80SEBU/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/AVvXsEhY78V2oHn2QVEXZ8uqBsTp7Y1iV_eeP1bnfW07IMw2MkX8tCnSfjCPfy9rQ85gjryqtwWYulE6A6obX2TErq2GK1nKBzelaUYmx8Ay7vzoC1R0kech8coQvVIWLp8oWrc-_z8BKpiiwJ9z/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/AVvXsEgH33kHnc12GdYkkP5p4K4al4AoRJThXIYwhmwQ7WabVLRngGb-yeSgm8auuSEmtRgTGyxa3meKu5wFsiZAPC9CzijkI-eFCWLhDBbnPifNRUtrg1f2Gs3FblQdvUi8m-45niufC0vaZn9e/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/AVvXsEhaUA9Qm2Gy6XB0SZpEBCZEjhrDJ73qb_bAogm7cbp8VXtzOJC6ev4EqFW5P8vthFODs6ulR6E8YcL8Z_AAgwd3PrtWwIMXKA9xJLopWJmKDP4YXvz9XmhSq6BNEyWM_7ygbnBK2-lKU0eJ/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/AVvXsEjOlyk1lRz00t2gi1LhqEmgPeG7ODVSpx-ymFwqsmxFtWJhGQhrEKwiy_XgQXWerhIiHpDaUyJTvvEWgy4dScsggrGTxOnLJ-7hokb03qLg_DKKfCvYDXZ8ZoJhcKDKCEIQCuyAUjyWVO8x/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/AVvXsEj-QXsDcVzdoNgZcdNKi-xxVWkHyNIWIpEFBeSPSXdsV6ofu_hEsrAfZO7txTMIwBwxgDMAyLQFu8s8jr2-sGZ6Bn0slQR358VgYfHlsR9vR6Mhw3tiLYyentNtaHy0EuCroAICCMGwTIX-/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/AVvXsEgkkOGOjjICkOZ9QJza_OlT5NjkmaibgLM__Uf94nxtTBOJYiX3h6OqXlLaqduCBXb2OCmBkMtdST4YDEZrssrMW2sZ5Ar1PH413E0ElN-cBJdIYqRrz0_pqvVHozP70TCphncGXFEOfnMl/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/AVvXsEgaol5Qe3SpMCSSWDqcvycaHr5MIUv3aeSaJN6kjVhpgFfmgL4HL0l0hbxBaWwMhSo31bp4VAyRrjaw3I4VfNxJKGjnHXg7lknDMfo6Sl6x8YCetV7OwWxlrF3KlPjZmO3a9N3-0osfufH7/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/AVvXsEgpb6C1y258b-t7wWcfmPSJKeBzZr0kHLFYtPU4dZp1R8Ejjf8eSIP-mWJ7aricdjQ78Zmf5cPNVLyKraUGpGGUVlJQ6i3-Xnth9cUFzQ7RF9EXXbNGCWCuGjWJeGorlYTypboBufmmoRVb/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/AVvXsEieUo2jdt-EnUrVu9ZkFf0M6BT6QxCnleiqGhIrI4Ps3j8lEqGcF61nU1II1u8DwLQKxqEM5Qc81_ztodWAMbeEzAoSAMsCTsPk1OdXGxqV3BIP_acqiQl6unruyLlbhCjqjtbedGQmAufe/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/AVvXsEjKn3hYhHLQG_f3ixa_YtDbrdHC0bie8E_61fA9_os2Pw_xkNyJqAe8XZQJdUXQpsG9h_05qA_Pa6Fml1uBi2bBtBJvdUcqhxpEnK4FQYAEWdTUCwJfiTFk7BZMp4hpILbdkIdGR4Yq-p40/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/AVvXsEgKNz3cPwktU5y1XQMhIMMvHntE831oROIlOFwiNqgTFOlF8INid1g1yHTv-mOC3Ci-kSZx14vJUkj4b7K4Ib9uv62llj52cNfQoIsE_vd0Fb8RNeKdUTjoE2WEz_fjCtaZSReeS5fnzEXy/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/AVvXsEhh8LSC4P-5BC-rysNsB6kD7dIV6HN438zWmh8lcxCUtuyb1qp0b80zl16uGnd4Wrur6VmuB2rw39R98Yc7JNLWx7cBeNNaHiXD7Sq0bWvPyQJ7jT-4H9yvdR1gYiYF6nBLoGv8Sq6VEQ4T/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/AVvXsEj2BQ4UIqcJQil_mmOZ0ZjzU6PlnsAQh4njnVYPxvPFgbCR-700ARtuwkULfUhxy1XfehD4Y3713VlS61bbgQiiCKzDqHnPUsEikdkDF7p2hV6v_nDvU422M_0czJEVbGadeL2HlqOrQuEB/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/AVvXsEhgOKKrqhDcbnFa_DyN9AKors-zy465rMq9oufFVOP4inZeXw-oiu8ux6-0Yh8KCt_xOYNGIWo1etv7fGaP7BAs7ceZ89nvVY_kTRL286wtjv4uAdY2FVi84HV0x4-RVIyMDnHhbwcFqkiz/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/AVvXsEg1pUwC1jJyk-3sNy71BoGePCa70etIlC_SzDRS87yEOiP1vE3Cf7HLvbhjrkNdBRBzjAm7jCKi5ILoN_j2EcRcdLerw7Vlisg7JNb0PW-LG5iGRorYY_ui-5n4YHy2SXBkVLIRUwKccLVk/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/AVvXsEjxgMa7O8Og1OhQQ7_PPX_aOKP09iDE5tYDYrdNPXhIWJldmYJF0VokWqIPRpEOfHmswt8OtWQ_C3YmfR1wE2b5xwcX-TKqFOMNiASfVftxlXghM_-szHtsJAf5LUv_9eNlyKjwbr6MmKOc/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/AVvXsEgfAMSgPMIOIHXTJ0tErYInaqaZiE_nFefyi5HwoToHz7SDC_erTYAJQcgi92hrmhcn-m0kLKLYTUr-tVOAcFMSTAVPsxbhyphenhyphenWdvStQyEQLi8IMqW1A_JH1b8TsIiAWV-0UFbuGYcLX6H3Ed/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/AVvXsEgcPUeLd50i_es4WwT4yFXiyNIkKiCIErkclg5-kuuuDqNAQYLDRf6AfSjagTq4XF9w3IVHjcxOa-wX-8iHz3rtU9uWDs2T16yHwwxqEj83ijbLcnq7GgPPbsxbnbcke_wB_tT_wskPWVyG/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/AVvXsEh4eEdjfQT5gzODhyphenhyphenlyTx44ZXtMU9_YR_zy44R3B-7stb13d1dBGqitJ3COSbfATvWiY7fqTC8HNaxXREWG4wgs4TVl7QIDVOQmim-RiVATqHN2B3iX5k6iVh5X-bITQH29H9DmuDJgJ90Z/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/AVvXsEhvcHBqx6bOw6pS1JBsspX4KpyurJLpuxFrUBSV1ikFVhokbRECyqZBrD1JFWPmS1MdXiZMg4aIkP-Z-c9w9LCUf_M-_Sv-ERMSevOF2-alYLFTuyWoGwc_eYwtBnNJxYG9OLmjJUVT7nQI/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/AVvXsEjeMlJaJsz00I1F1KB_YoidbUHIoekrvhdI8-bbRl0H3o2ND8CWcnQK3Kl_LKDxU9-1Un8BM9kQ1cJRpwPk_rimIkNe4teUgh5S4n5KwJiIayqonv8eHYrqGIuO6kSSfsjR2dGfehw7JWjQ/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/AVvXsEjVq_AnjEcxQosz33sKUqC_9-EQuOtBb-oXVDRT39nT2jDIh4NuS40bUTGfUvyIvaxIPgUhbZL73UJfUPdw0nAHKqWQOc13pfyshuJ1F74SZU7yodrs2PDX7J8_XT5g4kdRNnKoVHHX51_E/s1600/49.gif" />');
theText = theText.replace(/:2\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj97ALDrWn1XNXH9WG0EYg0kCLytPgk5zTDTPhbemy-ZKklzizWngJx09SfxWKFy5rDS1SjxWvqbl-cgi4NsWMNiN4O3yF8ImUDljTTu3jU52KUzEhrW4GAFDUAkv-WH8cfCCwuwMIhmQaM/s1600/102.gif" />');
theText = theText.replace(/:3\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOkjs6_UsXZxGXQ8M7ZDw4vLQbRguZWzAUP8QzeTaT0dWtxphX1-szvKfqDUco4lXVwcDkYHTnPwahmCe8iFT1YNP0z_YM-yVM2GorXSBO2UxGJz2AklwoRdXq_J551BvoTXmjmuC-jRzC/s1600/113.gif" />');
theText = theText.replace(/:4\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiH7RFSzhN0cY60BjzhFwJld1CzXG1QGVJl3z93Ran853LiCriLjuBX34Bd91EodMoKMm0PvSQ6t4dWAAKnA3WqO9CIdkDrZdQQHDdCTLefRJZ2N-Va22GF0wLeANRQNKIJtkdjAQ80SEBU/s1600/93.gif" />');
theText = theText.replace(/:5\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhY78V2oHn2QVEXZ8uqBsTp7Y1iV_eeP1bnfW07IMw2MkX8tCnSfjCPfy9rQ85gjryqtwWYulE6A6obX2TErq2GK1nKBzelaUYmx8Ay7vzoC1R0kech8coQvVIWLp8oWrc-_z8BKpiiwJ9z/s1600/61.gif" />');
theText = theText.replace(/:6\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgH33kHnc12GdYkkP5p4K4al4AoRJThXIYwhmwQ7WabVLRngGb-yeSgm8auuSEmtRgTGyxa3meKu5wFsiZAPC9CzijkI-eFCWLhDBbnPifNRUtrg1f2Gs3FblQdvUi8m-45niufC0vaZn9e/s1600/134.gif" />');
theText = theText.replace(/:7\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaUA9Qm2Gy6XB0SZpEBCZEjhrDJ73qb_bAogm7cbp8VXtzOJC6ev4EqFW5P8vthFODs6ulR6E8YcL8Z_AAgwd3PrtWwIMXKA9xJLopWJmKDP4YXvz9XmhSq6BNEyWM_7ygbnBK2-lKU0eJ/s1600/39.gif" />');
theText = theText.replace(/:8\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOlyk1lRz00t2gi1LhqEmgPeG7ODVSpx-ymFwqsmxFtWJhGQhrEKwiy_XgQXWerhIiHpDaUyJTvvEWgy4dScsggrGTxOnLJ-7hokb03qLg_DKKfCvYDXZ8ZoJhcKDKCEIQCuyAUjyWVO8x/s1600/106.gif" />');
theText = theText.replace(/:9\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-QXsDcVzdoNgZcdNKi-xxVWkHyNIWIpEFBeSPSXdsV6ofu_hEsrAfZO7txTMIwBwxgDMAyLQFu8s8jr2-sGZ6Bn0slQR358VgYfHlsR9vR6Mhw3tiLYyentNtaHy0EuCroAICCMGwTIX-/s1600/43.gif" />');
theText = theText.replace(/:A\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkkOGOjjICkOZ9QJza_OlT5NjkmaibgLM__Uf94nxtTBOJYiX3h6OqXlLaqduCBXb2OCmBkMtdST4YDEZrssrMW2sZ5Ar1PH413E0ElN-cBJdIYqRrz0_pqvVHozP70TCphncGXFEOfnMl/s1600/111.gif" />');
theText = theText.replace(/:B\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaol5Qe3SpMCSSWDqcvycaHr5MIUv3aeSaJN6kjVhpgFfmgL4HL0l0hbxBaWwMhSo31bp4VAyRrjaw3I4VfNxJKGjnHXg7lknDMfo6Sl6x8YCetV7OwWxlrF3KlPjZmO3a9N3-0osfufH7/s1600/48.gif" />');
theText = theText.replace(/:C\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpb6C1y258b-t7wWcfmPSJKeBzZr0kHLFYtPU4dZp1R8Ejjf8eSIP-mWJ7aricdjQ78Zmf5cPNVLyKraUGpGGUVlJQ6i3-Xnth9cUFzQ7RF9EXXbNGCWCuGjWJeGorlYTypboBufmmoRVb/s1600/54.gif" />');
theText = theText.replace(/:D\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEieUo2jdt-EnUrVu9ZkFf0M6BT6QxCnleiqGhIrI4Ps3j8lEqGcF61nU1II1u8DwLQKxqEM5Qc81_ztodWAMbeEzAoSAMsCTsPk1OdXGxqV3BIP_acqiQl6unruyLlbhCjqjtbedGQmAufe/s1600/63.gif" />');
theText = theText.replace(/:E\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKn3hYhHLQG_f3ixa_YtDbrdHC0bie8E_61fA9_os2Pw_xkNyJqAe8XZQJdUXQpsG9h_05qA_Pa6Fml1uBi2bBtBJvdUcqhxpEnK4FQYAEWdTUCwJfiTFk7BZMp4hpILbdkIdGR4Yq-p40/s1600/100.gif" />');
theText = theText.replace(/:F\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKNz3cPwktU5y1XQMhIMMvHntE831oROIlOFwiNqgTFOlF8INid1g1yHTv-mOC3Ci-kSZx14vJUkj4b7K4Ib9uv62llj52cNfQoIsE_vd0Fb8RNeKdUTjoE2WEz_fjCtaZSReeS5fnzEXy/s1600/45.gif" />');
theText = theText.replace(/:G\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhh8LSC4P-5BC-rysNsB6kD7dIV6HN438zWmh8lcxCUtuyb1qp0b80zl16uGnd4Wrur6VmuB2rw39R98Yc7JNLWx7cBeNNaHiXD7Sq0bWvPyQJ7jT-4H9yvdR1gYiYF6nBLoGv8Sq6VEQ4T/s1600/77.gif" />');
theText = theText.replace(/:H\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2BQ4UIqcJQil_mmOZ0ZjzU6PlnsAQh4njnVYPxvPFgbCR-700ARtuwkULfUhxy1XfehD4Y3713VlS61bbgQiiCKzDqHnPUsEikdkDF7p2hV6v_nDvU422M_0czJEVbGadeL2HlqOrQuEB/s1600/86.gif" />');
theText = theText.replace(/:I\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgOKKrqhDcbnFa_DyN9AKors-zy465rMq9oufFVOP4inZeXw-oiu8ux6-0Yh8KCt_xOYNGIWo1etv7fGaP7BAs7ceZ89nvVY_kTRL286wtjv4uAdY2FVi84HV0x4-RVIyMDnHhbwcFqkiz/s1600/94.gif" />');
theText = theText.replace(/:J\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1pUwC1jJyk-3sNy71BoGePCa70etIlC_SzDRS87yEOiP1vE3Cf7HLvbhjrkNdBRBzjAm7jCKi5ILoN_j2EcRcdLerw7Vlisg7JNb0PW-LG5iGRorYY_ui-5n4YHy2SXBkVLIRUwKccLVk/s1600/83.gif" />');
theText = theText.replace(/:K\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxgMa7O8Og1OhQQ7_PPX_aOKP09iDE5tYDYrdNPXhIWJldmYJF0VokWqIPRpEOfHmswt8OtWQ_C3YmfR1wE2b5xwcX-TKqFOMNiASfVftxlXghM_-szHtsJAf5LUv_9eNlyKjwbr6MmKOc/s1600/59.gif" />');
theText = theText.replace(/:L\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfAMSgPMIOIHXTJ0tErYInaqaZiE_nFefyi5HwoToHz7SDC_erTYAJQcgi92hrmhcn-m0kLKLYTUr-tVOAcFMSTAVPsxbhyphenhyphenWdvStQyEQLi8IMqW1A_JH1b8TsIiAWV-0UFbuGYcLX6H3Ed/s1600/soldierbaby.gif" />');
theText = theText.replace(/:M\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcPUeLd50i_es4WwT4yFXiyNIkKiCIErkclg5-kuuuDqNAQYLDRf6AfSjagTq4XF9w3IVHjcxOa-wX-8iHz3rtU9uWDs2T16yHwwxqEj83ijbLcnq7GgPPbsxbnbcke_wB_tT_wskPWVyG/s1600/alo.gif" />');
theText = theText.replace(/:N\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4eEdjfQT5gzODhyphenhyphenlyTx44ZXtMU9_YR_zy44R3B-7stb13d1dBGqitJ3COSbfATvWiY7fqTC8HNaxXREWG4wgs4TVl7QIDVOQmim-RiVATqHN2B3iX5k6iVh5X-bITQH29H9DmuDJgJ90Z/s1600/shutup.gif" />');
theText = theText.replace(/:O\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvcHBqx6bOw6pS1JBsspX4KpyurJLpuxFrUBSV1ikFVhokbRECyqZBrD1JFWPmS1MdXiZMg4aIkP-Z-c9w9LCUf_M-_Sv-ERMSevOF2-alYLFTuyWoGwc_eYwtBnNJxYG9OLmjJUVT7nQI/s1600/yeulam.gif" />');
theText = theText.replace(/:P\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeMlJaJsz00I1F1KB_YoidbUHIoekrvhdI8-bbRl0H3o2ND8CWcnQK3Kl_LKDxU9-1Un8BM9kQ1cJRpwPk_rimIkNe4teUgh5S4n5KwJiIayqonv8eHYrqGIuO6kSSfsjR2dGfehw7JWjQ/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/AVvXsEjVq_AnjEcxQosz33sKUqC_9-EQuOtBb-oXVDRT39nT2jDIh4NuS40bUTGfUvyIvaxIPgUhbZL73UJfUPdw0nAHKqWQOc13pfyshuJ1F74SZU7yodrs2PDX7J8_XT5g4kdRNnKoVHHX51_E/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/AVvXsEj97ALDrWn1XNXH9WG0EYg0kCLytPgk5zTDTPhbemy-ZKklzizWngJx09SfxWKFy5rDS1SjxWvqbl-cgi4NsWMNiN4O3yF8ImUDljTTu3jU52KUzEhrW4GAFDUAkv-WH8cfCCwuwMIhmQaM/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/AVvXsEhOkjs6_UsXZxGXQ8M7ZDw4vLQbRguZWzAUP8QzeTaT0dWtxphX1-szvKfqDUco4lXVwcDkYHTnPwahmCe8iFT1YNP0z_YM-yVM2GorXSBO2UxGJz2AklwoRdXq_J551BvoTXmjmuC-jRzC/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/AVvXsEiH7RFSzhN0cY60BjzhFwJld1CzXG1QGVJl3z93Ran853LiCriLjuBX34Bd91EodMoKMm0PvSQ6t4dWAAKnA3WqO9CIdkDrZdQQHDdCTLefRJZ2N-Va22GF0wLeANRQNKIJtkdjAQ80SEBU/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/AVvXsEhY78V2oHn2QVEXZ8uqBsTp7Y1iV_eeP1bnfW07IMw2MkX8tCnSfjCPfy9rQ85gjryqtwWYulE6A6obX2TErq2GK1nKBzelaUYmx8Ay7vzoC1R0kech8coQvVIWLp8oWrc-_z8BKpiiwJ9z/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/AVvXsEgH33kHnc12GdYkkP5p4K4al4AoRJThXIYwhmwQ7WabVLRngGb-yeSgm8auuSEmtRgTGyxa3meKu5wFsiZAPC9CzijkI-eFCWLhDBbnPifNRUtrg1f2Gs3FblQdvUi8m-45niufC0vaZn9e/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/AVvXsEhaUA9Qm2Gy6XB0SZpEBCZEjhrDJ73qb_bAogm7cbp8VXtzOJC6ev4EqFW5P8vthFODs6ulR6E8YcL8Z_AAgwd3PrtWwIMXKA9xJLopWJmKDP4YXvz9XmhSq6BNEyWM_7ygbnBK2-lKU0eJ/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/AVvXsEjOlyk1lRz00t2gi1LhqEmgPeG7ODVSpx-ymFwqsmxFtWJhGQhrEKwiy_XgQXWerhIiHpDaUyJTvvEWgy4dScsggrGTxOnLJ-7hokb03qLg_DKKfCvYDXZ8ZoJhcKDKCEIQCuyAUjyWVO8x/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/AVvXsEj-QXsDcVzdoNgZcdNKi-xxVWkHyNIWIpEFBeSPSXdsV6ofu_hEsrAfZO7txTMIwBwxgDMAyLQFu8s8jr2-sGZ6Bn0slQR358VgYfHlsR9vR6Mhw3tiLYyentNtaHy0EuCroAICCMGwTIX-/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/AVvXsEgkkOGOjjICkOZ9QJza_OlT5NjkmaibgLM__Uf94nxtTBOJYiX3h6OqXlLaqduCBXb2OCmBkMtdST4YDEZrssrMW2sZ5Ar1PH413E0ElN-cBJdIYqRrz0_pqvVHozP70TCphncGXFEOfnMl/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/AVvXsEgaol5Qe3SpMCSSWDqcvycaHr5MIUv3aeSaJN6kjVhpgFfmgL4HL0l0hbxBaWwMhSo31bp4VAyRrjaw3I4VfNxJKGjnHXg7lknDMfo6Sl6x8YCetV7OwWxlrF3KlPjZmO3a9N3-0osfufH7/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/AVvXsEgpb6C1y258b-t7wWcfmPSJKeBzZr0kHLFYtPU4dZp1R8Ejjf8eSIP-mWJ7aricdjQ78Zmf5cPNVLyKraUGpGGUVlJQ6i3-Xnth9cUFzQ7RF9EXXbNGCWCuGjWJeGorlYTypboBufmmoRVb/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/AVvXsEieUo2jdt-EnUrVu9ZkFf0M6BT6QxCnleiqGhIrI4Ps3j8lEqGcF61nU1II1u8DwLQKxqEM5Qc81_ztodWAMbeEzAoSAMsCTsPk1OdXGxqV3BIP_acqiQl6unruyLlbhCjqjtbedGQmAufe/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/AVvXsEjKn3hYhHLQG_f3ixa_YtDbrdHC0bie8E_61fA9_os2Pw_xkNyJqAe8XZQJdUXQpsG9h_05qA_Pa6Fml1uBi2bBtBJvdUcqhxpEnK4FQYAEWdTUCwJfiTFk7BZMp4hpILbdkIdGR4Yq-p40/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/AVvXsEgKNz3cPwktU5y1XQMhIMMvHntE831oROIlOFwiNqgTFOlF8INid1g1yHTv-mOC3Ci-kSZx14vJUkj4b7K4Ib9uv62llj52cNfQoIsE_vd0Fb8RNeKdUTjoE2WEz_fjCtaZSReeS5fnzEXy/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/AVvXsEhh8LSC4P-5BC-rysNsB6kD7dIV6HN438zWmh8lcxCUtuyb1qp0b80zl16uGnd4Wrur6VmuB2rw39R98Yc7JNLWx7cBeNNaHiXD7Sq0bWvPyQJ7jT-4H9yvdR1gYiYF6nBLoGv8Sq6VEQ4T/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/AVvXsEj2BQ4UIqcJQil_mmOZ0ZjzU6PlnsAQh4njnVYPxvPFgbCR-700ARtuwkULfUhxy1XfehD4Y3713VlS61bbgQiiCKzDqHnPUsEikdkDF7p2hV6v_nDvU422M_0czJEVbGadeL2HlqOrQuEB/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/AVvXsEhgOKKrqhDcbnFa_DyN9AKors-zy465rMq9oufFVOP4inZeXw-oiu8ux6-0Yh8KCt_xOYNGIWo1etv7fGaP7BAs7ceZ89nvVY_kTRL286wtjv4uAdY2FVi84HV0x4-RVIyMDnHhbwcFqkiz/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/AVvXsEg1pUwC1jJyk-3sNy71BoGePCa70etIlC_SzDRS87yEOiP1vE3Cf7HLvbhjrkNdBRBzjAm7jCKi5ILoN_j2EcRcdLerw7Vlisg7JNb0PW-LG5iGRorYY_ui-5n4YHy2SXBkVLIRUwKccLVk/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/AVvXsEjxgMa7O8Og1OhQQ7_PPX_aOKP09iDE5tYDYrdNPXhIWJldmYJF0VokWqIPRpEOfHmswt8OtWQ_C3YmfR1wE2b5xwcX-TKqFOMNiASfVftxlXghM_-szHtsJAf5LUv_9eNlyKjwbr6MmKOc/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/AVvXsEgfAMSgPMIOIHXTJ0tErYInaqaZiE_nFefyi5HwoToHz7SDC_erTYAJQcgi92hrmhcn-m0kLKLYTUr-tVOAcFMSTAVPsxbhyphenhyphenWdvStQyEQLi8IMqW1A_JH1b8TsIiAWV-0UFbuGYcLX6H3Ed/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/AVvXsEgcPUeLd50i_es4WwT4yFXiyNIkKiCIErkclg5-kuuuDqNAQYLDRf6AfSjagTq4XF9w3IVHjcxOa-wX-8iHz3rtU9uWDs2T16yHwwxqEj83ijbLcnq7GgPPbsxbnbcke_wB_tT_wskPWVyG/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/AVvXsEh4eEdjfQT5gzODhyphenhyphenlyTx44ZXtMU9_YR_zy44R3B-7stb13d1dBGqitJ3COSbfATvWiY7fqTC8HNaxXREWG4wgs4TVl7QIDVOQmim-RiVATqHN2B3iX5k6iVh5X-bITQH29H9DmuDJgJ90Z/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/AVvXsEhvcHBqx6bOw6pS1JBsspX4KpyurJLpuxFrUBSV1ikFVhokbRECyqZBrD1JFWPmS1MdXiZMg4aIkP-Z-c9w9LCUf_M-_Sv-ERMSevOF2-alYLFTuyWoGwc_eYwtBnNJxYG9OLmjJUVT7nQI/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/AVvXsEjeMlJaJsz00I1F1KB_YoidbUHIoekrvhdI8-bbRl0H3o2ND8CWcnQK3Kl_LKDxU9-1Un8BM9kQ1cJRpwPk_rimIkNe4teUgh5S4n5KwJiIayqonv8eHYrqGIuO6kSSfsjR2dGfehw7JWjQ/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
Đăng ký:
Đăng Nhận xét (Atom)
:5)
Trả lờiXóaSao mình ko làm dc! :((
Trả lờiXóa