Chèn Emoticons Yahoo-Ảnh không cần thẻ cho comment Blogspot

Thủ thuật này là gói tiện ích 2 trong 1 vì nó bao gồm biểu cảm yahoo,post ảnh không cần thẻ,chỉ việc dán link trực tiếp vào comment,post ảnh không để lại link.

Trước đây có thể post được cả nhaccuatui và youtube nhưng hiện tại 2 chức năng đó không còn sử dụng được nữa.
Emoticons Yahoo qua chọn lọc chỉ lấy 28 biểu cảm hay dùng nhất.Cách sử dụng thì chỉ cần gõ đúng ký tự emoticon yahoo mà ta thường gõ trong chat ở yahoo là đươc nếu không nhớ thì code cũng đã có phần hướng dẫn ký tự.

Cài đặt thì rất đơn giản.
Tiến hành cài đặt:
1- Đăng nhập Blog,vào Thiết kế chọn Mẫu.
2- Vào chỉnh sửa HTML(Mở rộng mẫu tiện ích)
3- Tìm tới đoạn code:
<data:blogTeamBlogMessage/>

Đây là bước hiện biểu tượng yahoo cùng với ký tự tương ứng(có một comment mới xuất hiện)
Thường thì có 4 đoạn như vậy ta dán code dưới đây vào ngay sau đoạn cuối cùng

