Categories

Guide to posting great looking comments at 1-Script.com

1-Script.com is a site that is visited mostly by Web developers, Web designers and other people that have interest in talking about computer code of various kinds. So, to accommodate the need to post presentable code (HTML, PHP, Bash etc.) we are using SyntaxHighlighter Evolved – an awesome WP plugin that formats computer code based on a set of very simple tags around it.

So, if you are posting any kind of computer code in your comments on this blog, we advise you to include your code in these tags:

[code lang=”perl”]…code…[/code]

Where lang=”perl” can be any language from the table below. Also, if the language is PHP, you can use a much simpler code: [php]…code…[/php] . For those of you hacking types out there :) note: this construct does not execute code, it simply styles it for better reading, like this:

<?php
/**
 * Redirects to the default feed
 * This file is deprecated and only exists for backwards compatibility
 *
 * @package WordPress
 */

require( './wp-load.php' );
wp_redirect( get_bloginfo( get_default_feed() . '_url' ), 301 );
exit;
?>

Here is the available languages that this plugin will recognize and properly highlight their syntax.

Language Language Tag
ActionScript3 lang=”as3″
Bash/shell lang=”bash” or lang=”shell”
ColdFusion lang=”cf”
C# lang=”csharp”
C++ lang=”cpp”
CSS lang=”css”
Delphi lang=”pas”
Diff lang=”diff”
Erlang lang=”erl”
Groovy lang=”groovy”
HTML lang=”html”
JavaScript lang=”js”
Java lang=”java”
JavaFX lang=”jfx”
Perl lang=”perl”
PHP lang=”php”
Plain Text lang=”plain”
PowerShell lang=”ps”
Python lang=”py”
Ruby lang=”ruby”
Scala lang=”scala”
SQL lang=”sql”
Visual Basic lang=”vb”
XML,XHTML lang=”xml”