For our intranet Zwiki we added some useful smilies, based on the markup used in most bullitin boards. Here's what we did in case it's any use to anyone else...
- Unzip and import the smilies into your wiki folder.
- Insert the addSmilies method into
ZWikiPage.py
. (Use source code of html page!) - Add the line
text = self.addSmilies(text)
into thestxToHtml
method here:text = StructuredText.HTMLNG( myDocument(StructuredText.Basic(str(text))), level=3) text = self.addSmilies(text)
The only issue is that it still replaces text with smilies even within <pre> tags. Anyone able to help with the regular expressions in the addSmilies method above to avoid this?
Here's a list of what you type to get the various smilies:
Type | Image | Name |
:) | ![]() | smile |
;) | ![]() | wink |
:D | ![]() | big grin |
:( | ![]() | frown |
:o | ![]() | embarrasment |
:p | ![]() | stick out tongue |
}:) | ![]() | evil |
:cool: | ![]() | cool |
:confused: | ![]() | confused |
:rolleyes: | ![]() | rolleyes (sarcastic) |
:mad: | ![]() | mad |
:eek: | ![]() | eek! |
:tick: | ![]() | tick |
(images from another server as they're not on here)
correction --FlorianKonnertz, 2003/04/10 05:55 GMT
It works for me with:
text = addSmilies(self, text)
Suggestion: --FlorianKonnertz, 2003/04/10 05:57 GMT
Suggestion: Put the smilies folder in your img
folder in zope root and change the path to:
<img src="&dtml-BASE0;/img/smilies/biggrin.gif">
So you can use the smilies from other Zope pages more conveniant.
- --FlorianKonnertz, 2003/04/10 06:13 GMT
Try it in NooWiki:SandBox! Enjoy!