WP-CODEBOX Plugin (code highlighted plug-in)
| Author: Eric.Wang Plugin URL: http://wordpress.org/extend/plugins/wp-codebox/ Tags: syntax highlighting, syntax, highlight, code, formatting Requires at least: 2.0 Tested up to: 2.5.1 Stable tag: 1.2.3 Download | Donate for this plugin development, Thanks! |
== Description ==
WP-CODEBOX code highlighted plug-in, support multiple languages, code downloaded, copied to the clipboard, code box Shoufang and background default attribute set. The continued development of the plug-in is still welcome to use and report bugs.
Wp-CodeBox provides clean syntax highlighting and advanced feature for embedding source code within pages or posts. It support a wide range of popular languages highlighting with line numbers, code download, Copy to clipboard, collapse codebox, automatic keywords link to API manual and maintains formatting while copying snippets of code from the browser.
It's provide simple background configuration for highlighter style / formatting customization.
Since the plugin is developing, in the future it will support more options. (CSS option, Keyword display style, Auto Caps / Nocaps, Case Sensitivity etc.)
== Basic Usage ==
Wrap code blocks with `<pre lang="LANGUAGE" line="1" file="download.txt" colla=" ">` and `</ pre>`
Possible Parameters:
`LANGUAGE` is a [GeSHi] supported language syntax;
`file` will create a code downloading attribute.;
`line =" n "` will hide the single codebox;
`colla =" /-"` will expand / collapse the codebox.
`line, file, colla` is optional.
== Installation ==
1. Upload WP-CodeBox.zip to your Wordpress plugins directory, usually `wp-content/plugins /` and unzip the file. It will create a `wp-content/plugins/WP-CodeBox /` directory.
2. Activate the plugin through the 'Plugins' menu in WordPress.
3. Go to Option-> Wp-CodeBox set default setting.
4. Create a post / page that contains a code snippet following the [proper usage syntax]
== Frequently Asked Questions ==
When activate the plugin, popup the error: "Fatal error: Cannot redeclare class GeSHi in # # / wp-content/plugins/wp-codebox/geshi/geshi.php on line 158"?
Answer: disactivate other Gashi based syntax highlighter plugin first.
== Screenshots ==
1. PHP, no line numbers.
<Div id = "foo"> <? Php function foo () (echo "Hello World! \ \ N";) for (\ $ i = 0; \ $ i <10 $ i ) (foo (); )?> </ Div> |
2. Java, with line numbers, collapse codebox.
3. Ruby, with line numbers starting at 18, downloading feature.
18 19 20 21 22 | class Example def example (arg1) return "Hello:" arg1. to_s end end |
4. Administration interface in WordPress 2.
== Usage ==
** Example 1: PHP, no line numbers **
<pre lang="php">
<div id="foo">
<? php
function foo () (
echo "Hello World! \ \ n";
)
for (\ $ i = 0; \ $ i <10 $ i ) (
foo ();
)
«>
</ div>
</ pre>
** Example 2: Java, with line numbers, collapse codebox **
<pre lang="java" line="1" colla="-">
public class Hello (
public static void main (String [] args) (
System.out.println ( "Hello World!");
)
)
</ pre>
** Example 3: Ruby, with line numbers starting at 18, code downloading (ruby.txt) **
<pre lang="ruby" line="18" file="ruby.txt">
class Example
def example (arg1)
return "Hello:" arg1.to_s
end
end
</ pre>
== Supported Languages ==
The following languages are supported in the `lang` attribute:
Actionscript, ADA, Apache Log, AppleScript, ASM, ASP, AutoIT, Backus-Naur form, Bash, BlitzBasic, C, C for Macs, C #, C , CAD DCL, CadLisp, CFDG, CFDG, ColdFusion, CSS, Delphi, DIV , DOS, Eiffel, Fortran, Fortran, FreeBasic, GML, Groovy, HTML, Inno, IO, Java, Java 5, Javascript, LaTeX, Lisp, Lua, Microprocessor ASM, mIRC, MySQL, NSIS, Objective C, OCaml, OpenOffice BASIC , Oracle 8 SQL, Pascal, Perl, PHP, PL / SQL, Python, Q (uick) BASIC, robots.txt, Ruby, SAS, Scheme, SDLBasic, Smalltalk, Smarty, SQL, T-SQL, TCL, thinBasic, Uno IDL, VB.NET, Visual BASIC, Visual Fox Pro, Winbatch, X , XML, Z80 ASM
== Release Notes ==
** 1.0 **: First internal release; Uses GeSHi v1.0.7.20;
** 1.0.1 **: Add View Code AJAX feature;
** 1.1 **: Add simple background configuration for highlighter style / formatting customization;
** 1.2 **: css tuning and option i18n compatible;
** 1.2.1 **: Uses GeSHi v1.0.7.21;
** 1.2.2 **: WP 2.5 compatible;
** 1.2.2.1 **: Correct small bugs; Improve the css layout to stick the code header; Contributor: YiXia.
** 1.2.3 **: Uses GeSHi v1.0.7.22, add the keywords link to API manual option.
== Donate ==
== Future Feature ==
It will provide backgroud option for highlighter style customization (CSS option, keyword display style, Auto Caps / Nocaps, Case Sensitivity etc.) In the future version.
| -- Welcome to this paper rating |
Related Log | In this paper, readers also concerned about the following:
|


























Leave a reply