<?php // Script: Copyright 2003 Janice Heinold, jmhdesign@att.net or // heinold@falcon.tamucc.edu // // Modified for PmWiki-0.6 by Patrick R. Michaud, 23-Feb-2004. // // Modified for PmWiki2 by Karl Loncarek, 09-Nov-2004 (Klonk) // Fixed a bug with numbered lists 06-Dec-2004 (Klonk) // Fixed bug to get valid XHMTL 18-Feb-2005 (Klonk) // Modified for PmWiki2 by Christophe BARBIER, 08-March-2005 (sorry, I love smilies) // Added a class (smiley) for better wiki skinning // Added a title for browser mozilla like (valid XHTML I think) ;-) // Added a generic markup which permit to use smiley with its filename // To make this script work, add the following line to your config.php: // include("local/smileys.php"); // Configuration // By default, this script looks for the smiley images // in a folder called "smileys" in the "pub" folder for pmwiki. // If your smiley images are elsewhere, // you can set the path to the folder the smileys are in. // It should end with the name of the directory with no ending slash. // For example, you can set: // $SmileysFolder = "http://www.yourdomain.com/smileys/gif"; $SmileysFolder = "$PubDirUrl/smileys"; // *************************************************** // You shouldn't need to edit anything below this line // Create extended wiki markup with PmWiki2 "Markup" function Markup("happy","block","/\{?:-?\)/","<img src='$SmileysFolder/happy.gif' border='0' width='15' height='15' alt='happy smiley' title='happy smiley' class='smiley' />"); Markup("wink","block","/\{?;-?\)/","<img src='$SmileysFolder/wink.gif' border='0' width='15' height='15' alt='winking smiley' title='winking smiley' class='smiley' />"); Markup("sad","block","/\{?:-?\(/","<img src='$SmileysFolder/sad.gif' border='0' width='15' height='15' alt='frowning smiley' title='frowning smiley' class='smiley' />"); Markup("tongue","block","/\{?:-?p\\b/","<img src='$SmileysFolder/tongue.gif' border='0' width='15' height='15' alt='laughing smiley' title='laughing smiley' class='smiley' />"); Markup("redface","block","/\{?:-?o\\b/","<img src='$SmileysFolder/redface.gif' border='0' width='15' height='15' alt='embarrassed smiley' title='embarrassed smiley' class='smiley' />"); Markup("cool","block","/\{cool\}/","<img src='$SmileysFolder/cool.gif' border='0' width='15' height='15' alt='cool smiley' title='cool smiley' class='smiley' />"); Markup("biggrin","block","/\{?:-?D\\b/","<img src='$SmileysFolder/biggrin.gif' border='0' width='15' height='15' alt='grinning smiley' title='grinning smiley' class='smiley' />"); Markup("confused","block","/\{confused\}/","<img src='$SmileysFolder/confused.gif' border='0' width='15' height='22' alt='confused smiley' title='confused smiley' class='smiley' />"); Markup("eek","block","/\{eek\}/","<img src='$SmileysFolder/eek.gif' border='0' width='15' height='15' alt='shrieking smiley' title='shrieking smiley' class='smiley' />"); Markup("mad","block","/\{angry\}/","<img src='$SmileysFolder/mad.gif' border='0' width='15' height='15' alt='angry smiley' title='angry smiley' class='smiley' />"); Markup("rolleyes","block","/\{rolleyes\}/","<img src='$SmileysFolder/rolleyes.gif' border='0' width='15' height='15' alt='rolling eyes smiley' title='rolling eyes smiley' class='smiley' />"); Markup("icon","block","/\{(.*?)\}/","<img src='$SmileysFolder/\$1.gif' border='0' alt=$1 title=$1 class='smiley' />"); ?>