3/11/14

Tổng hợp cách chèn emoticons cho blogspot






1. Chèn Emoticons dạng Kolobok Smileys




Trước khi bắt tay vào thực hiện các bước dưới đây, bạn phải gỡ bỏ hệ thống nhận xét phân cấp (threaded comments) khỏi blog thì các biểu tượng cảm xúc mới thể hiện được.

Bước 1: Dashboard → Template → Edit HTML → Proceed → Expand Widget Template.

Bước 2: Sử dụng tổ hợp phím Ctrl+F để tìm đến khóa </body> và chèn ngay phía trên nó đoạn mã sau đây:

<!--kolobok-smileys--> <script src='http://shareallworld.googlecode.com/files/kolobok-smileys.js' type='text/javascript'/><noscript><a href='http://helplogger.blogspot.com/2012/04/how-to-add-emoticonssmileys-in-blogger.html' target='_blank'><span style='font-size: x-small;'>Chèn emoticons</span></a></noscript> <!--kolobok-smileys-->


Bước 3: Tìm đến đoạn mã <b:loop values='data:post.comments' var='comment'> và chèn ngay trên nó khóa <div id='smileys'>.
Kéo chuột xuống dưới, tìm đến từ khóa </b:loop> (là khóa đóng cho đoạn mã <b:loop values='data:post.comments' var='comment'> ở trên). Ngay sau nó, chèn từ khóa</div> (là khóa đóng cho đoạn <div id='smileys'> mới chèn vào ở trên).

Bước 4: Tìm đoạn code <data:blogTeamBlogMessage/> (bạn có thể tìm thấy 4 đoạn mã như vậy, chọn đoạn thứ 2). Ngay dưới đoạn mã tìm được, bạn chèn đoạn mã sau đây:
<script type='text/javascript'> //<![CDATA[ function moreSmilies() { document.getElementById('smiley-more').style.display = 'inline'; document.getElementById('smiley-toggle').innerHTML = '<a href="javascript:lessSmilies()"><div style="font-size:small; font-weight:bold;color:#000000;">Ẩn Emoticons /<a href="http://helplogger.blogspot.com/2012/04/how-to-add-emoticonssmileys-in-blogger.html">Chèn Emoticons</div></a></span>'; } function lessSmilies() { document.getElementById('smiley-more').style.display = 'none'; document.getElementById('smiley-toggle').innerHTML = '<a href="javascript:moreSmilies()"><div style="font-size:small; font-weight:bold;">Hiện Emoticons</div></a>'; } //]]> </script> <div class='emoticons'> <span id='smiley-more' style='display: none;'> <img src='http://i1065.photobucket.com/albums/u389/treeofwisdom4/Smileys/smile3.gif'/>:) <img src='http://i1065.photobucket.com/albums/u389/treeofwisdom4/Smileys/sad3.gif'/>:( <img src='http://i1065.photobucket.com/albums/u389/treeofwisdom4/Smileys/laugh.gif'/>:)) <img src='http://i1065.photobucket.com/albums/u389/treeofwisdom4/Smileys/cray-1.gif'/>:(( <img src='http://i1065.photobucket.com/albums/u389/treeofwisdom4/Smileys/rofl-1.gif'/>=)) <img src='http://i1065.photobucket.com/albums/u389/treeofwisdom4/Smileys/suicide-1.gif'/>=D&gt; <img src='http://i1065.photobucket.com/albums/u389/treeofwisdom4/Smileys/biggrin2.gif'/>:D <img src='http://i1065.photobucket.com/albums/u389/treeofwisdom4/Smileys/blum.gif'/>:P <img src='http://i1065.photobucket.com/albums/u389/treeofwisdom4/Smileys/shok.gif'/>:-O <img src='http://i1065.photobucket.com/albums/u389/treeofwisdom4/Smileys/eusa_think.gif'/>:-? <img src='http://i1065.photobucket.com/albums/u389/treeofwisdom4/Smileys/unsure.gif'/>:-SS <img src='http://i1065.photobucket.com/albums/u389/treeofwisdom4/Smileys/flowers1-1.gif'/>:-f <img src='http://i1065.photobucket.com/albums/u389/treeofwisdom4/Smileys/doh-1.gif'/>d( <img src='http://i1065.photobucket.com/albums/u389/treeofwisdom4/Smileys/air_kiss3.gif'/>:-* <img src='http://i1065.photobucket.com/albums/u389/treeofwisdom4/Smileys/threaten-1.gif'/>b-( <img src='http://i1065.photobucket.com/albums/u389/treeofwisdom4/Smileys/help2.gif'/>h-( <img src='http://i1065.photobucket.com/albums/u389/treeofwisdom4/Smileys/good-1.gif'/>g-) <img src='http://i1065.photobucket.com/albums/u389/treeofwisdom4/Smileys/beee-1.gif'/>5-p <img src='http://i1065.photobucket.com/albums/u389/treeofwisdom4/Smileys/yahoo2-1.gif'/>y-) <img src='http://i1065.photobucket.com/albums/u389/treeofwisdom4/Smileys/crazy3-1.gif'/>c-) <img src='http://i1065.photobucket.com/albums/u389/treeofwisdom4/Smileys/spiteful.gif'/>s-) <img src='http://i1065.photobucket.com/albums/u389/treeofwisdom4/Smileys/drinks-1.gif'/>d-) <img src='http://i1065.photobucket.com/albums/u389/treeofwisdom4/Smileys/cheer-1.gif'/>w-) <img src='http://i1065.photobucket.com/albums/u389/treeofwisdom4/Smileys/hi-1.gif'/>:-h <img src='http://i1065.photobucket.com/albums/u389/treeofwisdom4/Smileys/give_heart-1.gif'/>:X </span> <span id='smiley-toggle'><a href='javascript:moreSmilies()'><div style='font-size:small;font-weight:bold;'>Hiện Emoticons <img src='http://i1065.photobucket.com/albums/u389/treeofwisdom4/Smileys/smile3.gif'/></div></a></span> </div>



