Display code block?

Permalink
Hey guys, I'm starting to put some of my PHP scripts, actionscript, and C# code up on my C5 website, but what I'd really like to do is be able to (in addition to providing a download link to the file containing all the code), have a "code block" that I could insert into a content block or page, that would display my code on the page instead of execute it or parse it.

I've Google'd different methods to do this but so far I haven't found anything that I can use to accomplish this.

If this would be doable, or if someone can point me in the direction of a way that already exists to do this I would greatly appreciate it! Thanks! :D

 
yamanoi replied on at Permalink Reply
http://sakura.tsukuba-g.ac.jp/~yamanoi/concrete5/software/syntaxhighlighter/

I made it with StntaxHighlighter.

SyntaxHighlighter:
http://alexgorbatchev.com/
http://code.google.com/p/syntaxhighlighter/...
Remo replied on at Permalink Reply
Remo
yamanoi replied on at Permalink Reply
I wanted software that can be edited.
Remo replied on at Permalink Reply
Remo
You can edit it..
?
yamanoi replied on at Permalink Reply
Yes.

sanitizing program pattern.
$temp = preg_replace('/&/','&',$source);
$patterns = array( '/</', '/>/' );
$replacements = array( '&lt;', '&gt;' );
$result = preg_replace($patterns, $replacements, $temp);