WordPress.org

Ready to get started?Download WordPress

Forums

SyntaxHighlighter Evolved
Questions (4 posts)

  1. shidouhikari
    Member
    Posted 3 years ago #

    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/

  2. Alex Mills (Viper007Bond)
    Moderator
    Plugin Author

    Posted 3 years ago #

    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.

  3. shidouhikari
    Member
    Posted 3 years ago #

    tnx :D

    but why isn't it easy? I've seen it in 2 sites at least, is it custom?

  4. Alex Mills (Viper007Bond)
    Moderator
    Plugin Author

    Posted 3 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic