Code in the Wiki
From SRL Wiki
Adding code to the wiki is extremely simple.
This is a PHP example.
<?php $v = "string"; // sample initialization ?> html text <? echo $v; // end of php code ?>
How would you use this in your article? It is very simple.
<source lang="php">
<?php
$v = "string"; // sample initialization
?>
html text
<?
echo $v; // end of php code
?>
</source>
PHP can be replaced by most other languages.
Supported languages
These are the languages known by GeSHi that can be used in the lang parameter.
Note that not all these languages may be supported, but most of them are.
| Code | Language |
|---|---|
abap | ABAP |
actionscript | ActionScript |
ada | Ada |
apache | Apache Log |
applescript | AppleScript |
asm | ASM |
asp | Active Server Pages (ASP) |
autoit | AutoIt |
bash | Bash |
basic4gl | Basic4GL |
bf | Brainfuck |
blitzbasic | Blitz BASIC |
bnf | Backus-Naur Form |
c | C |
c_mac | C (Mac) |
caddcl | AutoCAD DCL |
cadlisp | AutoLISP |
cfdg | CFDG |
cfm | ColdFusion |
cil | Common Intermediate Language (CIL) |
cobol | COBOL |
cpp-qt | C++ (Qt toolkit) |
cpp | C++ |
csharp | C# |
css | Cascading Style Sheets (CSS) |
d | D |
delphi | Delphi |
diff | Diff |
div | DIV |
dos | DOS batch file |
dot | DOT |
eiffel | Eiffel |
fortran | Fortran |
freebasic | FreeBASIC |
genero | Genero |
gettext | GNU internationalization (i18n) library |
glsl | OpenGL Shading Language (GLSL) |
gml | Game Maker Language (GML) |
gnuplot | gnuplot |
groovy | Groovy |
haskell | Haskell |
hq9plus | HQ9+ |
html4strict | HTML |
idl | Uno IDL |
ini | INI |
inno | Inno |
intercal | INTERCAL |
io | Io |
java | Java |
java5 | Java(TM) 2 Platform Standard Edition 5.0 |
javascript | JavaScript |
kixtart | KiXtart |
klonec | Klone C |
klonecpp | Klone C++ |
latex | LaTeX |
lisp | Lisp |
lolcode | LOLCODE |
lotusscript | LotusScript |
lua | Lua |
++++++++++ initialises cell zero to 10 [ >+++++++>++++++++++>+++>+<<<<- ] this loop sets the next four cells to 70/100/30/10 >++. print 'H' >+. print 'e' +++++++. 'l' . 'l' +++. 'o' >++. space <<+++++++++++++++. 'W' >. 'o' +++. 'r' ------. 'l' --------. 'd' >+. '!' >. newline
