Syntax-coloring for programming languages added (General)
For programmers, I added language syntax-coloring
(using Geshi: http://sourceforge.net/projects/geshi/ )
Example:
// yet another 'Hello World' program #include <stdio.h> int main(int argc, char **argv) { int i; for (i = 0; i < 10; i++) { printf ("Hello World!\n"); } return 0; }
The CCW Forum supports the following languages:
c, cpp, csharp, css, delphi, html, html4strict, java, java5, javascript, lisp, perl, php, sql, and xml.
To syntax-color C++ code, do this:
[code=cpp] ...
[/code]
For C# highlighting use:
[code=csharp] ...
[/code]
If you prefer your code with no coloring use 'monospace' or:
[code=none] ...
[/code]
If you want me to add another language, just ask for it. (Geshi syntax-colors more than 100 languages so all I have to do is upload the appropriate language file.) If you want to experiment posting various code snippets, add them to this thread and I will periodically delete old posts if the thread gets too big.
My TODO list:
- add a button for 'code' with a drop-down of supported languages
- allow posting of FEN diagrams
If anyone wants a particular feature, just ask, and I will work on it next. Be advised that it might take a month or more...
Ron
Complete thread:
- List of all BBCodes supported on this site - Ron, 2009-03-13, 17:41 (General)
- Syntax-coloring for programming languages added - Ron, 2009-04-05, 20:47
- FEN diagrams added - Ron, 2009-05-21, 00:09