Bước 5: Tìm đoạn mã ]]></b:skin> và chèn ngay trước nó đoạn mã sau đây:
.emoticons {-moz-background-clip: -moz-initial;-moz-background-origin: -moz-initial;-moz-background-inline-policy: -moz-initial;text-align: left;width:580px;} .emoticons a, .emoticons a:hover {margin-left: 20px;text-decoration:none;}


Bạn có thể thay đổi số 580 để điều chỉnh độ rộng khung chứa các emoticons.


Bước 6: Lưu lại và thưởng thức thành quả của bạn.


2. Chèn Yahoo smiley cho Threaded comments của blogger



Bước 1: Dashboard → Template → Edit HTML → Proceed → Expand Widget Template.

Bước 2: Tìm đoạn mã ]]></b:skin> và chèn ngay trước nó đoạn mã sau đây:
<!-- Yahoo Smileys by http://www.cuanhcuem.net Code Start--> .ysmiley { background: none repeat scroll 0 0 #EFF5FB !important; font-size: medium !important; padding: 10px !important; text-align: left !important; font-weight:bold !important; font-size:11px !important; margin-top:-35px; } img.bhacksmly { height: auto !important; vertical-align: middle !important; width: auto !important; border:0px !important; } <!-- Yahoo Smileys Code End-->


Bước 3: Tìm đến đoạn mã dưới đây:
<b:if cond='data:post.allowNewComments'> <b:include data='post' name='threaded-comment-form'/>


