<< | Cookbook-V1 | >>

Note: The recipes here are for PmWiki versions 0.6 and 1.0 only. For PmWiki 2.0 recipes, see Cookbook.


Add graphical smileys to the wiki markup, similar to WikiSmileys, but now do it with an almost unlimited supply of differing smileys.

Solution - complete tarball including gif images (File is too large to upload to pmwiki and attach it) (The attach functionality does not allow filenames with "+" signs in them)


To make this script work, put the smileys++.php in "local". Then add the following line to local.php: include("local/smileys++.php");


By default, this script looks for the smiley images in a directory called "smileys" in the root directory for pmwiki. If your smiley images are elsewhere, you can set the path to the directory the smileys are in. It should end with the name of the directory with no ending slash. For example, you can set: $SmileysDir = "[(approve links) edit diff]";


You can now use any of :), :(, :p, :D, ... You can also use {cool}, {confused}, {eek}, {angry}, {rolleyes} like in the original smileys.php cookbook. But you can now also use "{:name:}" for printing the smiley where "name.gif" is in the smileys directory. There are over 680 smileys in the directory. If you use your browser to point to the "index.php" in the smileys directory, it gives you a list of all available smileys for smileys++.


You can take a look at how my web site uses smileys++.php in order to display all of the funky little men at

If you're smart enough, you can also fish out how to get access to the index.php showing all my smileys. Please don't post the URL if you find it, or use my collection as your default source for image downloads. I don't have too much bandwidth, and it would force me close down the PHP script, or move my smileys around my directory structures in order for you annoying guys to quit downloading from my server. Please use the images in the tarball locally.

Comments, Bugs

zet: Hi there. I have written an iconmanager that can manage your icons in directory. I chose a quite simple modell of a catalogsystem:
The files are sorted this way and the iconmanager can move/rename the images so you can sort the whole system quite fast. It is even possible to write descriptions for the categories.
The script location: [(approve links) edit diff]

Of course, I would like to implement this in the PmWiki. The directory that the iconmanager manages could be an uploaddirectory of the wiki. The wiki could use the {iconname} syntax like before - the categories won't be used in the wiki.
Example: smile.smiley.happysmiley.gif{smile}

The catalogsystem could also be used in the editpages of the wiki. A html-script could be written that there's a frame or somewhat where the user could browse/search for icons he wants to use.

I would also suggest to rename this script to WikiIcon instead of using smileys anymore.

Oh - The syntax should also make it possible to align the image - for example align=right - for floating. Syntaxproposal: {iconname left/right} or {iconname} for normal use. The reason is that I would like to add also larger icons (32x32) and it would look nicer if the paragraph would be floating around the icon.

''-zet 31. August 2003, GMT+1 1:25 am

Use with PmWiki 2

I don't have time right now to make a new cookbook page, but to get a basic version of this to work with PmWiki 2, basically follow the same instructions, but use this for the smileys++.php file:

  $IconsDir = "/path/to/icons";
  Markup('icon','inline','/\\[:(.*?):\\]/',"<img src='$IconsDir/\$1.gif' border='0' alt='smiley'/>");

That replaces everything in the file and icons are used like this:


where nameOfGif is the name of one of the gifs in the icon directory linked to above.

''-MarcusVorwaller Dec 4 2004


  • Janice Heinold
  • Anthony Liekens (Extensions starting with Janice's script)

pmwiki-2.3.8 -- Last modified by {{MarcusVorwaller}}

from IP: ip should be disabled by default for security reasons