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 todiv
orpre
to specify whether the code is wrapped in adiv
orpre
keywords
– Set totrue
orfalse
to have code keywords linked to help pagesnumbers
– Set tonormal
orfancy
to specify the line numbering methodcss
– Set totrue
orfalse
to tell GeSHi whether to embed styles, or whether to use CSS classesforce
– When set totrue
the contents are assumed to be PHP, even though they may not start with<?php
highlight
– 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 parametercustom
and 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.