webdesign-android-devlopement-news-portal-designing-india-indore-bhopal-mp

How To Add Smiley's, Youtube Video, Song Link In Blogger Thread Comments

Posted :| Posted By: Piush Trivedi | Labels: , 18 Comments
Posted by: Piush
Pin It


This tricks is very useful for you who want to modify the comment box. Why? Because, if you learn this trick you can add emoticons to your comment box. By the way, do you know Emoticon? Emoticon is a facial expression pictorially represented by punctuation and letters, usually to express a writer’s mood. Now, i will teach you how to add emoticons.


Screenshot






Live Demo

How To Use

Step 1

  • First log in to Blogger
  • Go To Dashbord > Design > Edit HTML
  • And Click On Expand Widgets Tick Box
  • Now find this code : </body>
  • And just BEFORE it, add this Code:


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

<script type='text/javascript'>
//<![CDATA[
function replaceText(){if(!document.getElementById){return;}
bodyText = document.getElementById("comment-holder");
theText = bodyText.innerHTML;
theText = theText.replace(/\[img\].*?'.*?\[\/img\]/gi, "");
theText = theText.replace(/\[nct\].*?'.*?\[\/nct\]/gi, "");
theText = theText.replace(/\[youtube\].*?'.*?\[\/youtube\]/gi, "");
theText = theText.replace(/\[img\]/gi, "<div style='clear:both'></div><img style='float:left;margin:10px 0;border:1px solid #DDD;max-width:590px;background:#FFF;padding:4px' src='");
theText = theText.replace(/\[\/img\]/gi, "'/><div style='clear:both'></div>");
theText = theText.replace(/\[youtube\]http:\/\/youtu.be/gi, "<iframe width='480' height='390' src='https://www.youtube.com/embed");
theText = theText.replace(/\[youtube\]http:\/\/www.youtube.com\/watch\?v=/gi, "<iframe width='480' height='390' src='https://www.youtube.com/embed/");
theText = theText.replace(/&amp;feature=/gi, "?rel=0' '");
theText = theText.replace(/\[\/youtube\]/gi, "?rel=0' frameborder='0' allowfullscreen></iframe>");
theText = theText.replace(/\[nct\]http:\/\/www.nhaccuatui.com\/nghe\?L=/gi, "<div style='overflow:hidden'><embed style='margin-top:-250px;width:300px;height:400px' src='https://www.nhaccuatui.com/l/");
theText = theText.replace(/\[nct\]http:\/\/www.nhaccuatui.com\/nghe\?M=/gi, "<div style='overflow:hidden'><embed style='margin-top:-350px;width:300px;height:400px' src='https://www.nhaccuatui.com/m/");
theText = theText.replace(/\[\/nct\]/gi, "' quality='high' wmode='transparent' type='application/x-shockwave-flash'></embed></div>");
}replaceText();
//]]>
</script>

Step 2

  • Now find this code :<b:loop values='data:post.comments' var='comment'>
  • And just Before it, add this line:

<div id='emocomments'>

Step 3

  • Now find this code : </b:loop>
  • And just After it, add this line:- </div>

Step 4

  • Now find this code :<data:blogTeamBlogMessage/>
  • And just After it, add this Code:-

<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='https://lh6.ggpht.com/_u7a1IFxc4WI/TM-voiNIw2I/AAAAAAAAASw/aav2hwqeG0c/1.gif'/>:)
<img src='https://lh6.ggpht.com/_u7a1IFxc4WI/TM-voq7QQnI/AAAAAAAAAS0/UzoFJOCcPPU/2.gif'/>:(
<img src='https://lh4.ggpht.com/_u7a1IFxc4WI/TM-vt_XVZKI/AAAAAAAAATI/Q35_W0anT6A/21.gif'/>:))
<img src='https://lh4.ggpht.com/_u7a1IFxc4WI/TM-vt5z16MI/AAAAAAAAATE/Hx-7Thmr6do/20.gif'/>:((
<img src='https://lh6.ggpht.com/_u7a1IFxc4WI/TM-vuJ1G41I/AAAAAAAAATM/_jLHXvz6PTg/24.gif'/>=))
<span id='smiley-more' style='display: none;'>
<img src='https://lh6.ggpht.com/_u7a1IFxc4WI/TM-vzUt1yQI/AAAAAAAAATY/QHNvnj0gYbU/41.gif'/>=D&gt;
<img src='https://lh3.ggpht.com/_u7a1IFxc4WI/TM-voxnkRKI/AAAAAAAAAS4/PjDn098vm3w/4.gif'/>:D
<img src='https://lh6.ggpht.com/_u7a1IFxc4WI/TM-vpDb68dI/AAAAAAAAAS8/Yv0Uu3qzG_Q/10.gif'/>:P
<img src='https://lh6.ggpht.com/_u7a1IFxc4WI/TM-vpLiW1GI/AAAAAAAAATA/fPyPJcBks7s/13.gif'/>:-O
<img src='https://lh5.ggpht.com/_u7a1IFxc4WI/TM-vua5MF2I/AAAAAAAAATU/N4X-ouMd1-I/39.gif'/>:-?
<img src='https://lh4.ggpht.com/_u7a1IFxc4WI/TM-vzUOH79I/AAAAAAAAATc/oNE5H5vcNtI/42.gif'/>:-SS
<img src='https://lh3.ggpht.com/_u7a1IFxc4WI/TM-vz4hwcNI/AAAAAAAAATo/4ySXuvQWma8/104.gif'/>:-t
<img src='https://lh6.ggpht.com/_u7a1IFxc4WI/TM-vuMg6RQI/AAAAAAAAATQ/rWj7euuKOZs/33.gif'/>[-(
<img src='https://lh6.ggpht.com/_u7a1IFxc4WI/TM-vziH8NXI/AAAAAAAAATg/2evEbN2cJwc/43.gif'/>@-)
<img src='https://lh6.ggpht.com/_u7a1IFxc4WI/TM-vzrqI4MI/AAAAAAAAATk/BhfFnT0Gbro/66.gif'/>b-(
</span>
<span id='smiley-toggle'><a href="javascript:moreSmilies()">&#8594;</a></span>
</div>

Step 5

  • Now find this code : ]]></b:skin>
  • And just BEFORE it, add this line:

.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;}