và chèn vào giữa 2 dòng mã đó đoạn mã sau đây:
<!-- Yahoo Smileys by http://www.cuanhcuem.net Star--> <div class='ysmiley'> <img alt='' class='bhacksmly' src='http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/1.gif'/> :) <img alt='' class='bhacksmly' src='http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/2.gif'/> :( <img alt='' class='bhacksmly' src='http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/3.gif'/> ;) <img alt='' class='bhacksmly' src='http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/4.gif'/> :D <img alt='' class='bhacksmly' src='http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/5.gif'/> ;;-) <img alt='' class='bhacksmly' src='http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/7.gif'/> :-/ <img alt='' class='bhacksmly' src='http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/8.gif'/> :x <img alt='' class='bhacksmly' src='http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/10.gif'/> :P <img alt='' class='bhacksmly' src='http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/11.gif'/> :-* <img alt='' class='bhacksmly' src='http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/12.gif'/> =(( <img alt='' class='bhacksmly' src='http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/13.gif'/> :-O <img alt='' class='bhacksmly' src='http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/14.gif'/> X( <img alt='' class='bhacksmly' src='http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/15.gif'/> :7 <img alt='' class='bhacksmly' src='http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/16.gif'/> B-) <img alt='' class='bhacksmly' src='http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/17.gif'/> :-S <img alt='' class='bhacksmly' src='http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/18.gif'/> #:-S <img alt='' class='bhacksmly' src='http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/19.gif'/> 7:) <img alt='' class='bhacksmly' src='http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/20.gif'/> :(( <img alt='' class='bhacksmly' src='http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/21.gif'/> :)) <img alt='' class='bhacksmly' src='http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/22.gif'/> :| <img alt='' class='bhacksmly' src='http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/23.gif'/> /:) <img alt='' class='bhacksmly' src='http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/24.gif'/> =)) <img alt='' class='bhacksmly' src='http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/25.gif'/> O:-) <img alt='' class='bhacksmly' src='http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/26.gif'/> :-B <img alt='' class='bhacksmly' src='http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/27.gif'/> =; <img alt='' class='bhacksmly' src='http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/101.gif'/> :-c <img alt='' class='bhacksmly' src='http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/100.gif'/> :)] <img alt='' class='bhacksmly' src='http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/102.gif'/> ~X( <img alt='' class='bhacksmly' src='http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/103.gif'/> :-h <img alt='' class='bhacksmly' src='http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/104.gif'/> :-t <img alt='' class='bhacksmly' src='http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/105.gif'/> 8-7 <img alt='' class='bhacksmly' src='http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/28.gif'/> I-) <img alt='' class='bhacksmly' src='http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/29.gif'/> 8-| <img alt='' class='bhacksmly' src='http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/29.gif'/> L-) <img alt='' class='bhacksmly' src='http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/31.gif'/> :-a <img alt='' class='bhacksmly' src='http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/32.gif'/> :-$ <img alt='' class='bhacksmly' src='http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/33.gif'/> [-( <img alt='' class='bhacksmly' src='http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/34.gif'/> :O) <img alt='' class='bhacksmly' src='http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/35.gif'/> 8-} <img alt='' class='bhacksmly' src='http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/36.gif'/> 2:-P <img alt='' class='bhacksmly' src='http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/37.gif'/> (:| <img alt='' class='bhacksmly' src='http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/38.gif'/> =P~ <img alt='' class='bhacksmly' src='http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/39.gif'/> <img alt='' class='bhacksmly' src='http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/40.gif'/> #-o <img alt='' class='bhacksmly' src='http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/41.gif'/> =D7 <img alt='' class='bhacksmly' src='http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/42.gif'/> :-SS <img alt='' class='bhacksmly' src='http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/43.gif'/> @-) <img alt='' class='bhacksmly' src='http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/44.gif'/> :^o <img alt='' class='bhacksmly' src='http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/45.gif'/> :-w <img alt='' class='bhacksmly' src='http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/47.gif'/> 7:P <img alt='' class='bhacksmly' src='http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/48.gif'/> 2):) <img alt='' class='bhacksmly' src='http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/109.gif'/> X_X <img alt='' class='bhacksmly' src='http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/110.gif'/> :!! <img alt='' class='bhacksmly' src='http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/111.gif'/> \m/ <img alt='' class='bhacksmly' src='http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/112.gif'/> :-q <img alt='' class='bhacksmly' src='http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/113.gif'/> :-bd <img alt='' class='bhacksmly' src='http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/114.gif'/> ^#(^ <img alt='' class='bhacksmly' src='http://l.yimg.com/a/i/us/msg/emoticons/pirate_2.gif'/> :ar! </div> <!-- Yahoo Smileys by http://cuanhcuem.net End-->



Bước 4: Tìm đền khóa </body> và chèn ngay trên đó đoạn mã sau:
<!-- Yahoo Smileys Script by http://cuanhcuem.net --> <script src='http://shareallworld.googlecode.com/files/ysmiley_fixed.js' type='text/javascript'/> <!--Yahoo Smileys Script Ends -->



Bước 5: Lưu lại và thưởng thức thành quả của bạn.


3. Chèn 3D smiley động cho Threaded comments


c .
Bước 1: Dashboard → Template → Edit HTML → Proceed → Expand Widget Template.

Bước 2: Tìm đến khóa </body> và ngay trên nó, chèn đoạn mã dưới đây vào:

