Sniplets is supplied with a variety of built-in modules, details of which are given on this page. Where necessary some modules require the use of additional parameters. These parameters can be specified alongside the module name and multiple parameters are separated with a comma.
Syntax Highlighting
The syntax highlighting function takes several parameters:
language– Any of the GeSHi language stringsheader– Set todivorpreto specify whether the code is wrapped in adivorprekeywords– Set totrueorfalseto have code keywords linked to help pagesnumbers– Set tonormalorfancyto specify the line numbering methodcss– Set totrueorfalseto tell GeSHi whether to embed styles, or whether to use CSS classesforce– When set totruethe contents are assumed to be PHP, even though they may not start with<?phphighlight– Colour highlight specified lines. Lines are separated with a pipe, and can include a range. For example,highlight=1|4|7-15– highlight line 1, 4 and 7 to 15
Randomize
This will randomize the content based upon a type parameter:
line– display a random line from the contentword– display a random word from the contentcustom– split the content using the delimited specified by the parametercustomand display a randomly selected piece of contentsection(default) – split the content using [section] as the delimiter
You can use this function to achieve a fortune cookie effect.