hey dude :)
I have a topic asking how to use inline code, now I'd like to ask 2 more questions
1) How can I use it directly with PHP, passing a variable as parameter to a function and it prints the markup to be converted to highlighted content, outside post content?
2) How do I replace that small toolbar with icons to permanent toolbar with text like in http://sltaylor.co.uk/blog/control-your-own-wordpress-custom-fields/ ?
http://wordpress.org/extend/plugins/syntaxhighlighter/
1)
global $SyntaxHighlighter;
$SyntaxHighlighter->codeformat = 1;
echo $SyntaxHighlighter->parse_shortcodes( '[php]<?php echo 'hello world'; ?>[/php]' );
$SyntaxHighlighter->codeformat = false;
2) You're on your own for that one. It won't be easy.
tnx :D
but why isn't it easy? I've seen it in 2 sites at least, is it custom?
but why isn't it easy? I've seen it in 2 sites at least, is it custom?
That is v1.x of the script: http://code.google.com/p/syntaxhighlighter/
It's not as good as v2.x of the script.