rest2web: Building Websites Across the Known Universe

- rest2web
- >
- Reference
- >
- Smilies

# The Smilies Macro

## Smilies

Contents

- Introduction
- The Smilies
- The Missing Smilies
- Alternative Smiley Sets
- Credits

# Introduction

Included in the example macros file is a function called `smiley`. This uses a modified version of smiley.py by Mark Andrews. It also requires the path module. These are both included as part of the rest2web distribution in the modules directory. If you move them elsewhere you should make sure they are on the Python search path [1]. If you don't know what I'm on about then leave them where they are

# The Smilies

To use the smilies you use the smiley macro. This can be either `{smiley;SMILEY}` or the shorter form `{sm;SMILEY}`. Replace `SMILEY` with the symbols for the the smiley you want to display. For example `{smiley;8)}` becomes .

Here is the full smiley set :

- `` -- `:doubt:`
- `` -- `:-?`
- `` -- `:!:`
- `` -- `:lol:`
- `` -- `8)`
- `` -- `:(`
- `` -- `:)`
- `` -- `:eek:`
- `` -- `:-D`
- `` -- `:cry:`
- `` -- `:-X`
- `` -- `:?`
- `` -- `:evil:`
- `` -- `:-o`
- `` -- `:mad:`
- `` -- `:oops:`
- `` -- `:grin:`
- `` -- `:-|`
- `` -- `:-p`
- `` -- `:biggrin:`
- `` -- `:idea:`
- `` -- `:shock:`
- `` -- `:o`
- `` -- `:?:`
- `` -- `:badgrin:`
- `` -- `:roll:`
- `` -- `:arrow:`
- `` -- `:|`
- `` -- `:smile:`
- `` -- `:p`
- `` -- `:razz:`
- `` -- `:wink:`
- `` -- `:-)`
- `` -- `8-)`
- `` -- `:cool:`
- `` -- `:D`
- `` -- `:neutral:`
- `` -- `:sad:`
- `` -- `:???:`

# The Missing Smilies

We can't use the following smilies. `;-)` and `;)`.

Because they contain a ";" [2], we can't yet use these smilies. They both represent the same smiley. You have to use it in its other form; `:wink:` -- `` .

# Alternative Smiley Sets

The nice thing about smiley.py is that it supports any smile sets with a .pak file. This is the standard for smiley sets that is used by phpbb. You can find alternative sets of smilies at the stylesdb website.

Simply replace the docs_html/images/smilies directory with an alternative set to use them. smiley.py will automatically create the right links by reading the .pak file.

You will need to edit the `smiley` function in macros.py to have the right path to the smilies directory (to read it) and the right final path to the smilies for your site.

# Credits

- The smilies come from a gentleman called Spider.
- smiley.py is written by Mark Andrews. It is licensed under the BSD license, which is the same one as the Voidspace License .
- path.py (needed by smiley.py) is written by Jason Orendorff. He has placed it in the public domain.

[1] | `sys.path`

[2] | This is a limitation of the macros system.

Return to Top
Part of the rest2web Docs
Page last modified Sun Oct 1 08:47:29 2017.

- Index Page
- Pages
- changelog
- Plugins
- Gallery
- TODO/ISSUES
- indextree
- uservalues
- Smilies
- Encodings