root/tags/MvBlog-3.0/COLOR_HIGHLIGHT.txt

Revision 610, 1.3 KB (checked in by michiel, 16 months ago)

allow syntax highlighting in posts.
See COLOR_HIGHLIGHT.txt in the root to see how it's done.

Closes #113

Line 
1Color Highlighting in posts.
2
3It's possible to specify a part of a post to be code with syntax color highlighting.
4This document gives some pointers and examples on how you can do this.
5
6Syntax:
7[code:<language>
8<code>
9:code]
10
11<example>
12
13Some php code:
14[code:php
15<?php
16$ts = mktime();
17$date = date("m-d-Y", $ts);
18echo "timestamp = $ts and date = $date";
19?>
20:code]
21
22and some C code
23[code:C
24#include <stdio.h>
25#include <stdlib.h>
26#include <string.h>
27 
28int main(int argc, char *argv[]) {
29    return(0);
30}
31:code]
32That's it for today
33
34</example>
35
36We use the GeShI php classes for the syntax highlighting.
37This means we support the following languages/syntaxes:
38abap, actionscript, ada, apache, applescript, asm, asp,
39autoit, bash, blitzbasic, bnf, caddcl, cadlisp, cfdg, cfm,
40c_mac, c, ,cpp, cpp-qt, csharp, css, delphi, diff, div,
41dos, dot, d, eiffel, fortran, freebasic, genero, gml,
42groovy, haskell, html4strict, idl, ini, inno, io, java5,
43java, javascript, latex, lisp, lua, m68k, matlab, mirc,
44mpasm, mysql, nsis, objc, ocaml-brief, ocaml, oobas, oracle8,
45pascal, perl, per, php-brief, php, plsql, python, qbasic, rails,
46reg, robots, ruby, sas, scheme, sdlbasic, smalltalk, smarty,
47sql, tcl, text, thinbasic, tsql, vbnet, vb, vhdl, visualfoxpro,
48winbatch, xml, xpp, z80
49
50Bugs etc can be posted on http://dev.mvblog.org
Note: See TracBrowser for help on using the browser.