Markup Plugins
Standard S9y Markup Plugins
Please note: This page is a work in progress.
nl2br
This cryptically named markup plugin simply takes any newline and turns it into the html code "<br/>".
Emoticate
This will turn some of the more common smilies/emoticons into images, which images it turns them into depends on which template you have selected. The emoticons it uses are:
| Similey | Image file |
| :'( | cry_smile.gif |
| :-) | regular_smile.gif |
| :-O | embaressed_smile.gif |
| :O' | embaressed_smile.gif |
| :-( | sad_smile.gif |
| :( | sad_smile.gif |
| :) | regular_smile.gif |
| 8-) | shades_smile.gif |
| :-D | teeth_smile.gif |
| :D | teeth_smile.gif |
| 8) | shades_smile.gif |
| :-P | tounge_smile.gif |
| ;-) | wink_smile.gif |
| ;) | wink_smile.gif |
| :P | tounge_smile.gif |
S9y Markup
bolded text
_underlined text_
^superscript text^
@subscript text@
|xxxxxx|Font color change, where xxxxxx is a hex code|
#yyy# embeds #yyy# as an html entity, (#gt#, #lt# and #amp# for instance)
Textile
BBCode
TextWiki
This uses the PEAR Text_Wiki rules (which is an extension of the standard WikiWikiWeb text transformation rules. Notice that it does not currently handle Wiki Words?.
RegExp
This is the catch-all of markup plugins. It allows you to add custom markup to your blog with PHP regular expressions!
For instance, if you use a lot of embedded Flash video, you might want an easy way to specify it in your entries. The RegExp plugin lets you create an <flv> tag, making entry easier for you. Just go to the plugin/serendipity_event_regexpmarkup/regexps/ directory and create a file called FLV.php. In that file, put the regular expression for the tag and the replacement.
Here's an example. It replaces the <flv> tag with everything you need for a Flash video, including dimensions and automatic start. Note that $1, $2 and so on are the text matched by the first and second set of parenthesis; you can modify these lines to use as many variables as you want.
$regexpArray = array(
'SearchArray'=>array(
'/<flv href="([^"]+)" width="([^"]+)" height="([^"]+)" autostart="([^"]+)">/U'
),
'ReplaceArray'=>array(
'<object type="application/x-shockwave-flash" width="$2" height="$3" data="http://yourdomain/flv.swf?file=$1&autostart=$4"><param name="movie" value="http://yourdomain/flv.swf?file=$1&autostart=$4" /></object>'
)
);
Now, you can use <flv href="my_flv_file.flv" width="its_width" height="its_height" autostart="true_or_false"> to insert the entire Flash video anywhere in your entry.
