getElementsByClassName
Go to Design -> Edit HTML. Insert this code before </head>-tag:
This function does not exist on some older browsers, so if it doesn't, we define it here. This getElementsByClassName will be used by many other script snippets, too, so it is useful to add, even if you don't add the actual smiley codes, which we do next.
Smileys/emoticons script and css
In html editing, add this code before </body>-tag:
You should upload decent smilies for example to your Picasa albums, and change the smilies' urls accordingly. These smilies are just for demonstration. You can use them to test the script. Smilies, now 6 of them, can be added or removed by modifying the code, the code should be self explanatory. See also Smileys test post.
And finally go to Template designer, Advanced, Add CSS, and copy this css definition there:
img.emoticon { border: 0; padding: 0; margin: 0; -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; }You may also add the css directly to html instead of using Template designer, if you know what you are doing.
There you go. Now find your favorite smileys and upload them to web, and change the script's img urls. :)
0 comments:
See the hack to make the 'Post a Comment' link bigger.
Post a Comment