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/AVvXsEh2h_BkN-0ME9RIcimP8n14AVGN5DW_smAjfLB8wanluEorfJt5yiHI7GPouhf2PW3qkwx2dpQpXmw8VPSRNyvvhSR8K_EOFV9NlvPs1Rz60lkhGoUij5Hba61Q1bxb_D7TBdPMU0qaXP4L/s1600/49.gif" />');
theText = theText.replace(/:2\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1edof6dG7SuHx_dNkBS3hcUkPP-0okMuJ2KekezDiz-8apZa0wcykknbO7t6M4d4pgPqSUBn5Pw2PVtQj9tBlSu2NS4hjjzN2xk44iIlN5ruVkeY0R65fCyszDQNZMyEMQhoEwBZu51N7/s1600/102.gif" />');
theText = theText.replace(/:3\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1oQ_mXDbEhYaXY1slgLEBcypMQpsvAjg2vb6D6WlgLCow3Rdtirnh2wbOCi7jcFRlOSDuxRQW-th2Jc3INi3YFvBjW7iixaGUx4moA1YFlbWygWEaZJ04bBn75cie3peVumy5-95dfjkc/s1600/113.gif" />');
theText = theText.replace(/:4\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnryhcBp-d0Y7USEKgwQqMcvWMgPsSHIM6sJzvI5WvuC3_OeCjrni_9tjOAk7aW9LTQbbRlyoJB7wjnKHM00AEuguAJotmUbZY8d7GyFk4BLa7r1KkZ8eaFzw8J_IPASg4zEED8NX4T4IC/s1600/93.gif" />');
theText = theText.replace(/:5\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFoUhkU3FM5tQXfwS0tKgBgfLnsVjx-I25ZgABosZBQy166LVnTKWACfVHYOQh3lKx-ijsU6H69cYbSnra2emgKgSuJ9abqO6xHAzURODx0Ex2SprBbdOZtxETGkZEdOFlFvmXl_NHpgz5/s1600/61.gif" />');
theText = theText.replace(/:6\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdC4tjMvod7CAtmmkpkDwXvMbKAsjWxeUZdtmcmGtlq0mDvZSqsk69b_J2mpqDJWD8NFbSDbYZ2qzwccV7hB50Y8KvdY2eeQaJvLEIR3gaOtCsyzAExQ-aj5tIauIzFsEtd-gNoLBPCj1b/s1600/134.gif" />');
theText = theText.replace(/:7\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhco5nDe_B5PBPDhhOVNy3G-n6qRdkBC11y8QR2pYdaoBuuaMXAVPvUpN-biSyaq6XbqDcUd1m-xuOW-spkO_JmZsOFF5rbOEwMUgTr4BIomnNBfj8Exmci6-Fmmy_KJnonOaTcJpB0aJss/s1600/39.gif" />');
theText = theText.replace(/:8\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGu5AarsAuN1PoD7SjHQlKH3L6mkrTj5Cge5DiQldyl6NYC-AAM3CtBUiity7KGSKPjgxaO6cGLKiDXd0n0Hw59WVE1N6PsMxCjIDhx7KL06Qa2-fE6yfD9kzMwt_jNEbF7yIcn6S7rVP6/s1600/106.gif" />');
theText = theText.replace(/:9\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0E9r5Zo9rgC3f_V0NzZIciv6WO-HzGq2ZM3q94TIej9Efg4DtrukzaWd1X-t1fbM0dYUigrgWrJqGHCq5uO1fC8miBiAl-XxgwemFDT8F67PDh0UU7PJ_KFiMY71L73MlHZUqtP9jiF70/s1600/43.gif" />');
theText = theText.replace(/:A\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIopnHgtr6arVoCnxAdkKgK0a2-n-7l6R2I9gVL5fHSnIIsdx7mIeO5flMsChxtLG9Z8K1xBzqHnMGB4XVD4sF09CF8OR59cHAIoH9ZgulIKidwadirN5hcrmDl-1Lqg5vB22ZUO6TjPdP/s1600/111.gif" />');
theText = theText.replace(/:B\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhC3dyz_R4wdz79pkIbEFCoI3fyHLjeOW4KXcyoCjxu78SZoD16TfbRY6XDoMorvsAtVsMei8Xh7aX-51iaWC7itMSBiMM40hBDcrYyljQtYfKhn2H5a-E_jEG2lLnnkTc-7To4FHu_s5Yc/s1600/48.gif" />');
theText = theText.replace(/:C\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgz6e84eswGPp3Q5lSR9FUUWvg-q891RdLVaMZTxEPWGQrYdQJ2C5uM38KjElZfHmUlVbzQnGbQm4dPxfKCM9NmyDb8vG-qIMbl-Z0C4w68nTwnkHnZ-ZP6w0ZHk5JrbEfgtoBiFUeMYe64/s1600/54.gif" />');
theText = theText.replace(/:D\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqIUPmo2PSiaoAfm4F5ILDc62SegEXty686-nRC-l3DA-eqyLWfpC1bg1zPZVQZmi_erICqoNWsXw1IKpXmXTZogU2k-1o6frf8kU0lVzerDxmU9znaKBXJAY1YHALx20xx5EDgb2HEtGI/s1600/63.gif" />');
theText = theText.replace(/:E\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihn_tJbyHFAzTnv_K3Z5BPwALZTb4VT_KUHx-rvwnuPhblpa9QmsPChu4I56oTgvFSVEXdZpG7sDiH1seH4cVCyOp1yPDrleicKMKlVORPWtp0jeDU_MCh5YU1nYvA6p8GCVlttwEUlCei/s1600/100.gif" />');
theText = theText.replace(/:F\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4LdxDwHjjYR8664KnZ9K2BO5AiFUteTJWQaTH1AX7wTUaJ-uUD5u66j0Y7HZE0D0L9C9KBOevyvwMFXH-rjpulg48Ljk2a3VqW5_zGO7Et49u5iJaItZeOF7kSYfx5-bj959hqGyB6zmE/s1600/45.gif" />');
theText = theText.replace(/:G\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikbyvAGVoyT-nbJQk_4-DlfYabTkAF5LlPLYkBYabsII7gbkCwjmL7eBNadjX6Wwgh44hjXMmNPu0G_lb4VBI9bzv57NtSClPYskDYxgEQgkyFAH2kez-5xYh8SSCxFxxwBpB6nWWHGIUJ/s1600/77.gif" />');
theText = theText.replace(/:H\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnb-6iTowcLD3_LK58EoEvK_3xxQS3be226LeSUmqYegEH7DsbLRcw6mY11cfbl56KabpJ1tUR8AxNn1osb258TXgyb2GaEEJxxTVD3v1klvlMpdlEwpVGHvbSYNm3ylXbahnktaA0xF8I/s1600/86.gif" />');
theText = theText.replace(/:I\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGKqSrP6VBUh3WXwIQ06mbyj0yVt98EYfC5cvRrb28Xb7MS9c_dFVElwtrWD7dwgNcLyEj5QAy5saM8hK-FIiE7rf96NX3HB6le6IkJk92YD_Hh6r2-lHDCBvGaBwoiVjNU9Wvas5OBLiB/s1600/94.gif" />');
theText = theText.replace(/:J\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDnSJ2iuIgYfOTwOZuRYHJm6ZGAf_EVBF6xed4lDbjBsL1j96-_lIJkalrDtplrDeHG2KZEO0PxtTJB8GZbhW7gkTORL32sDWZAhfej0f95MnogyEbaW_MoHoyLUi_8T8zbFU9WnQpfyen/s1600/83.gif" />');
theText = theText.replace(/:K\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8PN93XmiYbgOQR3Lecne62vF7vHRBOFnyvBPTLJHZgZk5EWqGKMyPP7x7v5SNA7jZxUZXbR4d1bXWYDJ7k7NOS-diL9MdQ1O24qxDJkSKZGMxrIk3HKrwrLVU8QmnrNL_Yj6yiXhBUydm/s1600/59.gif" />');
theText = theText.replace(/:L\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRX74hvP94Xpynodf3ouLBRn98JMZ_zHg0cfhXWx198JeuwK7fVYJZlWceLypCTfzPOK9fVu4OyHMO_LMqlwfqW-r3bm3z-7gx7W0XgpePzKfCScZW9Y8yLfrJgk84xA8gD3XgSWNv_LGO/s1600/soldierbaby.gif" />');
theText = theText.replace(/:M\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1DAxS9AAmymj84a3y2PmcwoDGJ3j5LDVsvAPxvkVtC9v6RDZW6-raLSYo5UtiFcoPL7rHOYTcmD605O1fLEUPixzPV_l2uvls88kFIKStdKEwyAmzISh1SZcVIVQudOON_6UU-zjOH-G9/s1600/alo.gif" />');
theText = theText.replace(/:N\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt61cKSA2Vb57pggKINbKnjTngowXXLIBytxVDDZdUAYr-y4IQH84d-M5rNmVJHyL_bQj483976-xi9G4aWSPtPERnnDPTJ6Eo_E6TBDUv82f_rddALw6_jNhGX0uUOd-2q_rfA6UXaoYp/s1600/shutup.gif" />');
theText = theText.replace(/:O\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUtfeBz8XUUoqgZ8voY27fRb-ZquSm5mRKXh-q62k-DzZWXMdD33DTRb9V1QjzpvXODGLvujx3vAa2AY8KOW3wSLl13mVnseh-bTDDhxvSVfFiEMxq1W0vp3v_j3Qsx7Q8ZqU4SGcWr8A6/s1600/yeulam.gif" />');
theText = theText.replace(/:P\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7v8qBuq58oMogJATmRzngsONlaC6BymBj4xxc9yBusG8PVcnBe_FZWlPoxQ1czYFW7Ma2E8JMxWpP0a7CHDlcDQmLDPFSH0ZttYSGL599AXWeRJbu4f6_zxlWSsrf7_vWZoq1sEsIJjXN/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/AVvXsEh2h_BkN-0ME9RIcimP8n14AVGN5DW_smAjfLB8wanluEorfJt5yiHI7GPouhf2PW3qkwx2dpQpXmw8VPSRNyvvhSR8K_EOFV9NlvPs1Rz60lkhGoUij5Hba61Q1bxb_D7TBdPMU0qaXP4L/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/AVvXsEg1edof6dG7SuHx_dNkBS3hcUkPP-0okMuJ2KekezDiz-8apZa0wcykknbO7t6M4d4pgPqSUBn5Pw2PVtQj9tBlSu2NS4hjjzN2xk44iIlN5ruVkeY0R65fCyszDQNZMyEMQhoEwBZu51N7/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/AVvXsEi1oQ_mXDbEhYaXY1slgLEBcypMQpsvAjg2vb6D6WlgLCow3Rdtirnh2wbOCi7jcFRlOSDuxRQW-th2Jc3INi3YFvBjW7iixaGUx4moA1YFlbWygWEaZJ04bBn75cie3peVumy5-95dfjkc/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/AVvXsEhnryhcBp-d0Y7USEKgwQqMcvWMgPsSHIM6sJzvI5WvuC3_OeCjrni_9tjOAk7aW9LTQbbRlyoJB7wjnKHM00AEuguAJotmUbZY8d7GyFk4BLa7r1KkZ8eaFzw8J_IPASg4zEED8NX4T4IC/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/AVvXsEhFoUhkU3FM5tQXfwS0tKgBgfLnsVjx-I25ZgABosZBQy166LVnTKWACfVHYOQh3lKx-ijsU6H69cYbSnra2emgKgSuJ9abqO6xHAzURODx0Ex2SprBbdOZtxETGkZEdOFlFvmXl_NHpgz5/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/AVvXsEgdC4tjMvod7CAtmmkpkDwXvMbKAsjWxeUZdtmcmGtlq0mDvZSqsk69b_J2mpqDJWD8NFbSDbYZ2qzwccV7hB50Y8KvdY2eeQaJvLEIR3gaOtCsyzAExQ-aj5tIauIzFsEtd-gNoLBPCj1b/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/AVvXsEhco5nDe_B5PBPDhhOVNy3G-n6qRdkBC11y8QR2pYdaoBuuaMXAVPvUpN-biSyaq6XbqDcUd1m-xuOW-spkO_JmZsOFF5rbOEwMUgTr4BIomnNBfj8Exmci6-Fmmy_KJnonOaTcJpB0aJss/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/AVvXsEhGu5AarsAuN1PoD7SjHQlKH3L6mkrTj5Cge5DiQldyl6NYC-AAM3CtBUiity7KGSKPjgxaO6cGLKiDXd0n0Hw59WVE1N6PsMxCjIDhx7KL06Qa2-fE6yfD9kzMwt_jNEbF7yIcn6S7rVP6/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/AVvXsEj0E9r5Zo9rgC3f_V0NzZIciv6WO-HzGq2ZM3q94TIej9Efg4DtrukzaWd1X-t1fbM0dYUigrgWrJqGHCq5uO1fC8miBiAl-XxgwemFDT8F67PDh0UU7PJ_KFiMY71L73MlHZUqtP9jiF70/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/AVvXsEjIopnHgtr6arVoCnxAdkKgK0a2-n-7l6R2I9gVL5fHSnIIsdx7mIeO5flMsChxtLG9Z8K1xBzqHnMGB4XVD4sF09CF8OR59cHAIoH9ZgulIKidwadirN5hcrmDl-1Lqg5vB22ZUO6TjPdP/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/AVvXsEhC3dyz_R4wdz79pkIbEFCoI3fyHLjeOW4KXcyoCjxu78SZoD16TfbRY6XDoMorvsAtVsMei8Xh7aX-51iaWC7itMSBiMM40hBDcrYyljQtYfKhn2H5a-E_jEG2lLnnkTc-7To4FHu_s5Yc/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/AVvXsEgz6e84eswGPp3Q5lSR9FUUWvg-q891RdLVaMZTxEPWGQrYdQJ2C5uM38KjElZfHmUlVbzQnGbQm4dPxfKCM9NmyDb8vG-qIMbl-Z0C4w68nTwnkHnZ-ZP6w0ZHk5JrbEfgtoBiFUeMYe64/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/AVvXsEhqIUPmo2PSiaoAfm4F5ILDc62SegEXty686-nRC-l3DA-eqyLWfpC1bg1zPZVQZmi_erICqoNWsXw1IKpXmXTZogU2k-1o6frf8kU0lVzerDxmU9znaKBXJAY1YHALx20xx5EDgb2HEtGI/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/AVvXsEihn_tJbyHFAzTnv_K3Z5BPwALZTb4VT_KUHx-rvwnuPhblpa9QmsPChu4I56oTgvFSVEXdZpG7sDiH1seH4cVCyOp1yPDrleicKMKlVORPWtp0jeDU_MCh5YU1nYvA6p8GCVlttwEUlCei/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/AVvXsEh4LdxDwHjjYR8664KnZ9K2BO5AiFUteTJWQaTH1AX7wTUaJ-uUD5u66j0Y7HZE0D0L9C9KBOevyvwMFXH-rjpulg48Ljk2a3VqW5_zGO7Et49u5iJaItZeOF7kSYfx5-bj959hqGyB6zmE/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/AVvXsEikbyvAGVoyT-nbJQk_4-DlfYabTkAF5LlPLYkBYabsII7gbkCwjmL7eBNadjX6Wwgh44hjXMmNPu0G_lb4VBI9bzv57NtSClPYskDYxgEQgkyFAH2kez-5xYh8SSCxFxxwBpB6nWWHGIUJ/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/AVvXsEhnb-6iTowcLD3_LK58EoEvK_3xxQS3be226LeSUmqYegEH7DsbLRcw6mY11cfbl56KabpJ1tUR8AxNn1osb258TXgyb2GaEEJxxTVD3v1klvlMpdlEwpVGHvbSYNm3ylXbahnktaA0xF8I/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/AVvXsEjGKqSrP6VBUh3WXwIQ06mbyj0yVt98EYfC5cvRrb28Xb7MS9c_dFVElwtrWD7dwgNcLyEj5QAy5saM8hK-FIiE7rf96NX3HB6le6IkJk92YD_Hh6r2-lHDCBvGaBwoiVjNU9Wvas5OBLiB/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/AVvXsEiDnSJ2iuIgYfOTwOZuRYHJm6ZGAf_EVBF6xed4lDbjBsL1j96-_lIJkalrDtplrDeHG2KZEO0PxtTJB8GZbhW7gkTORL32sDWZAhfej0f95MnogyEbaW_MoHoyLUi_8T8zbFU9WnQpfyen/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/AVvXsEg8PN93XmiYbgOQR3Lecne62vF7vHRBOFnyvBPTLJHZgZk5EWqGKMyPP7x7v5SNA7jZxUZXbR4d1bXWYDJ7k7NOS-diL9MdQ1O24qxDJkSKZGMxrIk3HKrwrLVU8QmnrNL_Yj6yiXhBUydm/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/AVvXsEjRX74hvP94Xpynodf3ouLBRn98JMZ_zHg0cfhXWx198JeuwK7fVYJZlWceLypCTfzPOK9fVu4OyHMO_LMqlwfqW-r3bm3z-7gx7W0XgpePzKfCScZW9Y8yLfrJgk84xA8gD3XgSWNv_LGO/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/AVvXsEg1DAxS9AAmymj84a3y2PmcwoDGJ3j5LDVsvAPxvkVtC9v6RDZW6-raLSYo5UtiFcoPL7rHOYTcmD605O1fLEUPixzPV_l2uvls88kFIKStdKEwyAmzISh1SZcVIVQudOON_6UU-zjOH-G9/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/AVvXsEgt61cKSA2Vb57pggKINbKnjTngowXXLIBytxVDDZdUAYr-y4IQH84d-M5rNmVJHyL_bQj483976-xi9G4aWSPtPERnnDPTJ6Eo_E6TBDUv82f_rddALw6_jNhGX0uUOd-2q_rfA6UXaoYp/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/AVvXsEiUtfeBz8XUUoqgZ8voY27fRb-ZquSm5mRKXh-q62k-DzZWXMdD33DTRb9V1QjzpvXODGLvujx3vAa2AY8KOW3wSLl13mVnseh-bTDDhxvSVfFiEMxq1W0vp3v_j3Qsx7Q8ZqU4SGcWr8A6/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/AVvXsEh7v8qBuq58oMogJATmRzngsONlaC6BymBj4xxc9yBusG8PVcnBe_FZWlPoxQ1czYFW7Ma2E8JMxWpP0a7CHDlcDQmLDPFSH0ZttYSGL599AXWeRJbu4f6_zxlWSsrf7_vWZoq1sEsIJjXN/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/AVvXsEh2h_BkN-0ME9RIcimP8n14AVGN5DW_smAjfLB8wanluEorfJt5yiHI7GPouhf2PW3qkwx2dpQpXmw8VPSRNyvvhSR8K_EOFV9NlvPs1Rz60lkhGoUij5Hba61Q1bxb_D7TBdPMU0qaXP4L/s1600/49.gif" />');
theText = theText.replace(/:2\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1edof6dG7SuHx_dNkBS3hcUkPP-0okMuJ2KekezDiz-8apZa0wcykknbO7t6M4d4pgPqSUBn5Pw2PVtQj9tBlSu2NS4hjjzN2xk44iIlN5ruVkeY0R65fCyszDQNZMyEMQhoEwBZu51N7/s1600/102.gif" />');
theText = theText.replace(/:3\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1oQ_mXDbEhYaXY1slgLEBcypMQpsvAjg2vb6D6WlgLCow3Rdtirnh2wbOCi7jcFRlOSDuxRQW-th2Jc3INi3YFvBjW7iixaGUx4moA1YFlbWygWEaZJ04bBn75cie3peVumy5-95dfjkc/s1600/113.gif" />');
theText = theText.replace(/:4\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnryhcBp-d0Y7USEKgwQqMcvWMgPsSHIM6sJzvI5WvuC3_OeCjrni_9tjOAk7aW9LTQbbRlyoJB7wjnKHM00AEuguAJotmUbZY8d7GyFk4BLa7r1KkZ8eaFzw8J_IPASg4zEED8NX4T4IC/s1600/93.gif" />');
theText = theText.replace(/:5\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFoUhkU3FM5tQXfwS0tKgBgfLnsVjx-I25ZgABosZBQy166LVnTKWACfVHYOQh3lKx-ijsU6H69cYbSnra2emgKgSuJ9abqO6xHAzURODx0Ex2SprBbdOZtxETGkZEdOFlFvmXl_NHpgz5/s1600/61.gif" />');
theText = theText.replace(/:6\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdC4tjMvod7CAtmmkpkDwXvMbKAsjWxeUZdtmcmGtlq0mDvZSqsk69b_J2mpqDJWD8NFbSDbYZ2qzwccV7hB50Y8KvdY2eeQaJvLEIR3gaOtCsyzAExQ-aj5tIauIzFsEtd-gNoLBPCj1b/s1600/134.gif" />');
theText = theText.replace(/:7\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhco5nDe_B5PBPDhhOVNy3G-n6qRdkBC11y8QR2pYdaoBuuaMXAVPvUpN-biSyaq6XbqDcUd1m-xuOW-spkO_JmZsOFF5rbOEwMUgTr4BIomnNBfj8Exmci6-Fmmy_KJnonOaTcJpB0aJss/s1600/39.gif" />');
theText = theText.replace(/:8\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGu5AarsAuN1PoD7SjHQlKH3L6mkrTj5Cge5DiQldyl6NYC-AAM3CtBUiity7KGSKPjgxaO6cGLKiDXd0n0Hw59WVE1N6PsMxCjIDhx7KL06Qa2-fE6yfD9kzMwt_jNEbF7yIcn6S7rVP6/s1600/106.gif" />');
theText = theText.replace(/:9\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0E9r5Zo9rgC3f_V0NzZIciv6WO-HzGq2ZM3q94TIej9Efg4DtrukzaWd1X-t1fbM0dYUigrgWrJqGHCq5uO1fC8miBiAl-XxgwemFDT8F67PDh0UU7PJ_KFiMY71L73MlHZUqtP9jiF70/s1600/43.gif" />');
theText = theText.replace(/:A\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIopnHgtr6arVoCnxAdkKgK0a2-n-7l6R2I9gVL5fHSnIIsdx7mIeO5flMsChxtLG9Z8K1xBzqHnMGB4XVD4sF09CF8OR59cHAIoH9ZgulIKidwadirN5hcrmDl-1Lqg5vB22ZUO6TjPdP/s1600/111.gif" />');
theText = theText.replace(/:B\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhC3dyz_R4wdz79pkIbEFCoI3fyHLjeOW4KXcyoCjxu78SZoD16TfbRY6XDoMorvsAtVsMei8Xh7aX-51iaWC7itMSBiMM40hBDcrYyljQtYfKhn2H5a-E_jEG2lLnnkTc-7To4FHu_s5Yc/s1600/48.gif" />');
theText = theText.replace(/:C\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgz6e84eswGPp3Q5lSR9FUUWvg-q891RdLVaMZTxEPWGQrYdQJ2C5uM38KjElZfHmUlVbzQnGbQm4dPxfKCM9NmyDb8vG-qIMbl-Z0C4w68nTwnkHnZ-ZP6w0ZHk5JrbEfgtoBiFUeMYe64/s1600/54.gif" />');
theText = theText.replace(/:D\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqIUPmo2PSiaoAfm4F5ILDc62SegEXty686-nRC-l3DA-eqyLWfpC1bg1zPZVQZmi_erICqoNWsXw1IKpXmXTZogU2k-1o6frf8kU0lVzerDxmU9znaKBXJAY1YHALx20xx5EDgb2HEtGI/s1600/63.gif" />');
theText = theText.replace(/:E\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihn_tJbyHFAzTnv_K3Z5BPwALZTb4VT_KUHx-rvwnuPhblpa9QmsPChu4I56oTgvFSVEXdZpG7sDiH1seH4cVCyOp1yPDrleicKMKlVORPWtp0jeDU_MCh5YU1nYvA6p8GCVlttwEUlCei/s1600/100.gif" />');
theText = theText.replace(/:F\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4LdxDwHjjYR8664KnZ9K2BO5AiFUteTJWQaTH1AX7wTUaJ-uUD5u66j0Y7HZE0D0L9C9KBOevyvwMFXH-rjpulg48Ljk2a3VqW5_zGO7Et49u5iJaItZeOF7kSYfx5-bj959hqGyB6zmE/s1600/45.gif" />');
theText = theText.replace(/:G\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikbyvAGVoyT-nbJQk_4-DlfYabTkAF5LlPLYkBYabsII7gbkCwjmL7eBNadjX6Wwgh44hjXMmNPu0G_lb4VBI9bzv57NtSClPYskDYxgEQgkyFAH2kez-5xYh8SSCxFxxwBpB6nWWHGIUJ/s1600/77.gif" />');
theText = theText.replace(/:H\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnb-6iTowcLD3_LK58EoEvK_3xxQS3be226LeSUmqYegEH7DsbLRcw6mY11cfbl56KabpJ1tUR8AxNn1osb258TXgyb2GaEEJxxTVD3v1klvlMpdlEwpVGHvbSYNm3ylXbahnktaA0xF8I/s1600/86.gif" />');
theText = theText.replace(/:I\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGKqSrP6VBUh3WXwIQ06mbyj0yVt98EYfC5cvRrb28Xb7MS9c_dFVElwtrWD7dwgNcLyEj5QAy5saM8hK-FIiE7rf96NX3HB6le6IkJk92YD_Hh6r2-lHDCBvGaBwoiVjNU9Wvas5OBLiB/s1600/94.gif" />');
theText = theText.replace(/:J\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDnSJ2iuIgYfOTwOZuRYHJm6ZGAf_EVBF6xed4lDbjBsL1j96-_lIJkalrDtplrDeHG2KZEO0PxtTJB8GZbhW7gkTORL32sDWZAhfej0f95MnogyEbaW_MoHoyLUi_8T8zbFU9WnQpfyen/s1600/83.gif" />');
theText = theText.replace(/:K\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8PN93XmiYbgOQR3Lecne62vF7vHRBOFnyvBPTLJHZgZk5EWqGKMyPP7x7v5SNA7jZxUZXbR4d1bXWYDJ7k7NOS-diL9MdQ1O24qxDJkSKZGMxrIk3HKrwrLVU8QmnrNL_Yj6yiXhBUydm/s1600/59.gif" />');
theText = theText.replace(/:L\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRX74hvP94Xpynodf3ouLBRn98JMZ_zHg0cfhXWx198JeuwK7fVYJZlWceLypCTfzPOK9fVu4OyHMO_LMqlwfqW-r3bm3z-7gx7W0XgpePzKfCScZW9Y8yLfrJgk84xA8gD3XgSWNv_LGO/s1600/soldierbaby.gif" />');
theText = theText.replace(/:M\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1DAxS9AAmymj84a3y2PmcwoDGJ3j5LDVsvAPxvkVtC9v6RDZW6-raLSYo5UtiFcoPL7rHOYTcmD605O1fLEUPixzPV_l2uvls88kFIKStdKEwyAmzISh1SZcVIVQudOON_6UU-zjOH-G9/s1600/alo.gif" />');
theText = theText.replace(/:N\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt61cKSA2Vb57pggKINbKnjTngowXXLIBytxVDDZdUAYr-y4IQH84d-M5rNmVJHyL_bQj483976-xi9G4aWSPtPERnnDPTJ6Eo_E6TBDUv82f_rddALw6_jNhGX0uUOd-2q_rfA6UXaoYp/s1600/shutup.gif" />');
theText = theText.replace(/:O\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUtfeBz8XUUoqgZ8voY27fRb-ZquSm5mRKXh-q62k-DzZWXMdD33DTRb9V1QjzpvXODGLvujx3vAa2AY8KOW3wSLl13mVnseh-bTDDhxvSVfFiEMxq1W0vp3v_j3Qsx7Q8ZqU4SGcWr8A6/s1600/yeulam.gif" />');
theText = theText.replace(/:P\)/g,'<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7v8qBuq58oMogJATmRzngsONlaC6BymBj4xxc9yBusG8PVcnBe_FZWlPoxQ1czYFW7Ma2E8JMxWpP0a7CHDlcDQmLDPFSH0ZttYSGL599AXWeRJbu4f6_zxlWSsrf7_vWZoq1sEsIJjXN/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/AVvXsEh2h_BkN-0ME9RIcimP8n14AVGN5DW_smAjfLB8wanluEorfJt5yiHI7GPouhf2PW3qkwx2dpQpXmw8VPSRNyvvhSR8K_EOFV9NlvPs1Rz60lkhGoUij5Hba61Q1bxb_D7TBdPMU0qaXP4L/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/AVvXsEg1edof6dG7SuHx_dNkBS3hcUkPP-0okMuJ2KekezDiz-8apZa0wcykknbO7t6M4d4pgPqSUBn5Pw2PVtQj9tBlSu2NS4hjjzN2xk44iIlN5ruVkeY0R65fCyszDQNZMyEMQhoEwBZu51N7/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/AVvXsEi1oQ_mXDbEhYaXY1slgLEBcypMQpsvAjg2vb6D6WlgLCow3Rdtirnh2wbOCi7jcFRlOSDuxRQW-th2Jc3INi3YFvBjW7iixaGUx4moA1YFlbWygWEaZJ04bBn75cie3peVumy5-95dfjkc/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/AVvXsEhnryhcBp-d0Y7USEKgwQqMcvWMgPsSHIM6sJzvI5WvuC3_OeCjrni_9tjOAk7aW9LTQbbRlyoJB7wjnKHM00AEuguAJotmUbZY8d7GyFk4BLa7r1KkZ8eaFzw8J_IPASg4zEED8NX4T4IC/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/AVvXsEhFoUhkU3FM5tQXfwS0tKgBgfLnsVjx-I25ZgABosZBQy166LVnTKWACfVHYOQh3lKx-ijsU6H69cYbSnra2emgKgSuJ9abqO6xHAzURODx0Ex2SprBbdOZtxETGkZEdOFlFvmXl_NHpgz5/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/AVvXsEgdC4tjMvod7CAtmmkpkDwXvMbKAsjWxeUZdtmcmGtlq0mDvZSqsk69b_J2mpqDJWD8NFbSDbYZ2qzwccV7hB50Y8KvdY2eeQaJvLEIR3gaOtCsyzAExQ-aj5tIauIzFsEtd-gNoLBPCj1b/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/AVvXsEhco5nDe_B5PBPDhhOVNy3G-n6qRdkBC11y8QR2pYdaoBuuaMXAVPvUpN-biSyaq6XbqDcUd1m-xuOW-spkO_JmZsOFF5rbOEwMUgTr4BIomnNBfj8Exmci6-Fmmy_KJnonOaTcJpB0aJss/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/AVvXsEhGu5AarsAuN1PoD7SjHQlKH3L6mkrTj5Cge5DiQldyl6NYC-AAM3CtBUiity7KGSKPjgxaO6cGLKiDXd0n0Hw59WVE1N6PsMxCjIDhx7KL06Qa2-fE6yfD9kzMwt_jNEbF7yIcn6S7rVP6/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/AVvXsEj0E9r5Zo9rgC3f_V0NzZIciv6WO-HzGq2ZM3q94TIej9Efg4DtrukzaWd1X-t1fbM0dYUigrgWrJqGHCq5uO1fC8miBiAl-XxgwemFDT8F67PDh0UU7PJ_KFiMY71L73MlHZUqtP9jiF70/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/AVvXsEjIopnHgtr6arVoCnxAdkKgK0a2-n-7l6R2I9gVL5fHSnIIsdx7mIeO5flMsChxtLG9Z8K1xBzqHnMGB4XVD4sF09CF8OR59cHAIoH9ZgulIKidwadirN5hcrmDl-1Lqg5vB22ZUO6TjPdP/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/AVvXsEhC3dyz_R4wdz79pkIbEFCoI3fyHLjeOW4KXcyoCjxu78SZoD16TfbRY6XDoMorvsAtVsMei8Xh7aX-51iaWC7itMSBiMM40hBDcrYyljQtYfKhn2H5a-E_jEG2lLnnkTc-7To4FHu_s5Yc/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/AVvXsEgz6e84eswGPp3Q5lSR9FUUWvg-q891RdLVaMZTxEPWGQrYdQJ2C5uM38KjElZfHmUlVbzQnGbQm4dPxfKCM9NmyDb8vG-qIMbl-Z0C4w68nTwnkHnZ-ZP6w0ZHk5JrbEfgtoBiFUeMYe64/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/AVvXsEhqIUPmo2PSiaoAfm4F5ILDc62SegEXty686-nRC-l3DA-eqyLWfpC1bg1zPZVQZmi_erICqoNWsXw1IKpXmXTZogU2k-1o6frf8kU0lVzerDxmU9znaKBXJAY1YHALx20xx5EDgb2HEtGI/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/AVvXsEihn_tJbyHFAzTnv_K3Z5BPwALZTb4VT_KUHx-rvwnuPhblpa9QmsPChu4I56oTgvFSVEXdZpG7sDiH1seH4cVCyOp1yPDrleicKMKlVORPWtp0jeDU_MCh5YU1nYvA6p8GCVlttwEUlCei/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/AVvXsEh4LdxDwHjjYR8664KnZ9K2BO5AiFUteTJWQaTH1AX7wTUaJ-uUD5u66j0Y7HZE0D0L9C9KBOevyvwMFXH-rjpulg48Ljk2a3VqW5_zGO7Et49u5iJaItZeOF7kSYfx5-bj959hqGyB6zmE/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/AVvXsEikbyvAGVoyT-nbJQk_4-DlfYabTkAF5LlPLYkBYabsII7gbkCwjmL7eBNadjX6Wwgh44hjXMmNPu0G_lb4VBI9bzv57NtSClPYskDYxgEQgkyFAH2kez-5xYh8SSCxFxxwBpB6nWWHGIUJ/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/AVvXsEhnb-6iTowcLD3_LK58EoEvK_3xxQS3be226LeSUmqYegEH7DsbLRcw6mY11cfbl56KabpJ1tUR8AxNn1osb258TXgyb2GaEEJxxTVD3v1klvlMpdlEwpVGHvbSYNm3ylXbahnktaA0xF8I/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/AVvXsEjGKqSrP6VBUh3WXwIQ06mbyj0yVt98EYfC5cvRrb28Xb7MS9c_dFVElwtrWD7dwgNcLyEj5QAy5saM8hK-FIiE7rf96NX3HB6le6IkJk92YD_Hh6r2-lHDCBvGaBwoiVjNU9Wvas5OBLiB/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/AVvXsEiDnSJ2iuIgYfOTwOZuRYHJm6ZGAf_EVBF6xed4lDbjBsL1j96-_lIJkalrDtplrDeHG2KZEO0PxtTJB8GZbhW7gkTORL32sDWZAhfej0f95MnogyEbaW_MoHoyLUi_8T8zbFU9WnQpfyen/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/AVvXsEg8PN93XmiYbgOQR3Lecne62vF7vHRBOFnyvBPTLJHZgZk5EWqGKMyPP7x7v5SNA7jZxUZXbR4d1bXWYDJ7k7NOS-diL9MdQ1O24qxDJkSKZGMxrIk3HKrwrLVU8QmnrNL_Yj6yiXhBUydm/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/AVvXsEjRX74hvP94Xpynodf3ouLBRn98JMZ_zHg0cfhXWx198JeuwK7fVYJZlWceLypCTfzPOK9fVu4OyHMO_LMqlwfqW-r3bm3z-7gx7W0XgpePzKfCScZW9Y8yLfrJgk84xA8gD3XgSWNv_LGO/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/AVvXsEg1DAxS9AAmymj84a3y2PmcwoDGJ3j5LDVsvAPxvkVtC9v6RDZW6-raLSYo5UtiFcoPL7rHOYTcmD605O1fLEUPixzPV_l2uvls88kFIKStdKEwyAmzISh1SZcVIVQudOON_6UU-zjOH-G9/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/AVvXsEgt61cKSA2Vb57pggKINbKnjTngowXXLIBytxVDDZdUAYr-y4IQH84d-M5rNmVJHyL_bQj483976-xi9G4aWSPtPERnnDPTJ6Eo_E6TBDUv82f_rddALw6_jNhGX0uUOd-2q_rfA6UXaoYp/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/AVvXsEiUtfeBz8XUUoqgZ8voY27fRb-ZquSm5mRKXh-q62k-DzZWXMdD33DTRb9V1QjzpvXODGLvujx3vAa2AY8KOW3wSLl13mVnseh-bTDDhxvSVfFiEMxq1W0vp3v_j3Qsx7Q8ZqU4SGcWr8A6/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/AVvXsEh7v8qBuq58oMogJATmRzngsONlaC6BymBj4xxc9yBusG8PVcnBe_FZWlPoxQ1czYFW7Ma2E8JMxWpP0a7CHDlcDQmLDPFSH0ZttYSGL599AXWeRJbu4f6_zxlWSsrf7_vWZoq1sEsIJjXN/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