Este súper util post fue enviado por Teko
Si tu no sabes como poner emoticons en tu blog y quieres tenerlos , este post es para ti.
La forma de hacerlo es muy facil, solo tienes que poner este "pequeño" codigo dentro del <head>, esta en las primeras lineas de tu plantilla, en cualquier lugar sirve, pero de preferencia , seguido del <head>.
JavaScript:
-
<!--BloggerEmoticons-->
-
<script type="text/javascript">
-
<!--
-
-
function replaceText() {
-
// no support
-
if(!document.getElementById) {
-
return;
-
}
-
-
bodyText = document.getElementById("body");
-
theText = bodyText.innerHTML;
-
-
// replace
-
theText = theText.replace(/;\)/g,'<img src="http://photos1.blogger.com/blogger/7678/802/1600/wink.gif" alt=";)" />');
-
theText = theText.replace (/;-\)/g,'<img src="http://photos1.blogger.com/blogger/7678/802/1600/wink.gif" alt=";-)" />');
-
theText = theText.replace (/:D/g,'<img src="http://photos1.blogger.com/blogger/7678/802/1600/biggrin.gif" alt=":D" />');
-
theText = theText.replace (/:-D/g,'<img src="http://photos1.blogger.com/blogger/7678/802/1600/biggrin.gif" alt=":-D" />');
-
theText = theText.replace (/B\)/g,'<img src="http://photos1.blogger.com/blogger/7678/802/1600/cool.gif" alt="B)" />');
-
theText = theText.replace(/B-\)/g,'<img src=" http://photos1.blogger.com/blogger/7678/802/1600/cool.gif" alt="B-)" />');
-
theText = theText.replace(/:x/g,'<img src=" http://photos1.blogger.com/blogger/7678/802/1600/mad.gif" alt=":x" />');
-
theText = theText.replace(/:X/g,'<img src="http://photos1.blogger.com/blogger/7678/802/1600/mad.gif " alt=":X" />');
-
theText = theText.replace(/:-x/g,'<img src="http://photos1.blogger.com/blogger/7678/802/1600/mad.gif " alt=":-x" />');
-
theText = theText.replace(/:-X/g,'<img src="http://photos1.blogger.com/blogger/7678/802/1600/mad.gif" alt=":-X" />');
-
theText = theText.replace(/:-\(/g,'<img src="http://photos1.blogger.com/blogger/7678/802/1600/sad.gif" alt=":-(" />');
-
theText = theText.replace(/:\(/g,'<img src="http://photos1.blogger.com/blogger/7678/802/1600/sad.gif" alt=":(" />');
-
theText = theText.replace(/:o/g,'<img src="http://photos1.blogger.com/blogger/7678/802/1600/ohmy.gif" alt=":o" />');
-
theText = theText.replace (/:O/g,'<img src="http://photos1.blogger.com/blogger/7678/802/1600/ohmy.gif" alt=":O" />');
-
theText = theText.replace(/:-o/g,'<img src=" http://photos1.blogger.com/blogger/7678/802/1600/ohmy.gif" alt=":-o" />');
-
theText = theText.replace(/:-O/g,'<img src=" http://photos1.blogger.com/blogger/7678/802/1600/ohmy.gif" alt=":-O" />');
-
theText = theText.replace(/:p/g,'<img src=" http://photos1.blogger.com/blogger/7678/802/1600/tongue.gif" alt=":p" />');
-
theText = theText.replace(/:-p/g,'<img src=" http://photos1.blogger.com/blogger/7678/802/1600/tongue.gif" alt=":-p" />');
-
theText = theText.replace(/:-P/g,'<img src=" http://photos1.blogger.com/blogger/7678/802/1600/tongue.gif" alt=":-P" />');
-
theText = theText.replace(/:P/g,'<img src=" http://photos1.blogger.com/blogger/7678/802/1600/tongue.gif" alt=":P" />');
-
theText = theText.replace(/:-\)/g,'<img src=" http://photos1.blogger.com/blogger/7678/802/1600/smile.gif" alt=":-)" />');
-
theText = theText.replace(/:\)/g,'<img src=" http://photos1.blogger.com/blogger/7678/802/1600/smile.gif" alt=":)" />');
-
-
bodyText.innerHTML = theText;
-
}
-
-
-->
-
</script>
-
<!--BloggerEmoticons-->
Ya habiendo añadido esto, lo siguiente es aun mas facil. Solo hay que localizar el <Body> y sustituirlo por este otro:
<body id="body" onload="replaceText();">
Una vez hecho esto, solo guarda los cambios y vuelve a publicar tu plantilla. Tus emoticons se veran asi :
Recuerda, solo se ven en los post y en los comentarios , pero en el "permalink", no donde se ponen los comentarios desde blogger.
Y eso es todo..Espero que les sirva, tanto como me sirvio a mi..
Pendiente para esta Plataforma
Comentarios Recientes