Siccome gli emoticon usati fanno un po' schifo, e siccome sono il lord delle emoticon di MegaLab (o almeno lo ero ) ho scaricato lo script, e l'ho modificato, inserendo immagini diverse.....
Il risultato ottenuto è questo:
- Codice: Seleziona tutto
function replaceText() {
bodyText = document.getElementById("body");
theText = bodyText.innerHTML;
theText = theText.replace(/:-\)/gi,'<img src="http://bp3.blogger.com/_DyqCr3kM_7A/SGeMUxhrhDI/AAAAAAAAAJA/-iXcsxo2Amw/s1600-h/01.png" alt=":-)" />');
theText = theText.replace(/:\)/gi,'<img src="http://bp3.blogger.com/_DyqCr3kM_7A/SGeMUxhrhDI/AAAAAAAAAJA/-iXcsxo2Amw/s1600-h/01.png" alt=":)" />');
theText = theText.replace(/:-\(/gi,'<img src="http://bp3.blogger.com/_DyqCr3kM_7A/SGeMXmdUo4I/AAAAAAAAAJI/QE9Su2IhbK8/s1600-h/02.png" alt=":-(" />');
theText = theText.replace(/:\(/gi,'<img src="http://bp3.blogger.com/_DyqCr3kM_7A/SGeMXmdUo4I/AAAAAAAAAJI/QE9Su2IhbK8/s1600-h/02.png" alt=":(" />');
theText = theText.replace(/;\)/gi,'<img src="http://bp0.blogger.com/_DyqCr3kM_7A/SGeMZiqZrFI/AAAAAAAAAJQ/t1fNV1My-Lc/s1600-h/03.png" alt=";)" />');
theText = theText.replace(/;-\)/gi,'<img src="http://bp0.blogger.com/_DyqCr3kM_7A/SGeMZiqZrFI/AAAAAAAAAJQ/t1fNV1My-Lc/s1600-h/03.png" alt=";-)" />');
theText = theText.replace(/:D/gi,'<img src="http://bp2.blogger.com/_DyqCr3kM_7A/SGeMbX44eLI/AAAAAAAAAJY/KOmS2NJDZWo/s1600-h/04.png" alt=":D" />');
theText = theText.replace(/:-D/gi,'<img src="http://bp2.blogger.com/_DyqCr3kM_7A/SGeMbX44eLI/AAAAAAAAAJY/KOmS2NJDZWo/s1600-h/04.png" alt=":-D" />');
theText = theText.replace(/:p/gi,'<img src="http://bp2.blogger.com/_DyqCr3kM_7A/SGeMjz7yGoI/AAAAAAAAAKA/p_jQL3CepGA/s1600-h/09.png" alt=":p" />');
theText = theText.replace(/:-p/gi,'<img src="http://bp2.blogger.com/_DyqCr3kM_7A/SGeMjz7yGoI/AAAAAAAAAKA/p_jQL3CepGA/s1600-h/09.png" alt=":-p" />');
theText = theText.replace(/:o/gi,'<img src="http://bp1.blogger.com/_DyqCr3kM_7A/SGeMhtAW0VI/AAAAAAAAAJ4/BIO1AW52m6Q/s1600-h/08.png" alt=":o" />');
theText = theText.replace(/:-o/gi,'<img src="http://bp1.blogger.com/_DyqCr3kM_7A/SGeMhtAW0VI/AAAAAAAAAJ4/BIO1AW52m6Q/s1600-h/08.png" alt=":-o" />');
theText = theText.replace(/8-\)/gi,'<img src="http://bp1.blogger.com/_DyqCr3kM_7A/SGeMmtJe-_I/AAAAAAAAAKI/Rk4LZ5RjOGM/s1600-h/10.png" alt="cool" />');
theText = theText.replace(/8\)/gi,'<img src="http://bp1.blogger.com/_DyqCr3kM_7A/SGeMmtJe-_I/AAAAAAAAAKI/Rk4LZ5RjOGM/s1600-h/10.png" alt="cool" />');
theText = theText.replace(/:\|/g,'<img src="http://bp1.blogger.com/_DyqCr3kM_7A/SGeMoq1OeOI/AAAAAAAAAKQ/BUtUkivNPxU/s1600-h/11.png" alt=":|" />');
theText = theText.replace(/:-\|/g,'<img src="http://bp1.blogger.com/_DyqCr3kM_7A/SGeMoq1OeOI/AAAAAAAAAKQ/BUtUkivNPxU/s1600-h/11.png" alt=":-|" />');
theText = theText.replace(/fff)/gi,'<img src="http://bp1.blogger.com/_DyqCr3kM_7A/SGeMeeJb9FI/AAAAAAAAAJo/FgGnidSehRE/s1600-h/06.png" alt="vomitino" />');
theText = theText.replace(/argh)/gi,'<img src="http://bp2.blogger.com/_DyqCr3kM_7A/SGeMfmJb6CI/AAAAAAAAAJw/QwuWzeLoWFY/s1600-h/07.png" alt="argh" />');
theText = theText.replace(/devil)/gi,'<img src="http://bp2.blogger.com/_DyqCr3kM_7A/SGeMdJgtfWI/AAAAAAAAAJg/E7kj3BiEf_I/s1600-h/05.png" alt="devil" />');
bodyText.innerHTML = theText;
}
Lo script l'ho caricato qui...
http://www.webalice.it/matteo_terzago/script/smiley.js
Ho fatto le modifiche al template come spiegato in quel post (correggendolo), ma non funziona....
- Codice: Seleziona tutto
<script type="text/javascript" src="http://www.webalice.it/matteo_terzago/script/smiley.js"></script>
Dov'è l'errore?
Lo script è fatto male?
Il link allo script non va bene?
Lo script non è compatibile con l'ultima versione di blogspot?