{"id":2618,"date":"2008-03-05T01:02:42","date_gmt":"2008-03-05T01:02:42","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/wp-codebox\/"},"modified":"2010-01-09T06:34:45","modified_gmt":"2010-01-09T06:34:45","slug":"wp-codebox","status":"closed","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/wp-codebox\/","author":378178,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.4.3","stable_tag":"trunk","tested":"2.8.6","requires":"2.0","requires_php":"","requires_plugins":"","header_name":"WP-CodeBox","header_author":"Eric Wang","header_description":"","assets_banners_color":"","last_updated":"2010-01-09 06:34:45","external_support_url":"","external_repository_url":"","donate_link":"http:\/\/www.ericbess.com\/ericblog\/2008\/03\/03\/wp-codebox\/#donate","header_plugin_uri":"http:\/\/www.ericbess.com\/ericblog\/2008\/03\/03\/wp-codebox\/","header_author_uri":"http:\/\/www.ericbess.com\/ericblog\/","rating":4,"author_block_rating":0,"active_installs":90,"downloads":103431,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq"],"tags":[],"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":"1","5":0},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":[],"block_files":[],"assets_screenshots":{"screenshot-1.gif":{"filename":"screenshot-1.gif","revision":"1566841","resolution":"1","location":"plugin","width":411,"height":190}},"screenshots":[]},"plugin_section":[],"plugin_tags":[1214,1975,3986,2207,4609],"plugin_category":[46,59],"plugin_contributors":[],"plugin_business_model":[],"class_list":["post-2618","plugin","type-plugin","status-closed","hentry","plugin_tags-code","plugin_tags-formatting","plugin_tags-highlight","plugin_tags-syntax","plugin_tags-syntax-highlighting","plugin_category-editor-and-writing","plugin_category-utilities-and-tools","plugin_committers-ericbess"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/wp-codebox.svg","icon_2x":false,"generated":true},"screenshots":[{"src":"https:\/\/ps.w.org\/wp-codebox\/trunk\/screenshot-1.gif?rev=1566841","caption":""}],"raw_content":"<!--section=description-->\n<p>WP-CodeBox provides clean syntax highlighting and AJAX advanced features for embedding source code within pages or posts. \nIt support wide range of popular languages highlighting with line numbers, code download, Copy to clipboard, \ncollapse codebox,automatic keywords link to API manual and maintains formatting while copying snippets of code from the browser.<\/p>\n\n<p>It's provide simple background configuration for highlighter style\/formatting customization.\nSince the plugin is developing, in the future it will support more options.(CSS option,Keywords display style,Auto Caps\/Nocaps,Case Sensitivity etc. )<\/p>\n\n<h4>Basic Usage<\/h4>\n\n<p>Wrap code blocks with <code>&lt;pre lang=\"LANGUAGE\" line=\"1\" file=\"download.txt\" colla=\"+\"&gt;<\/code> and <code>&lt;\/pre&gt;<\/code><\/p>\n\n<p>Possible Parameters:<\/p>\n\n<ul>\n<li><code>lang=\"LANGUAGE\"<\/code> - <code>LANGUAGE<\/code> is a <a href=\"http:\/\/qbnz.com\/highlighter\/\">GeSHi<\/a> supported language syntax.  <\/li>\n<li><code>file=\"download.txt\"<\/code> - The <code>file<\/code> will create a code downloading attribute.<\/li>\n<li><code>line=\"N\"<\/code> - The <code>N<\/code> is the starting line number.  <\/li>\n<li><code>colla=\"+\/-\"<\/code> - The <code>+\/-<\/code> will expand\/collapse the codebox. <\/li>\n<li><code>line,file,colla<\/code> is optional.  <\/li>\n<\/ul>\n\n<p><a href=\"http:\/\/www.ericbess.com\/ericblog\/2008\/03\/03\/wp-codebox\/#examples\">More usage examples<\/a><\/p>\n\n<h4>About Author<\/h4>\n\n<p><a href=\"http:\/\/wordpress.org\/extend\/plugins\/profile\/ericbess\">Eric Wang<\/a><\/p>\n\n<h3>Usage<\/h3>\n\n<p><strong>Example 1: PHP, no line numbers<\/strong><\/p>\n\n<pre><code>&lt;pre lang=\"php\"&gt;\n&lt;div id=\"foo\"&gt;\n&lt;?php\n  function foo() {\n    echo \"Hello World!\\\\n\";\n  }\n  for (\\$i = 0; \\$i &lt; 10 $i++) {\n    foo();\n  }\n?&gt;\n&lt;\/div&gt;\n&lt;\/pre&gt;\n<\/code><\/pre>\n\n<p><strong>Example 2: Java, with line numbers,collapse codebox<\/strong><\/p>\n\n<pre><code>&lt;pre lang=\"java\" line=\"1\" colla=\"-\"&gt;\npublic class Hello {\n  public static void main(String[] args) {\n    System.out.println(\"Hello World!\");\n  }\n}\n&lt;\/pre&gt;\n<\/code><\/pre>\n\n<p><strong>Example 3: Ruby, with line numbers starting at 18, code downloading(ruby.txt)<\/strong><\/p>\n\n<pre><code>&lt;pre lang=\"ruby\" line=\"18\" file=\"ruby.txt\"&gt;\nclass Example\n  def example(arg1)\n    return \"Hello: \" + arg1.to_s\n  end\nend\n&lt;\/pre&gt;&lt;h3&gt;Supported Languages&lt;\/h3&gt;\n<\/code><\/pre>\n\n<p>The following languages are supported in the <code>lang<\/code> attribute:<\/p>\n\n<p>abap, actionscript, ada, apache, applescript, asm, <strong>asp<\/strong>, autoit, <strong>bash<\/strong>,\nblitzbasic, bnf, <strong>c<\/strong>, c_mac, caddcl, cadlisp, cfdg, cfm, cpp-qt, <strong>cpp<\/strong>,\n<strong>csharp<\/strong>, <strong>css<\/strong>, d, delphi, diff, div, dos, dot, eiffel, fortran, freebasic,\ngenero, gml, groovy, haskell, <strong>html4strict<\/strong>, idl, ini, inno, io, <strong>java<\/strong>,\n<strong>java5<\/strong>, <strong>javascript<\/strong>, latex, lisp, lua, m68k, matlab, mirc, mpasm,\n<strong>mysql<\/strong>, nsis, <strong>objc<\/strong>, ocaml-brief, ocaml, oobas, <strong>oracle8<\/strong>, pascal, per,\n<strong>perl<\/strong>, php-brief, <strong>php<\/strong>, plsql, <strong>python<\/strong>, qbasic, <strong>rails<\/strong>, reg, robots,\n<strong>ruby<\/strong>, sas, scheme, sdlbasic, smalltalk, smarty, <strong>sql<\/strong>, tcl, text,\nthinbasic, tsql, <strong>vb<\/strong>, <strong>vbnet<\/strong>, vhdl, visualfoxpro, winbatch, <strong>xml<\/strong>, xpp,\nz80<\/p>\n\n<p>(Bold languages just highlight the more popular ones.)<\/p>\n\n<h4>Languages HotLink<\/h4>\n\n<p><a href=\"http:\/\/www.actionscript.org\/\">Actionscript<\/a>,<a href=\"#\">ADA<\/a>,<a href=\"http:\/\/www.apache.org\/\">Apache Log<\/a> ,<a href=\"http:\/\/www.apple.com\/macosx\/features\/applescript\/\">AppleScript<\/a> ,<a href=\"#\">ASM<\/a> ,<a href=\"http:\/\/www.asp.net\/\">ASP<\/a> ,<a href=\"http:\/\/www.autoitscript.com\/\">AutoIT<\/a>,<a href=\"http:\/\/en.wikipedia.org\/wiki\/Backus-Naur_form\">Backus-Naur form<\/a> ,<a href=\"http:\/\/www.gnu.org\/software\/bash\/bash.html\">Bash<\/a> ,<a href=\"http:\/\/blitzbasic.com\/\">BlitzBasic<\/a> ,<a href=\"http:\/\/www.cprogramming.org\/\">C<\/a> ,<a href=\"#\">C for Macs<\/a> ,<a href=\"#\">C#<\/a> ,<a href=\"http:\/\/www.cplusplus.com\/\">C++<\/a> ,<a href=\"http:\/\/www.intellicad.org\/\">CAD DCL<\/a> ,<a href=\"http:\/\/www.intellicad.org\/\">CadLisp<\/a> ,<a href=\"http:\/\/www.contextfreeart.org\/wiki\/\">CFDG<\/a> ,<a href=\"http:\/\/www.macromedia.com\/software\/coldfusion\/\">ColdFusion<\/a>,<a href=\"http:\/\/www.w3.org\/Style\/\">CSS<\/a> ,<a href=\"http:\/\/www.borland.com\/\">Delphi<\/a> ,<a href=\"http:\/\/div-arena.com\/\">DIV<\/a> ,<a href=\"#\">DOS<\/a> ,<a href=\"http:\/\/eiffel.com\/\">Eiffel<\/a>,<a href=\"http:\/\/en.wikipedia.org\/wiki\/Fortran\">Fortran<\/a> ,\n<a href=\"http:\/\/www.freebasic.net\/\">FreeBasic<\/a> ,<a href=\"http:\/\/www.gamemaker.nl\/\">GML<\/a> ,<a href=\"http:\/\/groovy.codehaus.org\/\">Groovy<\/a>,<a href=\"http:\/\/www.w3.org\/TR\/REC-html40\/\">HTML<\/a> ,<a href=\"http:\/\/www.jrsoftware.org\/isinfo.php\">Inno<\/a> ,<a href=\"http:\/\/www.iolanguage.com\/about\/\">IO<\/a> ,<a href=\"http:\/\/java.sun.com\/\">Java<\/a> ,<a href=\"http:\/\/java.sun.com\/\">Java 5<\/a> ,<a href=\"http:\/\/www.javascript.com\/\">Javascript<\/a>,<a href=\"http:\/\/www.latex-project.org\/\">LaTeX<\/a>,<a href=\"http:\/\/www.lisp.org\/\">Lisp<\/a>,<a href=\"http:\/\/www.lua.org\/\">Lua<\/a>,<a href=\"#\">Microprocessor ASM<\/a> ,<a href=\"http:\/\/mirc.com\/\">mIRC<\/a>,<a href=\"http:\/\/mysql.com\/\">MySQL<\/a>,\n<a href=\"http:\/\/nsis.sourceforge.net\/\">NSIS<\/a>,<a href=\"#\">Objective C<\/a> ,<a href=\"http:\/\/caml.inria.fr\/\">OCaml<\/a>,<a href=\"http:\/\/www.openoffice.org\/\">OpenOffice BASIC<\/a>,<a href=\"http:\/\/www.oracle.com\/\">Oracle 8 SQL<\/a>,<a href=\"#\">Pascal<\/a> ,<a href=\"http:\/\/www.perl.com\/\">Perl<\/a>,<a href=\"http:\/\/www.php.net\/\">PHP<\/a>,<a href=\"http:\/\/en.wikipedia.org\/wiki\/PL\/SQL\">PL\/SQL<\/a> ,<a href=\"http:\/\/www.python.org\/\">Python<\/a>,<a href=\"http:\/\/qbnz.com\/\">Q(uick)BASIC<\/a>,<a href=\"http:\/\/www.robotstxt.org\/wc\/norobots.html\">robots.txt<\/a>,<a href=\"http:\/\/ruby-lang.org\/\">Ruby<\/a> ,<a href=\"http:\/\/en.wikipedia.org\/wiki\/SAS_programming_language\">SAS<\/a>,<a href=\"http:\/\/schemers.org\/\">Scheme<\/a> ,<a href=\"http:\/\/sdlbasic.sf.net\/\">SDLBasic<\/a>,<a href=\"http:\/\/en.wikipedia.org\/wiki\/Smalltalk_programming_language\">Smalltalk<\/a>,<a href=\"http:\/\/smarty.php.net\/\">Smarty<\/a>,<a href=\"#\">SQL<\/a>,<a href=\"#\">T-SQL<\/a> ,<a href=\"http:\/\/www.tcl.tk\/\">TCL<\/a>,<a href=\"http:\/\/www.thinbasic.com\/\">thinBasic<\/a>,<a href=\"http:\/\/wiki.services.openoffice.org\/wiki\/Uno\/Article\/Understanding_Uno\">Uno IDL<\/a> ,<a href=\"http:\/\/msdn.microsoft.com\/\">VB.NET<\/a>,<a href=\"http:\/\/msdn.microsoft.com\/vbasic\/\">Visual BASIC<\/a> ,<a href=\"http:\/\/msdn.microsoft.com\/vfoxpro\/\">Visual Fox Pro<\/a> ,<a href=\"http:\/\/winbatch.com\/\">Winbatch<\/a>,<a href=\"http:\/\/msdn2.microsoft.com\/en-us\/library\/aa867122.aspx\">X++<\/a>,<a href=\"http:\/\/www.xml.com\/\">XML<\/a>,<a href=\"http:\/\/en.wikipedia.org\/wiki\/Zilog_Z80#The_Z80_assembly_language\">Z80 ASM<\/a>.<\/p>\n\n<h3>Release Notes<\/h3>\n\n<p><strong>1.0<\/strong> : First internal release; Use GeSHi v1.0.7.20;<\/p>\n\n<p><strong>1.0.1<\/strong> : Add View Code AJAX feature;<\/p>\n\n<p><strong>1.1<\/strong> : Add simple background configuration for highlighter style\/formatting customization;<\/p>\n\n<p><strong>1.2<\/strong> : css tuning and option i18n compatible;<\/p>\n\n<p><strong>1.2.1<\/strong> : Use GeSHi v1.0.7.21;<\/p>\n\n<p><strong>1.2.2<\/strong> : WP 2.5 compatible;<\/p>\n\n<p><strong>1.2.2.1<\/strong> : Correct small bugs;Improve the css layout to stick the code header;   Contributor:YiXia(http:\/\/www.e-xia.com).<\/p>\n\n<p><strong>1.2.3<\/strong> : Use GeSHi v1.0.7.22, add the keywords link to API manual option;<\/p>\n\n<p><strong>1.3<\/strong> : Jquery toggle, use GeSHi v1.0.8.<\/p>\n\n<p><strong>1.3.2<\/strong> : Localization  design.<\/p>\n\n<p><strong>1.3.3<\/strong> : fixed for \"download\" \"option page\". Spanish by Shakaran\/www.shakaran.es<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload WP-CodeBox.zip to your Wordpress plugins directory, usually <code>wp-content\/plugins\/<\/code> and unzip the file.  It will create a <code>wp-content\/plugins\/wp-codebox\/<\/code> directory.<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress.<\/li>\n<li>Go to Option-&gt;Wp-CodeBox set the default setting.<\/li>\n<li>Create a post\/page that contains a code snippet following the <a href=\"http:\/\/www.ericbess.com\/ericblog\/2008\/03\/03\/wp-codebox\/#examples\">proper usage syntax<\/a>.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<p>When activate the plugin, popup the error:\n\"Fatal error: Cannot redeclare class GeSHi in ##\/wp-content\/plugins\/wp-codebox\/geshi\/geshi.php on line 158\".<\/p>\n<dl>\n<dt>Answer:disactivate other Gashi based syntax highlighter plugin first.<\/dt>\n<dd><p><a href=\"http:\/\/www.ericbess.com\/ericblog\/2008\/03\/03\/wp-codebox\/#respond\">Leave your FAQ<\/a><\/p><\/dd>\n\n<\/dl>","raw_excerpt":"WP-CodeBox provides clean syntax highlighting and AJAX advanced features for embedding source code within pages or posts.\nIt support wide range of pop &hellip;","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/2618","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=2618"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/ericbess"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=2618"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=2618"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=2618"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=2618"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=2618"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=2618"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}