<script type='text/javascript'> //<![CDATA[ function replaceText(){if(!document.getElementById){return;} bodyText = document.getElementById("comment-holder"); theText = bodyText.innerHTML; theText = theText.replace(/:\)\)/gi, "<img src='http://lh4.ggpht.com/_u7a1IFxc4WI/TM-vt_XVZKI/AAAAAAAAATI/Q35_W0anT6A/21.gif'/>"); theText = theText.replace(/=d&gt;/gi, "<img src='http://lh6.ggpht.com/_u7a1IFxc4WI/TM-vzUt1yQI/AAAAAAAAATY/QHNvnj0gYbU/41.gif'/>"); theText = theText.replace(/:d/gi, "<img src='http://lh3.ggpht.com/_u7a1IFxc4WI/TM-voxnkRKI/AAAAAAAAAS4/PjDn098vm3w/4.gif'/>"); theText = theText.replace(/:p/gi, "<img src='http://lh6.ggpht.com/_u7a1IFxc4WI/TM-vpDb68dI/AAAAAAAAAS8/Yv0Uu3qzG_Q/10.gif'/>"); theText = theText.replace(/:\(\(/gi, "<img src='http://lh4.ggpht.com/_u7a1IFxc4WI/TM-vt5z16MI/AAAAAAAAATE/Hx-7Thmr6do/20.gif'/>"); theText = theText.replace(/:\)/gi, "<img src='http://lh6.ggpht.com/_u7a1IFxc4WI/TM-voiNIw2I/AAAAAAAAASw/aav2hwqeG0c/1.gif'/>"); theText = theText.replace(/:\(/gi, "<img src='http://lh6.ggpht.com/_u7a1IFxc4WI/TM-voq7QQnI/AAAAAAAAAS0/UzoFJOCcPPU/2.gif'/>"); theText = theText.replace(/:-\?/gi, "<img src='http://lh5.ggpht.com/_u7a1IFxc4WI/TM-vua5MF2I/AAAAAAAAATU/N4X-ouMd1-I/39.gif'/>"); theText = theText.replace(/\[\-\(/gi, "<img src='http://lh6.ggpht.com/_u7a1IFxc4WI/TM-vuMg6RQI/AAAAAAAAATQ/rWj7euuKOZs/33.gif'/>"); theText = theText.replace(/:-o/gi, "<img src='http://lh6.ggpht.com/_u7a1IFxc4WI/TM-vpLiW1GI/AAAAAAAAATA/fPyPJcBks7s/13.gif'/>"); theText = theText.replace(/:-t/gi, "<img src='http://lh3.ggpht.com/_u7a1IFxc4WI/TM-vz4hwcNI/AAAAAAAAATo/4ySXuvQWma8/104.gif'/>"); theText = theText.replace(/:-ss/gi, "<img src='http://lh4.ggpht.com/_u7a1IFxc4WI/TM-vzUOH79I/AAAAAAAAATc/oNE5H5vcNtI/42.gif'/>"); theText = theText.replace(/b-\(/gi, "<img src='http://lh6.ggpht.com/_u7a1IFxc4WI/TM-vzrqI4MI/AAAAAAAAATk/BhfFnT0Gbro/66.gif'/>"); theText = theText.replace(/@-\)/gi, "<img src='http://lh6.ggpht.com/_u7a1IFxc4WI/TM-vziH8NXI/AAAAAAAAATg/2evEbN2cJwc/43.gif'/>"); theText = theText.replace(/=\)\)/gi, "<img src='http://lh6.ggpht.com/_u7a1IFxc4WI/TM-vuJ1G41I/AAAAAAAAATM/_jLHXvz6PTg/24.gif'/>"); bodyText.innerHTML = theText; }replaceText(); //]]> </script>



Bước 3: Tìm đến thẻ <b:loop values='data:post.comments' var='comment'> và thêm trước nó thẻ <div id='comment-holder'>. Tìm thẻ đóng </b:loop> và thêm sau nó thẻ </div>.

Bước 4: Tìm đến thẻ <data:blogTeamBlogMessage/> thứ 2 (thuờng thì có 4 cái như vậy) và chèn đoạn mã dưới đây vào sau nó.
<script type="text/javascript"> //<![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='http://lh6.ggpht.com/_u7a1IFxc4WI/TM-voiNIw2I/AAAAAAAAASw/aav2hwqeG0c/1.gif'/>:) <img src='http://lh6.ggpht.com/_u7a1IFxc4WI/TM-voq7QQnI/AAAAAAAAAS0/UzoFJOCcPPU/2.gif'/>:( <img src='http://lh4.ggpht.com/_u7a1IFxc4WI/TM-vt_XVZKI/AAAAAAAAATI/Q35_W0anT6A/21.gif'/>:)) <img src='http://lh4.ggpht.com/_u7a1IFxc4WI/TM-vt5z16MI/AAAAAAAAATE/Hx-7Thmr6do/20.gif'/>:(( <img src='http://lh6.ggpht.com/_u7a1IFxc4WI/TM-vuJ1G41I/AAAAAAAAATM/_jLHXvz6PTg/24.gif'/>=)) <span id='smiley-more' style='display: none;'> <img src='http://lh6.ggpht.com/_u7a1IFxc4WI/TM-vzUt1yQI/AAAAAAAAATY/QHNvnj0gYbU/41.gif'/>=D&gt; <img src='http://lh3.ggpht.com/_u7a1IFxc4WI/TM-voxnkRKI/AAAAAAAAAS4/PjDn098vm3w/4.gif'/>:D <img src='http://lh6.ggpht.com/_u7a1IFxc4WI/TM-vpDb68dI/AAAAAAAAAS8/Yv0Uu3qzG_Q/10.gif'/>:P <img src='http://lh6.ggpht.com/_u7a1IFxc4WI/TM-vpLiW1GI/AAAAAAAAATA/fPyPJcBks7s/13.gif'/>:-O <img src='http://lh5.ggpht.com/_u7a1IFxc4WI/TM-vua5MF2I/AAAAAAAAATU/N4X-ouMd1-I/39.gif'/>:-? <img src='http://lh4.ggpht.com/_u7a1IFxc4WI/TM-vzUOH79I/AAAAAAAAATc/oNE5H5vcNtI/42.gif'/>:-SS <img src='http://lh3.ggpht.com/_u7a1IFxc4WI/TM-vz4hwcNI/AAAAAAAAATo/4ySXuvQWma8/104.gif'/>:-t <img src='http://lh6.ggpht.com/_u7a1IFxc4WI/TM-vuMg6RQI/AAAAAAAAATQ/rWj7euuKOZs/33.gif'/>[-( <img src='http://lh6.ggpht.com/_u7a1IFxc4WI/TM-vziH8NXI/AAAAAAAAATg/2evEbN2cJwc/43.gif'/>@-) <img src='http://lh6.ggpht.com/_u7a1IFxc4WI/TM-vzrqI4MI/AAAAAAAAATk/BhfFnT0Gbro/66.gif'/>b-( </span> <span id='smiley-toggle'><a href="javascript:moreSmilies()">&#8594;</a></span> </div>