Lưu ý: Với các mẫu mới cần tìm đoạn
<b:include data='post' name='comments'/>
nằm trong cặp thẻ <body>....</body>
<b:if cond='data:view.isPost'>
                        <script>
                          /*<![CDATA[*/
                          function moreSmilies() {
                            document.getElementById('smiley-more').style.display = 'inline';
                            document.getElementById('smiley-toggle').innerHTML = '<a href="javascript:lessSmilies()">&#8592;</a></span>';
                          }
                          function lessSmilies() {
                            document.getElementById('smiley-more').style.display = 'none';
                            document.getElementById('smiley-toggle').innerHTML = '<a href="javascript:moreSmilies()">&#8594;</a>';
                          }
                          /*]]>*/
                        </script>
                        <div class='emoticons'>
                          <img src='https://2.bp.blogspot.com/-_bPsmyuliuw/WBGvi8M-D-I/AAAAAAAAB4Y/MvWQq5Kl8lglmgSYOWblwacK25GAUA3mACLcB/s1600/1.gif'/>
                          :)
                          <img src='https://1.bp.blogspot.com/-JrUy-b7a38g/WBGvk6MIIdI/AAAAAAAAB5E/dDYq2PP9sAgngaVc5Re3IsE_HA7pDqObQCLcB/s1600/2.gif'/>
                          :))
                          <img src='https://2.bp.blogspot.com/-Qaa073VHx_w/WBGvmror7cI/AAAAAAAAB5w/3onoHGZUVdEVayVepob-1yUXfxzkHVCBwCLcB/s1600/3.gif'/>
                          :-*
                          <img src='https://2.bp.blogspot.com/-zmanVRarO6E/WBGvmup7nYI/AAAAAAAAB5o/bsgP510864E1vAxTb2o7x0Gi7rsCgQaXQCLcB/s1600/4.gif'/>
                          :D
                          <img src='https://4.bp.blogspot.com/-lEUooKfeBp0/WBGvnADPWOI/AAAAAAAAB50/eUoDNl2tPqoYQM58m-rs654VPHzfmvqNQCLcB/s1600/5.gif'/>
                          =))
                          <img src='https://3.bp.blogspot.com/-CI6eE_EJLI0/WBGvnCETCUI/AAAAAAAAB54/6Sto112DAAsPCQlHYANiaUy_s3jR4K4ZgCLcB/s1600/6.gif'/>
                          :((
                          <img src='https://2.bp.blogspot.com/-nSgwLlpDVGU/WBGvnYxm7zI/AAAAAAAAB58/gO6xkDBnFDwoxCUuTUoJQB6LJZMGAR8pACLcB/s1600/7.gif'/>
                          :(
                          <span id='smiley-more' style='display: none;'>
                            <img src='https://3.bp.blogspot.com/-xOZVaIH0EdA/WBGvnt-dLhI/AAAAAAAAB6A/7ewmssd6F8kzF1ITQKW0oVAidMyILZDJQCLcB/s1600/8.gif'/>
                            ~X
                            <img src='https://1.bp.blogspot.com/-H2hi9o9L2jk/WBGvn45v3wI/AAAAAAAAB6E/HkZFKAhf30Eplr0BaMgWoFf5mgpAXNqxACLcB/s1600/9.gif'/>
                            :-h
                            <img src='https://4.bp.blogspot.com/-8eaxReCu9WI/WBGvi6WaLmI/AAAAAAAAB4c/IrM7dvIUsaIODPk08Z9fg_tZwIp4c0YMACLcB/s1600/10.gif'/>
                            :-?
                            <img src='https://3.bp.blogspot.com/-s3pX9jZH39g/WBGvi47RAuI/AAAAAAAAB4g/V6iUR0gFfGYPJkMeRBqDCxr4fk2Y-BL_wCLcB/s1600/11.gif'/>
                            b-)
                            <img src='https://1.bp.blogspot.com/-qbE8v5CFQhY/WBGvjdkmKSI/AAAAAAAAB4k/wX44dR05kQUltbL_94iKOB6_ag9zEdNXACLcB/s1600/12.gif'/>
                            *-:
                            <img src='https://2.bp.blogspot.com/-wgcltwc8VWo/WBGvjftchKI/AAAAAAAAB4o/lHBCzM0_Ht4YKUu9uc-7XfMnYk9vVXt6gCLcB/s1600/13.gif'/>
                            ~O)
                            <img src='https://2.bp.blogspot.com/-x1bFb3FMcFc/WBGvjnH2GoI/AAAAAAAAB4s/D1uWP1C9Z_ItO15MFFUWSQ0OGAukIPNAwCLcB/s1600/14.gif'/>
                            @};-
                            <img src='https://1.bp.blogspot.com/-itAIFEI1lvo/WBGvjwZ4GkI/AAAAAAAAB4w/Ob4uuQhQJHoxHGW0UMX12qLnkMAuhe4ygCLcB/s1600/15.gif'/>
                            &gt;:D&lt;
                            <img src='https://2.bp.blogspot.com/-4t8tac0cjFI/WBGvkFT5K5I/AAAAAAAAB44/jYFX_wQliYcW_Arw1EusbhdNS0c6PA8owCLcB/s1600/16.gif'/>
                            [-X
                            <img src='https://4.bp.blogspot.com/-1AF9PhQJ4Ys/WBGvkLTw7_I/AAAAAAAAB40/HxUpPVModWkmLPt7DrLkUzl3nSrLZaDLwCLcB/s1600/17.gif'/>
                            X(
                            <img src='https://4.bp.blogspot.com/-aIPxpqjA1Qk/WBGvkQrKkoI/AAAAAAAAB48/qvia1LzpTAo53sdki5UxduE2lp6xz2rZgCLcB/s1600/18.gif'/>
                            :-O
                            <img src='https://4.bp.blogspot.com/-qXY4tYDn2ck/WBGvkgWSlXI/AAAAAAAAB5A/PDrmROzJ4Gc-g_eMtfxyWr31YFcQYAdEACLcB/s1600/19.gif'/>
                            &gt;:P
                            <img src='https://2.bp.blogspot.com/-rDQCLeZhXO0/WBGvk0R1flI/AAAAAAAAB5I/MXJ4dpxJBa0uVajEQSYL4bcU9q46azsZACLcB/s1600/20.gif'/>
                            =D&gt;
                            <img src='https://3.bp.blogspot.com/-BObwomyosos/WBGvlG-xSJI/AAAAAAAAB5M/MBkyMAu17ykBMWxGX6SX4F5LOqTOBuDqwCLcB/s1600/21.gif'/>
                            :@)
                            <img src='https://2.bp.blogspot.com/-LgDX-qUH_mo/WBGvlc-rYNI/AAAAAAAAB5Q/INDJdthibI4Zm0hcKigpsQBYTRycHpWvgCLcB/s1600/22.gif'/>
                            :P
                            <img src='https://3.bp.blogspot.com/-SFUq01ElNTM/WBGvlaarOJI/AAAAAAAAB5U/ctIEOMXcacYJA4hL_chqfe7Rkyaz6oEEwCLcB/s1600/23.gif'/>
                            :&quot;&gt;
                            <img src='https://1.bp.blogspot.com/--QdD32bdNsg/WBGvllU4HWI/AAAAAAAAB5Y/viCA45Fg8mcslQMxW8Ua3HMSOsohHCQSACLcB/s1600/24.gif'/>
                            ;;)
                            <img src='https://2.bp.blogspot.com/-ghwKw8Ip9MI/WBGvl5lO-KI/AAAAAAAAB5k/8dc698tGKd4rWwO7buCBaD2-ImcEXdlGgCLcB/s1600/25.gif'/>
                            ;)
                            <img src='https://4.bp.blogspot.com/-Hq9JXvQkEIU/WBGvl2WeWAI/AAAAAAAAB5c/Hu57LeiDRH0BpBVONT3aa5YILOhKVGlPwCLcB/s1600/26.gif'/>
                            :x
                            <img src='https://1.bp.blogspot.com/-Eoddg0Wl87U/WBGvl3Q5R_I/AAAAAAAAB5g/3ajOiVCOuIIjqxq0g2gBfzwQgmJ158N7ACLcB/s1600/27.gif'/>
                            =((
                            <img src='https://3.bp.blogspot.com/-jdM4NXZ7iGM/WBGvmRDtS-I/AAAAAAAAB5s/4V2JPyfbWo4TUFbUJ5-n1CwZAQt0pi_aQCLcB/s1600/28.gif'/>
                            :-/
                          </span>
                          <span id='smiley-toggle'>
                            <a href='javascript:moreSmilies()'>
                              &#8594;
                            </a>
                          </span>
                        </div>
                      </b:if>
4- Tìm tới thẻ: </body>
Chèn đoạn code sau vào trước nó
<b:if cond='data:view.isPost'>
    <script>
/*<![CDATA[*/
document.getElementsByClassName = function(clsName){
    var retVal = new Array();
    var elements = document.getElementsByTagName("*");
    for(var i = 0;i < elements.length;i++){
        if(elements[i].className.indexOf(" ") >= 0){
            var classes = elements[i].className.split(" ");
            for(var j = 0;j < classes.length;j++){
                if(classes[j] == clsName)
                    retVal.push(elements[i]);
            }
        }
        else if(elements[i].className == clsName)
            retVal.push(elements[i]);
    }
    return retVal;
}

function addSmiley(dummy)
{
  var d = [], i=0, def = ['comment-block','comment-body','comment-post-messages'];

  for(i=0;i<def.length;i++)
  {
 var content = document.getElementsByClassName(def[i]);
 for(var j=0;j<content.length;j++)
  d.push(content[j]);
  }
  for(var i=0;i<d.length;i++)
  {
var theText = d[i].innerHTML;
//Multimedia

     theText = theText.replace(/(\b)https:\/\/(youtu.be\/|www.youtube.com\/watch\?v\=)([A-z0-9]{1,})(\b)/g, "<iframe width='300' height='240' src='https://www.youtube.com/embed/$3?rel=0'  frameborder='0' allowfullscreen></iframe>");
      theText = theText.replace(/(\b)https:\/\/www.nhaccuatui.com\/nghe\?M\=([A-z0-9]{1,})(\b)/g,"<div style='overflow:hidden'><embed style='margin-top:-350px;width:300px;height:400px' src='https://www.nhaccuatui.com/m/$2' quality='high' flashvars='autostart=false' wmode='transparent' type='application/x-shockwave-flash'></embed></div>");
      theText = theText.replace(/(\b)https:\/\/www.nhaccuatui.com\/m\/([A-z0-9]{1,})(\b)/g,"<div style='overflow:hidden'><embed style='margin-top:-350px;width:300px;height:400px' src='https://www.nhaccuatui.com/m/$2' quality='high' flashvars='autostart=false' wmode='transparent' type='application/x-shockwave-flash'></embed></div>");
      theText = theText.replace(/(\b)https:\/\/www.nhaccuatui.com\/nghe\?L\=([A-z0-9]{1,})(\b)/g,"<div style='overflow:hidden'><embed style='margin-top:-250px;width:300px;height:400px' src='https://www.nhaccuatui.com/l/$2' quality='high' flashvars='autostart=false' wmode='transparent' type='application/x-shockwave-flash'></embed></div>");
      theText = theText.replace(/(\b)https:\/\/www.nhaccuatui.com\/l\/([A-z0-9]{1,})(\b)/g,"<div style='overflow:hidden'><embed style='margin-top:-250px;width:300px;height:400px' src='https://www.nhaccuatui.com/l/$2' quality='high' flashvars='autostart=false' wmode='transparent' type='application/x-shockwave-flash'></embed></div>");
      theText = theText.replace(/(\b)(https:\/\/[^\s\t\r\n]{1,}\.mp3)(\b)/g,"$1<audio controls><source src='horse.ogg' type='audio/ogg'><source src='$2' type='audio/mpeg'>Your browser does not support the audio element.</audio>$3");
      theText = theText.replace(/(\b)(https?:\/\/[^\<]{1,}\.)(gif|jpg|jpeg|png|bmp)(\b)/g,"$1<div style='clear:both'></div><img  style='float:left;margin:10px 0;border:1px solid #DDD;max-width:590px;background:#FFF;padding:4px' alt='com-img' src='$2$3' /><div style='clear:both'></div>$4");
//Emoticons

theText = theText.replace(/\:\(\(/ig,"<img style='border: 0; padding:0'  src='https://3.bp.blogspot.com/-CI6eE_EJLI0/WBGvnCETCUI/AAAAAAAAB54/6Sto112DAAsPCQlHYANiaUy_s3jR4K4ZgCLcB/s1600/6.gif' />")
theText = theText.replace (/\:\(/ig,"<img style='border: 0; padding:0'  src='https://2.bp.blogspot.com/-nSgwLlpDVGU/WBGvnYxm7zI/AAAAAAAAB58/gO6xkDBnFDwoxCUuTUoJQB6LJZMGAR8pACLcB/s1600/7.gif'/>")
theText = theText.replace (/\:\)\)/ig,"<img style='border: 0; padding:0'  src='https://1.bp.blogspot.com/-JrUy-b7a38g/WBGvk6MIIdI/AAAAAAAAB5E/dDYq2PP9sAgngaVc5Re3IsE_HA7pDqObQCLcB/s1600/2.gif'/>")
theText = theText.replace (/\~X\(/ig,"<img style='border: 0; padding:0'  src='https://3.bp.blogspot.com/-xOZVaIH0EdA/WBGvnt-dLhI/AAAAAAAAB6A/7ewmssd6F8kzF1ITQKW0oVAidMyILZDJQCLcB/s1600/8.gif'/>")
theText = theText.replace (/\:\-h/ig,"<img style='border: 0; padding:0'  src='https://1.bp.blogspot.com/-H2hi9o9L2jk/WBGvn45v3wI/AAAAAAAAB6E/HkZFKAhf30Eplr0BaMgWoFf5mgpAXNqxACLcB/s1600/9.gif'/>")
theText = theText.replace (/\:-\?/ig,"<img style='border: 0; padding:0'  src='https://4.bp.blogspot.com/-8eaxReCu9WI/WBGvi6WaLmI/AAAAAAAAB4c/IrM7dvIUsaIODPk08Z9fg_tZwIp4c0YMACLcB/s1600/10.gif'/>")
theText = theText.replace (/b-\)/ig,"<img style='border: 0; padding:0'  src='https://3.bp.blogspot.com/-s3pX9jZH39g/WBGvi47RAuI/AAAAAAAAB4g/V6iUR0gFfGYPJkMeRBqDCxr4fk2Y-BL_wCLcB/s1600/11.gif'/>")
theText = theText.replace(/\*\-\:\)/ig,"<img style='border: 0; padding:0'  src='https://1.bp.blogspot.com/-qbE8v5CFQhY/WBGvjdkmKSI/AAAAAAAAB4k/wX44dR05kQUltbL_94iKOB6_ag9zEdNXACLcB/s1600/12.gif'/>")
theText = theText.replace(/\~O\)/ig,"<img style='border: 0; padding:0'  src='https://2.bp.blogspot.com/-wgcltwc8VWo/WBGvjftchKI/AAAAAAAAB4o/lHBCzM0_Ht4YKUu9uc-7XfMnYk9vVXt6gCLcB/s1600/13.gif'/>")
theText = theText.replace (/\@\}\;\-/ig,"<img style='border: 0; padding:0'  src='https://2.bp.blogspot.com/-x1bFb3FMcFc/WBGvjnH2GoI/AAAAAAAAB4s/D1uWP1C9Z_ItO15MFFUWSQ0OGAukIPNAwCLcB/s1600/14.gif'/>")
theText = theText.replace(/\&gt;\:\D\&lt;/ig,"<img style='border: 0; padding:0'  src='https://1.bp.blogspot.com/-itAIFEI1lvo/WBGvjwZ4GkI/AAAAAAAAB4w/Ob4uuQhQJHoxHGW0UMX12qLnkMAuhe4ygCLcB/s1600/15.gif' alt='>:-D<'/>")
theText =theText.replace(/\=\)\)/ig,"<img style='border: 0; padding:0'  src='https://4.bp.blogspot.com/-lEUooKfeBp0/WBGvnADPWOI/AAAAAAAAB50/eUoDNl2tPqoYQM58m-rs654VPHzfmvqNQCLcB/s1600/5.gif' alt='=)'/>")
theText = theText.replace (/\:\)/ig,"<img style='border: 0; padding:0'  src='https://2.bp.blogspot.com/-_bPsmyuliuw/WBGvi8M-D-I/AAAAAAAAB4Y/MvWQq5Kl8lglmgSYOWblwacK25GAUA3mACLcB/s1600/1.gif'/>")
theText = theText.replace(/\:\-\*/ig,"<img style='border: 0; padding:0'  src='https://2.bp.blogspot.com/-Qaa073VHx_w/WBGvmror7cI/AAAAAAAAB5w/3onoHGZUVdEVayVepob-1yUXfxzkHVCBwCLcB/s1600/3.gif' />")
theText = theText.replace(/\:D/ig,"<img style='border: 0; padding:0'  src='https://2.bp.blogspot.com/-zmanVRarO6E/WBGvmup7nYI/AAAAAAAAB5o/bsgP510864E1vAxTb2o7x0Gi7rsCgQaXQCLcB/s1600/4.gif' alt=':-D'/>")
theText = theText.replace(/\[-*x/ig,"<img style='border: 0; padding:0'  src='https://2.bp.blogspot.com/-4t8tac0cjFI/WBGvkFT5K5I/AAAAAAAAB44/jYFX_wQliYcW_Arw1EusbhdNS0c6PA8owCLcB/s1600/16.gif' alt='[-X'/>")
theText = theText.replace(/\s*x\(/ig,"<img style='border: 0; padding:0'  src='https://4.bp.blogspot.com/-1AF9PhQJ4Ys/WBGvkLTw7_I/AAAAAAAAB40/HxUpPVModWkmLPt7DrLkUzl3nSrLZaDLwCLcB/s1600/17.gif' alt='X('/>")
theText = theText.replace(/\:-O/ig,"<img style='border: 0; padding:0'  src='https://4.bp.blogspot.com/-aIPxpqjA1Qk/WBGvkQrKkoI/AAAAAAAAB48/qvia1LzpTAo53sdki5UxduE2lp6xz2rZgCLcB/s1600/18.gif' alt=':-O'/>")
theText = theText.replace(/\&gt;:P/ig,"<img style='border: 0; padding:0'  src='https://4.bp.blogspot.com/-qXY4tYDn2ck/WBGvkgWSlXI/AAAAAAAAB5A/PDrmROzJ4Gc-g_eMtfxyWr31YFcQYAdEACLcB/s1600/19.gif' alt='>:P'/>") 
theText = theText.replace(/\=D&gt;/ig,"<img style='border: 0; padding:0'  src='https://2.bp.blogspot.com/-rDQCLeZhXO0/WBGvk0R1flI/AAAAAAAAB5I/MXJ4dpxJBa0uVajEQSYL4bcU9q46azsZACLcB/s1600/20.gif' alt='=D>'/>")
theText = theText.replace (/\:\@\)/ig,"<img style='border: 0; padding:0'  src='https://3.bp.blogspot.com/-BObwomyosos/WBGvlG-xSJI/AAAAAAAAB5M/MBkyMAu17ykBMWxGX6SX4F5LOqTOBuDqwCLcB/s1600/21.gif'/>")
theText = theText.replace (/\:\P/ig,"<img style='border: 0; padding:0'  src='https://2.bp.blogspot.com/-LgDX-qUH_mo/WBGvlc-rYNI/AAAAAAAAB5Q/INDJdthibI4Zm0hcKigpsQBYTRycHpWvgCLcB/s1600/22.gif'/>")

theText = theText.replace (/\:\"\&gt;/ig,"<img style='border: 0; padding:0'  src='https://3.bp.blogspot.com/-SFUq01ElNTM/WBGvlaarOJI/AAAAAAAAB5U/ctIEOMXcacYJA4hL_chqfe7Rkyaz6oEEwCLcB/s1600/23.gif'/>")
theText = theText.replace(/\;;\)/ig,"<img style='border: 0; padding:0'  src='https://1.bp.blogspot.com/--QdD32bdNsg/WBGvllU4HWI/AAAAAAAAB5Y/viCA45Fg8mcslQMxW8Ua3HMSOsohHCQSACLcB/s1600/24.gif' />")
theText = theText.replace(/\;\)/ig,"<img style='border: 0; padding:0'  src='https://2.bp.blogspot.com/-ghwKw8Ip9MI/WBGvl5lO-KI/AAAAAAAAB5k/8dc698tGKd4rWwO7buCBaD2-ImcEXdlGgCLcB/s1600/25.gif' alt=';)'/>")
theText = theText.replace(/\:x/ig,"<img style='border: 0; padding:0'  src='https://4.bp.blogspot.com/-Hq9JXvQkEIU/WBGvl2WeWAI/AAAAAAAAB5c/Hu57LeiDRH0BpBVONT3aa5YILOhKVGlPwCLcB/s1600/26.gif'alt=':X'/>")
theText = theText.replace(/\=\(\(/ig,"<img style='border: 0; padding:0'  src='https://1.bp.blogspot.com/-Eoddg0Wl87U/WBGvl3Q5R_I/AAAAAAAAB5g/3ajOiVCOuIIjqxq0g2gBfzwQgmJ158N7ACLcB/s1600/27.gif' alt='=('/>")
theText = theText.replace(/\:\-\//ig,"<img style='border: 0; padding:0'  src='https://3.bp.blogspot.com/-jdM4NXZ7iGM/WBGvmRDtS-I/AAAAAAAAB5s/4V2JPyfbWo4TUFbUJ5-n1CwZAQt0pi_aQCLcB/s1600/28.gif' alt=':-C'/>")


//Font-size & Color
      theText = theText.replace(/\[size=\"(?:(\d{1,2}))\"\]/gi,"<span style=\'font-size:$1px\'>");
      theText = theText.replace(/\[\/size\]/gi,"</span>");
      theText = theText.replace(/\[color=\"(?:([a-z]{3,}|#[a-f0-9]{3,6}))\"\]/gi,"<span style=\'color:$1\'</span>");
      theText = theText.replace(/\[\/color\]/gi,"</span>");

d[i].innerHTML = theText;

    }
}

function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      oldonload();
      func();
    }
  }
}

addLoadEvent(function(){
addSmiley();
});
/*]]>*/
</script>
  </b:if>
5- Tìm tới thẻ ]]></b:skin> và dán đoạn code sau trước nó:
.emoticons {-moz-background-clip: -moz-initial;-moz-background-origin: -moz-initial;-moz-background-inline-policy: -moz-initial;text-align: left;}
.emoticons a, .emoticons a:hover {font-size: 28px;margin-left: 20px;text-decoration:none;} .comment-block img {
max-width: 400px !important;
}
max-width:400px là giới hạn kích thước ảnh ở phần commen có thể chỉnh sửa theo ý bạn,thường hay để từ 300px tới 400px
Như vậy là hoàn thành
Nguồn :internet
Publis: 

Post a Comment

🙂😬😀😂🤣😍💖
Windows + . hoặc Windows + ; để chèn emoji