Note :- For Adding image , youtube Video , Song Link On Thread Comment Plz Use This Code:-

  • For Inserting Image:-- [img] Link [/img] //
  • For Inserting Song Link:-- [nct] Link song [/nct]
  • For Inserting YOutube Video:-- [youtube] Youtube Video Link [/youtube]

Aptech India (Blogger Widgets, Tips , Seo Tricks)
How To Add Smiley's, Youtube Video, Song Link In Blogger Thread Comments By
Published On: 2012-06-14T11:34:00+05:30
Description: How To Add Smiley's, Youtube Video, Song Link In Blogger Thread Comments
Rating: 3 ★★★★★ 11 reviews - Stars Based On © 2013

Post A Comment

:) :-) :)) =)) :( :-( :(( :d :-d @-) :p :o :>) (o) [-( :-? (p) :-s (m) 8-) :-t :-b b-( :-# =p~ :-$ (b) (f) x-) (k) (h) (c) cheer
View More


Note: (Insert Item In Comments)
ATTENTION !!:-
• To Insert An Image, Use The [im]Your Image Link [/im] Tag
• To Insert An Youtube Video Use The [youtube]Youtube Video Link [/youtube] Tag
• To Insert An Smiley, Use The Smiley's Use Smiley Code

Top Commen tor Ask A Question

18 comments:

  1. Just testing the video link. I hope you don't mind.
    [youtube]http://www.youtube.com/watch?v=BIfH9ywe-v8[/youtube]

    ReplyDelete
  2. [youtube]http://www.youtube.com/watch?v=BIfH9ywe-v8[/youtube]

    Is it just me or is the code for adding Youtube videos not working?

    ReplyDelete
  3. it doesnt work. i've tried so many times..

    ReplyDelete
  4. Adobe is a most usable brand of united kingdom and if you are face any kind of issue in Adobe products like Adobe email login issue ,Adobe broadband connecting problems and any other issue now dial our toll free customer care help line no 0800-680-0619 our experts are ready to help you.

    bt email support:-
    http://pcehelp.com/bt-support/bt-email-support-number-uk-0800-680-0619/
    yahoo technical support:-
    http://pcehelp.com/yahoo-email/technical-support-number-0800-680-0619/
    bt technical support:-
    http://pcehelp.com/bt-support/bt-technical-support-number-0800-680-0619/
    skype support number:-
    http://pcehelp.com/skype/skype-technical-support-0800-680-0619/
    hp technical support
    http://pcehelp.com/hp/hp-technical-support-0800-680-0619/
    adobe technical support
    http://pcehelp.com/adobe-support/adobe-technical-support-0800-680-0619/
    avg antivirus support:-
    http://pcehelp.com/avg/avg-antivirus-technical-support-0800-680-0619/

    ReplyDelete
  5. Annette Labedzki received her BFA at the Emily Carr College of Art and Design in Vancouver, B.C. Canada. She has more than 25 years experience. Bulk craft glitter

    ReplyDelete
  6. This is my first time i visit here and I found so many interesting stuff in your blog especially it's discussion, thank you. https://ythub.cc/

    ReplyDelete
  7. Great article Lot's of information to Read...Great Man Keep Posting and update to People..Thanks https://btclod.com

    ReplyDelete
  8. wow! now i can express my feeling with icons easier! apk.care

    ReplyDelete
  9. thanks for this usefull article, waiting for this article like this again

    aniflix
    drakorid

    ReplyDelete
  10. Emoji makes a post much friendly with audience. Thank for sharing it. I will apply for my next blog post. APK Download

    ReplyDelete
  11. I have searched for this code on internet many times. Every time it was a fail. I am happy that I found this blog... THANKS b-(

    ReplyDelete
  12. Great weblog right here! Also your web site quite a bit up very fast! What host are you the usage of? Can I am getting your associate hyperlink in your host? I wish my web site loaded up as quickly as yours lol. see it here

    ReplyDelete
  13. Whoi, excellent, t wondered just how to cure icne. ind found your webstte by google, dtscovered todiy t'm i ltttle obvtous i greit deil. t’ve ilso idded RSS ind sive your webstte. keep us updited. https://ritzz.net/

    ReplyDelete