Đoạn mã trên là để hiển thị những ký tự tắt và emoticons tương ứng với nó cho người đọc có thể biết được để chèn vào khung Nhận xét. Vị trí của nó sẽ ở ngay trên hộp ký tự nơi bạn gõ nhận xét.

Bước 5: Tìm đến khóa ]]></b:skin> và chèn ngay trước nó đoạn mã sau:
.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;}


Bước 6: Lưu mẫu lại và cùng "chém phím" nào!


4. Chèn emoticons tổng hợp vui nhộn



Bước 1: Dashboard → Template → Edit HTML → Proceed → Expand Widget Template.
Bước 2: Tìm từ khóa </body> và chèn đoạn mã dưới đây ngay trên nó:

<b:if cond='data:blog.pageType == &quot;item&quot;'> <script type='text/javascript'> //<![CDATA[ var emoRange = "#comments p, div.emoWrap", putEmoAbove = "iframe#comment-editor", emoMessage = "Click vào biểu tượng sau đó copy xuống form comment"; //]]> </script> <script type='text/javascript'> //<![CDATA[ // Emoticon bar before comment-form $(function() { $(putEmoAbove) .before('<div style="text-align:center" class="emoWrap"> :) :)) ;(( :-) =)) ;( ;-( :d :-d @-) :p :o :&gt;) (o) [-( :-? (p) :-s (m) 8-) :-t :-b b-( :-# =p~ $-) (b) (f) x-) (k) (h) (c) cheer (sm) (fu) (ku) (bg) (lol)<br/><b><a href="javascript:openup_parseHTML()" rel="nofollow" title="Mã hóa code trước khi đưa vào bình luận"><span class="text_style">Mã hóa code đưa vào comments</span></a></b></div>'); var emo = function(emo, imgRep, emoKey) { $(emoRange) .each(function() { $(this) .html($(this) .html() .replace(/<br>:/g, "<br> :") .replace(/<br>;/g, "<br> ;") .replace(/<br>=/g, "<br> =") .replace(/<br>\^/g, "<br> ^") .replace(emo, " <img style='max-height:24px' src='" + imgRep + "' class='emo delayLoad' alt='" + emoKey + "' />")); }); }; emo(/\s:\)\)+/g, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhs5EKQMAwaRvK7Gw9aM7RF145r9vKKiwl6hH-PjTadv1w-RStfPdeJjjY4PIjJoEyi_Y3PlBsNDXJNYkXRtoqZIOIX_IyOeZv_tSZvRL9lFhp_uSLfposNfp3xrtbvQqP0j0700KJ1WRI/s36/03.gif", ":))"); emo(/\s;\(\(+/g, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigxSF39twGSq3v5jUU78tlDgm_oUpCcjC4bBshZ_PrdwN8OTMrX2rKM0yRj7_VvZObSv7Fk1_f9NTQ-mOqEzqcCC5CWfzoxDcR6XW5qlzUVqEJvoOCKQVJdmc9AKTNSgzQK70b7ET0SRk/s47/06.gif", ";(("); emo(/\s:\)+/g, "https://huyco-troll.googlecode.com/svn/trunk/smile/01.gif", ":)"); emo(/\s:-\)+/g, "https://huyco-troll.googlecode.com/svn/trunk/smile/02.gif", ":-)"); emo(/\s=\)\)+/g, "https://huyco-troll.googlecode.com/svn/trunk/smile/03a.gif", "=))"); emo(/\s;\(+/g, "https://huyco-troll.googlecode.com/svn/trunk/smile/04.gif", ";("); emo(/\s;-\(+/g, "https://huyco-troll.googlecode.com/svn/trunk/smile/05.gif", ";-("); emo(/\s:d/ig, "https://huyco-troll.googlecode.com/svn/trunk/smile/7.gif", ":d"); emo(/\s:-d/ig, "https://huyco-troll.googlecode.com/svn/trunk/smile/8.gif", ":-d"); emo(/\s@-\)+/g, "https://huyco-troll.googlecode.com/svn/trunk/smile/09.gif", "@-)"); emo(/\s:p/ig, "https://huyco-troll.googlecode.com/svn/trunk/smile/10.gif", ":p"); emo(/\s:o/ig, "https://huyco-troll.googlecode.com/svn/trunk/smile/11.gif", ":o"); emo(/\s:&gt;\)+/g, "https://huyco-troll.googlecode.com/svn/trunk/smile/12.gif", ":&gt;)"); emo(/\s\(o\)+/ig, "https://huyco-troll.googlecode.com/svn/trunk/smile/13.gif", "(o)"); emo(/\s\[-\(+/g, "https://huyco-troll.googlecode.com/svn/trunk/smile/14.gif", "[-("); emo(/\s:-\?/g, "https://huyco-troll.googlecode.com/svn/trunk/smile/15.gif", ":-?"); emo(/\s\(p\)+/ig, "https://huyco-troll.googlecode.com/svn/trunk/smile/16.gif", "(p)"); emo(/\s:-s/ig, "https://huyco-troll.googlecode.com/svn/trunk/smile/17.gif", ":-s"); emo(/\s\(m\)+/ig, "https://huyco-troll.googlecode.com/svn/trunk/smile/18.gif", "(m)"); emo(/\s8-\)+/ig, "https://huyco-troll.googlecode.com/svn/trunk/smile/19.gif", "8-)"); emo(/\s:-t/ig, "https://huyco-troll.googlecode.com/svn/trunk/smile/20.gif", ":-t"); emo(/\s:-b/ig, "https://huyco-troll.googlecode.com/svn/trunk/smile/21.gif", ":-b"); emo(/\sb-\(+/ig, "https://huyco-troll.googlecode.com/svn/trunk/smile/22.gif", "b-("); emo(/\s:-#/ig, "https://huyco-troll.googlecode.com/svn/trunk/smile/23.gif", ":-#"); emo(/\s=p~/ig, "https://huyco-troll.googlecode.com/svn/trunk/smile/24.gif", "=p~"); emo(/\s\$-\)+/ig, "https://huyco-troll.googlecode.com/svn/trunk/smile/25.gif", "$-)"); emo(/\s\(b\)+/ig, "https://huyco-troll.googlecode.com/svn/trunk/smile/26.gif", "(b)"); emo(/\s\(f\)+/ig, "https://huyco-troll.googlecode.com/svn/trunk/smile/27.gif'", "(f)"); emo(/\sx-\)+/ig, "https://huyco-troll.googlecode.com/svn/trunk/smile/28.gif", "x-)"); emo(/\s\(k\)+/ig, "https://huyco-troll.googlecode.com/svn/trunk/smile/29.gif", "(k)"); emo(/\s\(h\)+/ig, "https://huyco-troll.googlecode.com/svn/trunk/smile/30.gif", "(h)"); emo(/\s\(c\)+/ig, "https://huyco-troll.googlecode.com/svn/trunk/smile/31.gif", "(c)"); emo(/\scheer/ig, "https://huyco-troll.googlecode.com/svn/trunk/smile/32.gif", "cheer"); emo(/\s\(s\m\)+/ig, "https://huyco-troll.googlecode.com/svn/trunk/smile/green29.gif", "(sm)"); emo(/\s\(f\u\)+/ig, "https://huyco-troll.googlecode.com/svn/trunk/smile/soldier_baby15.gif", "(fu)"); emo(/\s\(k\u\)+/ig, "https://huyco-troll.googlecode.com/svn/trunk/smile/soldier_baby18.gif", "(ku)"); emo(/\s\(b\g\)+/ig, "https://huyco-troll.googlecode.com/svn/trunk/smile/soldier_baby21.gif", "(bg)"); emo(/\s\(l\o\l\)+/ig, "https://huyco-troll.googlecode.com/svn/trunk/smile/yahoo_24.gif", "(lol)"); // Show alert one times! $('div.emoWrap') .one("click", function() { if (emoMessage) { alert(emoMessage); } }); // Click to show the code! $('.emo') .css('cursor', 'pointer') .live("click", function(e) { $('.emoKey') .remove(); $(this) .after('<input class="emoKey" type="text" size="' + this.alt.length + '" value=" ' + this.alt + '" />'); $('.emoKey') .trigger("select"); e.stopPropagation(); }); $('.emoKey') .live("click", function() { $(this) .focus() .select(); }); }); //]]> </script> <script type='text/javascript'> //<![CDATA[ $(document).ready(function() { $('.separator a').attr({'class':'fancy','data-fancybox-group':'gallery'}); $('.fancy') .fancybox({padding: 5, openEffect : 'elastic', openSpeed : 400, closeEffect : 'elastic', closeSpeed : 400, closeClick : true, helpers : {overlay : null}}); }); //]]> </script> </b:if> <b:if cond='data:blog.pageType == &quot;static_page&quot;'> <script type='text/javascript'> //<![CDATA[ $(document).ready(function() { $('.separator a').attr({'class':'fancy','data-fancybox-group':'gallery'}); $('.fancy') .fancybox({padding: 5, openEffect : 'elastic', openSpeed : 400, closeEffect : 'elastic', closeSpeed : 400, closeClick : true, helpers : {overlay : null}}); }); //]]> </script> <script type='text/javascript'> //<![CDATA[ var emoRange = "#comments p, div.emoWrap", putEmoAbove = "iframe#comment-editor", emoMessage = "Chọn mặt cười sau đó copy xuống form comment"; //]]> </script> <script type='text/javascript'> //<![CDATA[ // Emoticon bar before comment-form $(function() { $(putEmoAbove) .before('<div style="text-align:center" class="emoWrap"> :) :)) ;(( :-) =)) ;( ;-( :d :-d @-) :p :o :&gt;) (o) [-( :-? (p) :-s (m) 8-) :-t :-b b-( :-# =p~ $-) (b) (f) x-) (k) (h) (c) cheer (sm) (fu) (ku) (bg) (lol) <br/><b><a href="javascript:openup_parseHTML()" rel="nofollow" title="Mã hóa code trước khi đưa vào bình luận"><span class="text_style">Mã hóa code đưa vào comments</span></a></b></div>'); var emo = function(emo, imgRep, emoKey) { $(emoRange) .each(function() { $(this) .html($(this) .html() .replace(/<br>:/g, "<br> :") .replace(/<br>;/g, "<br> ;") .replace(/<br>=/g, "<br> =") .replace(/<br>\^/g, "<br> ^") .replace(emo, " <img style='max-height:24px' src='" + imgRep + "' class='emo delayLoad' alt='" + emoKey + "' />")); }); }; emo(/\s:\)\)+/g, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhs5EKQMAwaRvK7Gw9aM7RF145r9vKKiwl6hH-PjTadv1w-RStfPdeJjjY4PIjJoEyi_Y3PlBsNDXJNYkXRtoqZIOIX_IyOeZv_tSZvRL9lFhp_uSLfposNfp3xrtbvQqP0j0700KJ1WRI/s36/03.gif", ":))"); emo(/\s;\(\(+/g, "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigxSF39twGSq3v5jUU78tlDgm_oUpCcjC4bBshZ_PrdwN8OTMrX2rKM0yRj7_VvZObSv7Fk1_f9NTQ-mOqEzqcCC5CWfzoxDcR6XW5qlzUVqEJvoOCKQVJdmc9AKTNSgzQK70b7ET0SRk/s47/06.gif", ";(("); emo(/\s:\)+/g, "https://huyco-troll.googlecode.com/svn/trunk/smile/01.gif", ":)"); emo(/\s:-\)+/g, "https://huyco-troll.googlecode.com/svn/trunk/smile/02.gif", ":-)"); emo(/\s=\)\)+/g, "https://huyco-troll.googlecode.com/svn/trunk/smile/03a.gif", "=))"); emo(/\s;\(+/g, "https://huyco-troll.googlecode.com/svn/trunk/smile/04.gif", ";("); emo(/\s;-\(+/g, "https://huyco-troll.googlecode.com/svn/trunk/smile/05.gif", ";-("); emo(/\s:d/ig, "https://huyco-troll.googlecode.com/svn/trunk/smile/7.gif", ":d"); emo(/\s:-d/ig, "https://huyco-troll.googlecode.com/svn/trunk/smile/8.gif", ":-d"); emo(/\s@-\)+/g, "https://huyco-troll.googlecode.com/svn/trunk/smile/09.gif", "@-)"); emo(/\s:p/ig, "https://huyco-troll.googlecode.com/svn/trunk/smile/10.gif", ":p"); emo(/\s:o/ig, "https://huyco-troll.googlecode.com/svn/trunk/smile/11.gif", ":o"); emo(/\s:&gt;\)+/g, "https://huyco-troll.googlecode.com/svn/trunk/smile/12.gif", ":&gt;)"); emo(/\s\(o\)+/ig, "https://huyco-troll.googlecode.com/svn/trunk/smile/13.gif", "(o)"); emo(/\s\[-\(+/g, "https://huyco-troll.googlecode.com/svn/trunk/smile/14.gif", "[-("); emo(/\s:-\?/g, "https://huyco-troll.googlecode.com/svn/trunk/smile/15.gif", ":-?"); emo(/\s\(p\)+/ig, "https://huyco-troll.googlecode.com/svn/trunk/smile/16.gif", "(p)"); emo(/\s:-s/ig, "https://huyco-troll.googlecode.com/svn/trunk/smile/17.gif", ":-s"); emo(/\s\(m\)+/ig, "https://huyco-troll.googlecode.com/svn/trunk/smile/18.gif", "(m)"); emo(/\s8-\)+/ig, "https://huyco-troll.googlecode.com/svn/trunk/smile/19.gif", "8-)"); emo(/\s:-t/ig, "https://huyco-troll.googlecode.com/svn/trunk/smile/20.gif", ":-t"); emo(/\s:-b/ig, "https://huyco-troll.googlecode.com/svn/trunk/smile/21.gif", ":-b"); emo(/\sb-\(+/ig, "https://huyco-troll.googlecode.com/svn/trunk/smile/22.gif", "b-("); emo(/\s:-#/ig, "https://huyco-troll.googlecode.com/svn/trunk/smile/23.gif", ":-#"); emo(/\s=p~/ig, "https://huyco-troll.googlecode.com/svn/trunk/smile/24.gif", "=p~"); emo(/\s\$-\)+/ig, "https://huyco-troll.googlecode.com/svn/trunk/smile/25.gif", "$-)"); emo(/\s\(b\)+/ig, "https://huyco-troll.googlecode.com/svn/trunk/smile/26.gif", "(b)"); emo(/\s\(f\)+/ig, "https://huyco-troll.googlecode.com/svn/trunk/smile/27.gif'", "(f)"); emo(/\sx-\)+/ig, "https://huyco-troll.googlecode.com/svn/trunk/smile/28.gif", "x-)"); emo(/\s\(k\)+/ig, "https://huyco-troll.googlecode.com/svn/trunk/smile/29.gif", "(k)"); emo(/\s\(h\)+/ig, "https://huyco-troll.googlecode.com/svn/trunk/smile/30.gif", "(h)"); emo(/\s\(c\)+/ig, "https://huyco-troll.googlecode.com/svn/trunk/smile/31.gif", "(c)"); emo(/\scheer/ig, "https://huyco-troll.googlecode.com/svn/trunk/smile/32.gif", "cheer"); emo(/\s\(sm\)+/ig, "https://huyco-troll.googlecode.com/svn/trunk/smile/green29.gif", "(sm)"); emo(/\s\(f\u\)+/ig, "https://huyco-troll.googlecode.com/svn/trunk/smile/soldier_baby15.gif", "(fu)"); emo(/\s\(k\u\)+/ig, "https://huyco-troll.googlecode.com/svn/trunk/smile/soldier_baby18.gif", "(ku)"); emo(/\s\(b\g\)+/ig, "https://huyco-troll.googlecode.com/svn/trunk/smile/soldier_baby21.gif", "(bg)"); emo(/\s\(l\o\l\)+/ig, "https://huyco-troll.googlecode.com/svn/trunk/smile/yahoo_24.gif", "(lol)"); // Show alert one times! $('div.emoWrap') .one("click", function() { if (emoMessage) { alert(emoMessage); } }); // Click to show the code! $('.emo') .css('cursor', 'pointer') .live("click", function(e) { $('.emoKey') .remove(); $(this) .after('<input class="emoKey" type="text" size="' + this.alt.length + '" value=" ' + this.alt + '" />'); $('.emoKey') .trigger("select"); e.stopPropagation(); }); $('.emoKey') .live("click", function() { $(this) .focus() .select(); }); }); //]]> </script> </b:if> <div class='cleared'/> <script type='text/javascript'> function openup_parseHTML() { window.open(&quot;http://ma-hoa-trollvl.blogspot.com/&quot;, &quot;followblog&quot;, &quot;height=700, width=630, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, directories=no, status=no&quot; ); } </script>


Lưu ý: nếu emoticons không xuất hiện, có thể là do template của bạn thiếu jQuery. Khi đó bạn chèn đoạn mã dưới đây ngay trên thẻ </head>:

<script src='https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js'/>

Bước 3: Lưu lại là xong

0 nhận xét:

Post a Comment