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
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
What's wrong with this onehttp://www.concrete5.org/marketplace/addons/highlighted_code_block... ?
I wanted software that can be edited.
You can edit it..
?
?
Yes.
sanitizing program pattern.
sanitizing program pattern.
$temp = preg_replace('/&/','&',$source); $patterns = array( '/</', '/>/' ); $replacements = array( '<', '>' ); $result = preg_replace($patterns, $replacements, $temp);
I made it with StntaxHighlighter.
SyntaxHighlighter:
http://alexgorbatchev.com/
http://code.google.com/p/syntaxhighlighter/...