Calendar

March 2008
1 Two Three Four Five Six Day
<<2 4>>
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31

Translator

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.3.1
Download

Donate for this plugin development, Thanks!

== Description ==

WP-CODEBOX code highlighting plug-in, supports multiple languages, code download, copy to the clipboard, the code box, retractable, and the background the default property setting. This plug-in is also continuing development, 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.

? View Code PHP
  "foo" > <Div id = "foo">
 <? php
   function foo () (
     n" ; echo "Hello World! \ \ n";
   )
   \ $i = 0 ; \ $i < 10 $i ++ ) { for (\ $ i = 0; \ $ i <10 $ i + +) (
     foo ();
   )
 ? "
 </ Div> 

2. Java, with line numbers, collapse codebox.

? View Code JAVA
  1
 2
 3
 4
 5
  public class Hello (
   main ( String [ ] args ) { public static void main (String [] args) (
     . println ( "Hello World!" ) ; System. Out. Println ( "Hello World!");
   )
 ) 

3. Ruby, with line numbers starting at 18, downloading feature.

? Download ruby.txt
  18
 19
 20
 21
 22
  class Example
      arg1 ) def example (arg1)
     + arg1. to_s return "Hello:" + arg1. to_s
   end
 end 

4. Administration interface in WordPress 2.
screenshot-1.gif

== Usage ==

** Example 1: PHP, no line numbers **
<pre lang="php" line="n">
<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" 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.

  1. Yu Fei posted the following on 2010-01-28 at 11:37 AM.

    Brother, help me look at it? Why is my display is not normal!
    Code is too long will lead to horizontal scroll bar code does not fully illustrate the problem,
    Look at this http://www.freeopens.com/2010_01_31.html
    Trouble to look at the guidance!
    Thanks

    Reply
  2. Rivers and lakes large shrimp posted the following on 2010-01-23 at 1:43 AM.

    ie6, 7 the next if the code is too long will lead to horizontal scroll bar block of code problems, troubles for the next amendment to the following details as well as my own temporary correction method, please Zhijiao:
    http://www.jhdxr.com/blog/html/tech/fix-wp-codebox-show-bug-for-ie6-and-ie7.html

    Reply
    1. Clang Posted the following on 2010-02-03 at 8:45 PM.

      Boss hopes to solve this problem! Too painful!

      Reply
  3. Onigiri posted the following on 2010-01-22 at 10:13 PM.

    In the same article, I put a 2 after the code that displays the results are not normal. . . .
    Chrome Under

    Reply
  4. NsYta Posted the following on 2010-01-21 at 3:12 PM.

    En have a problem is that this plug-in does not know Wrap property? If the code is too long. I do not want horizontal scroll bar appears to be how to do?

    Reply
  5. NsYta Posted the following on 2010-01-20 at 11:07 AM.

    This plug-in 2.91 can not be used under? I opened with no highlighting. Option settings are there, but no matter what the setting will not change. . Read file header does not show that inserting WP-CODEBOX the relevant documents.

    Reply
    1. NsYta Posted the following on 2010-01-21 at 2:47 PM.

      I found why the paper did not because my footer insert to see other plug-in shows to know this is used to load the JS used

      Reply
      1. NsYta Posted the following on 2010-01-21 at 2:50 PM.

        Halo forget labels. Is because the document does not join the footer

        Reply
  6. hamid Posted the following on 2010-01-17 at 9:02 AM.

    thanks, very useful.

    Reply
  7. Toni Posted the following on 2010-01-12 at 9:02 PM.

    Thx for sharing

    Reply
  8. Clang Posted the following on 2010-01-09 at 9:31 PM.

    Thank you very much problem-solving!

    Reply
  9. Clang Posted the following on 2010-01-08 at 11:01 PM.

    Hello, use this plug-in is very good, but now has a minor defects,
    http://www.clang.cn/blog/?p=603
    The line side effects of some deformation of the number of rows that can help analyze the reason?

    Reply
    1. Roman posted the following on 2010-01-09 at 4:05 PM.

      Hi,

      is it possible to hide the header / function bar of the Code-Box by parameter / attribute in the pre-Tag?

      If not, this would be a good feature for future versions.

      Reply
    2. eric posted the following on 2010-01-09 at 2:36 PM.

      . line_numbers pre (padding-left: 10px;)
      Changed to:. Line_numbers pre (padding: 0px;)

      Reply
  10. Consciência Planetária Posted the following on 2010-01-08 at 1:17 PM.

    I've added a custom CSS so that CodeBox doesn't go too big for large codes:

    . wp_codebox (
    max-height: 800px;
    overflow: auto! important;
    )

    Reply
  11. Diego Pierotto Posted the following on 2009-12-20 at 2:01 AM.

    Hi,
    i updated the italian translation.

    You can find it here:

    http://gringo.netsons.org/blog/download/200/

    Can you please add it to the sources?

    Thanks,
    Diego

    Reply
  12. ZHY Posted the following on 2009-12-14 at 5:08 PM.

    WP-CodeBox in WordPress2.8.6 display problems. Tried many times. Can not be used

    http://stackoverflow.com/questions/1853590/anyone-using-wp-codebox-1-4-with-wordpress-2-8-6

    Reply
    1. ZHY Posted the following on 2009-12-14 at 5:25 PM.

      Amount. . . Tip a few minutes ago with the new. . Solve the problem. .

      Reply
  13. Video Posted the following on 2009-11-30 at 10:11 PM.

    very nice thanks

    Reply
  14. Mohammad Posted the following on 2009-11-18 at 7:12 AM.

    tanx for this post: di love this web

    Reply
  15. N-Designs Posted the following on 2009-11-15 at 2:34 PM.

    oh great features ..

    Reply
  16. Michael posted the following on 2009-11-06 at 2:26 AM.

    How to removal language type title next to 'view code' on functionality bar?

    Reply
  17. cooolo Posted the following on 2009-11-01 at 11:28 AM.

    Ask
    file = "Download ruby.txt": Create a downloadable save the name of the

    This document should be placed on ruby.txt Which path? ?

    Reply
  18. sssss Posted the following on 2009-10-30 at 8:51 AM.


    //全部选中全部取消处理
    function CheckTrue(obj)
    {
    $("input[type=checkbox][name=checkItem]").attr("checked",$(obj).attr("checked"));
    }

    / / Collection of items selected
    function CollectCheckItems ()
    (
    var allcheckboxs = $ ( "input [type = checkbox] [name = checkItem] [checked]");
    var ids = new StringBuilder ();
    for (var i = 0; i <allcheckboxs.length; i + +)
    (
    var id = $ (allcheckboxs [i]). attr ( "id"). split ("_")[ 1];
    ids.Append (id)
    ids.Append (",");
    )
    var strIds = ids.ToString ();
    return strIds.substr (0, strIds.length-1);
    )

    This article comes from CSDN blog, reproduced please indicate source: http://www.cnblogs.com/xuezhizhang/archive/2009/10/28/1591639.html

    Reply
  19. Hossein Posted the following on 2009-10-04 at 11:23 PM.

    thanks for this poste

    Reply
  20. sooran Posted the following on 2009-09-15 at 9:46 PM.

    very good! tanks;
    very helped me!

    Reply
  21. Chuck Davis posted the following on 2009-09-12 at 3:54 AM.

    Eric,
    Very nice plugin! One question: When I try to include a html statement in the codeBox the html chars are converted ie> becomes> I've tried everything I can think of - in both normal and html code view. Any hints would be gratefully appreciated. Thanking you in advance ...

    Reply
  22. e-antz Posted the following on 2009-08-18 at 12:49 PM.

    Hi ..
    thanks for this plugin
    but, I have a simple question.
    Can this plugin used in wordpress theme? How can use it?

    Sorry for my english ..

    Reply
  23. neeke Posted the following on 2009-07-26 at 10:35 PM.

    Very nice plug-in, why not updated?

    Reply
  24. vrnagy Posted the following on 2009-07-18 at 11:45 AM.

    Hi Eric!

    I created the Hungarian translation of your script.
    Download link: http://vrnagy.ath.cx/stuff/wp-codebox-hu_HU.mo

    Reply
  25. Sudar Posted the following on 2009-07-08 at 2:28 PM.

    Thanks for the excellent Plugin.

    I found one Small problem with the Plugin. You are directly including the JavaScript Files instead of using wp_enqueue_script function http://codex.wordpress.org/Function_Reference/wp_enqueue_script

    The advantage of using this function is that, this will not include jQuery again, if it is already included by some other Plugin or by theme.

    Reply
  26. Kyle posted the following on 2009-07-06 at 6:07 PM.

    main.php in reference admin.js time, do not comply with the new XHTML standards, it should be for the script type = "text / javascript", rather than the script language = "javascript"

    Reply
  27. Galder Zamarreno Posted the following on 2009-06-25 at 2:39 AM.

    Figured out what my problem was! It's the freaking double quotes used in this blog. I copy / pasted the code but didn't work correctly. Type your own double quotes otherwise it won't work!

    http://wordpress.org/support/topic/282918?replies=2 # post-1115173

    Reply
  28. wreutz Posted the following on 2009-06-15 at 5:14 PM.

    i have a problem with html entities like & _lt; and & _gt; (_ just added to show the entities).
    i have to use html entities in pre tags to keep my site (x) html valid and wordpress converts all <to & _lt; as it's supposed to do. The problem i have is related to wp-codebox because when i have the plugin enabled the entities are shown instead of decoded!
    when i disable the plugin the normal pre is used and the entities get decoded and shown as <or>

    can anyone track the problem down in wp-codebox?
    i had a look at the code but couldn't find a solution :-(

    Reply
    1. Sudar Posted the following on 2009-08-19 at 2:28 PM.

      Even I have the same problem. The hml entities are not decoded properly by the Plugin.

      Does anyone know how to fix it? I am even ready to sponsor someone who can fix this.

      Reply
  29. Photayoke Posted the following on 2009-06-11 at 6:20 PM.

    I have already installed WP-Codebox. And How to use that? Please explain me details and I want to show the HTML code in the post with this code box.

    Reply
  30. IP ADDRESS Posted the following on 2009-06-07 at 8:39 AM.

    Hi, i translate this plug-in to turkish but i dont know how i can use with my translation. Is there any option for this? Or where can i edit for set it?

    Reply
  31. rize Gündem Posted the following on 2009-06-06 at 9:53 PM.

    On FF works fine.Anyway, I like too much your plugin, it 'the best I have seen on syntax highlighting.
    rn This article comes from: www.EricBess.com Detailed Source Reference: http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/

    Reply
  32. jon posted the following on 2009-05-19 at 3:49 AM.

    You need to add "text-align: left;" to ". Wp_codebox pre" otherwise in some circumstances all of the code will be centered.

    Reply
  33. Werbeagentur-Wissen Posted the following on 2009-05-14 at 8:28 AM.

    I would like to know how to display something like:

    <? php
    / / ...
    echo ";
    echo'';
    ? "

    Can't find anything over here -.-
    I know this is creepy stuff, but at the moment i'm using "/ / sorry" and that would be ok.

    Cheers!

    Reply
    1. Werbeagentur-Wissen Posted the following on 2009-05-14 at 8:32 AM.

      wow ... i'm such an idiot XD
      it's:

      and atm. i'm using <\ / pre>
      hell ... ..

      Reply
      1. Werbeagentur-Wissen Posted the following on 2009-05-14 at 9:03 AM.

        i give up, just del this ....

        Reply
  34. Baron Posted the following on 2009-05-14 at 1:14 AM.

    Works great, thank you

    Reply
  35. Barabar Jhoom network posted the following on 2009-05-02 at 6:44 PM.

    Very supportive! Doing great.

    Reply
  36. Samuel Santos Posted the following on 2009-04-30 at 9:15 AM.

    The last version of the HTML spec now defines a way to specify the programming language in the markup.

    Example:
    <pre> <code class="language-pascal"> var i: Integer;
    begin
    i: = 1;
    end. </ code> </ pre>

    Source:
    http://www.whatwg.org/specs/web-apps/current-work/multipage/text-level-semantics.html # the-code-element

    Can a new version of the plugin be updated to use this syntax?

    Reply
  37. Bolo Posted the following on 2009-04-08 at 4:12 PM.

    How can bright html statement ah?

    Reply
  38. Çağrı Posted the following on 2009-04-01 at 9:11 PM.

    not working with wp 2.7

    Reply
    1. Eric Posted the following on 2009-04-01 at 10:16 PM.

      This blog is working in WP 2.7

      Reply
  39. DJ Posted the following on 2009-03-21 at 3:47 AM.

    I can not get the C # code to work. I have to use pre lang = "C" to get a close representation of C #. Can you help with this. Check out my site to see the post I am having trouble with.

    Reply
    1. Eric Posted the following on 2009-03-21 at 11:57 PM.

      lang = "csharp"

      Reply
  40. karistuck Posted the following on 2009-03-12 at 1:29 PM.

    : D it's great!!

    thank you, I really need it.

    8O

    Reply
  41. Sam M. posted the following on 2009-03-12 at 3:01 AM.

    Is there a way to enable / disable the function bar in a code block via the pre switches to override the default behavior of hiding the function bar? Something like bar ="+/-" similar to the colla ="+/-"? Thanks again for a wonderful plugin!

    Reply
  42. There has been a person posted the following on 2009-01-26 at 9:36 PM.

    Halo ~ ~ below that software, and can not see any map, I made the address will come up. The figure of the English option, and all mean? h ttp: / / test.35sun.com/temp/wp-codebox-1.gif
    ↓ ↓ this option, I tried, whether or not checked, failed to see any changes. h ttp: / / test.35sun.com/temp/wp-codebox-2.gif

    Reply
  43. There has been a person posted the following on 2009-01-26 at 9:32 PM.

    Hello, may I ask two background settings, 1. The figure of the English option, and all mean? 2. ↓ ↓ this option, I tried, whether or not checked, failed to see any changes.

    Reply
  44. Me posted the following on 2009-01-24 at 11:56 PM.

    Hai,

    On the wordpress plugins page, it says you get a button in your TinyMCE editor.
    Looks like I don't get this button : ( Any ideas how?
    Wordpress version: 2.7

    Thanks,
    Me

    Reply
  45. Frank Liu Posted the following on 2009-01-19 at 6:14 AM.

    File download problem after install 1.3.31, fixed by alter line 38 in wp-codebox.php to,
    if (preg_match ( "/ \ s * <pre(.*file=[\"']".$download."[\"'])[^> ]+>(.*)< \ / pre> \ s * / siU ", $ content, $ match)) (
    If anyone has the same problem, try this fix.

    Reply
  46. bastian_m posted the following on 2009-01-18 at 8:14 PM.

    It seems, that there's a Bug! ^ ^
    I can't highlight AutoIT-Code with this Plugin - try it - u will got something like:
    span Style = "color: # 0080FF; font-Style: Italic; font-Weight: Bold;" "=" color: # 0080FF; font-Style: Italic; font-Weight: Bold; "" = "color: # 0080FF ; font-style: italic; font-weight: bold ;">/=" color: # 0080FF; font-style: italic; font-weight: bold; "> / www.autoitscript.com/autoit3/docs/functions/ MsgBox.htm "> / 3 / =" color: # 0080FF; font-style: italic; font-weight: bold; ">> msgbox <=" color: # 0080FF; font-style: italic; font-weight: bold ; "> / a> (=" color: # 0080FF; font-style: italic; font-weight: bold ;">=" color: # AC00A9; font-style: italic; font-weight: bold; "=" color: # 0080FF; font-style: italic; font-weight: bold; ">> 0, =" color: # 0080FF; font-style: italic; font-weight: bold; "> =" color: # 0080FF; font-style: italic; font-weight: bold; ">" Warum? "span style =" color: # 0080FF; font-style: italic; font-weight: bold; "> =" color: # 0080FF; font - style: italic; font-weight: bold ;">,=" color: # 0080FF; font-style: italic; font-weight: bold; "> =" color: # 0080FF; font-style: italic; font-weight : bold; ">" Weil ichs kann! "span style =" color: # 0080FF; font-style: italic; font-weight: bold; "> =" color: # 0080FF; font-style: italic; font-weight : bold ;">)=" color: # 0080FF; font-style: italic; font-weight: bold; ">

    Reply
  47. neekey Posted the following on 2009-01-17 at 6:22 PM.

    Yes, the top one

    Reply
  48. Web Design Posted the following on 2009-01-15 at 4:01 AM.

    Thanks ..

    Reply
  49. Nisse Posted the following on 2009-01-15 at 1:09 AM.

    Hi,
    Me, again :)
    I use some Knowledge on this blog post: 'Styling code Samples par Deux' and it seems to get me to a Point there I can go further, I hope :)
    Regards

    Reply
  50. Nisse Posted the following on 2009-01-15 at 12:32 AM.

    Hi,
    I have install your PlugIn wp-codebox. I have WordPress 2.3.3 and a own styled template. (With two big css-style-files)
    The only result I get is the same has I use the '<pre>-tag, stand alone.
    I suspect that there is some css-issue.
    You can look at a sample post on this link: http://blogg.ngn.nu/index.php/2009/01/14/testar-syntax-highligt-wp-codebox/The blog is in Swedish but I think you can understand the post anyway :)
    Can you (any) give me some idea?
    Is there additional information you (any) need to help me out?
    Regards

    Reply
  51. Diego Pierotto Posted the following on 2009-01-06 at 12:34 AM.

    Hi Eric,
    nice plugin!
    I translated it in italian and put the file here:
    http://gringo.netsons.org/blog/download/200/
    I hope this can be usefull for you and that will be soon integrated in the next release.

    Bye.

    Reply
  52. javierav Posted the following on 2009-01-05 at 8:35 AM.

    Hello.
    I have wordpress 2.7 and I have a problem with your plugin. When I click for download source code in txt, load this page: ... / wp-content/plugins/wp-codebox/wp-codebox.php? P = 1 & download = download . txt but the page is in white. I have been studying the source code and it have an error in wp-codebox.php line 39: the regular expression do not match and never send the content.
    How can I resolve this? Many thanks.
    Regards.

    Reply
  53. mike posted the following on 2009-01-02 at 6:10 AM.

    My codes are not spacing out
    Why is this?

    Reply
  54. hugo5688 Posted the following on 2008-12-08 at 5:39 PM.

    Hello, after installing plugin, unintentionally blog to export data out there have been some mistakes, as
    Warning: include_once (../../../ WP-config.php) [function.include-once]: failed to Open Stream: No. such file or Directory in / plugins / WP-codebox / WP-codebox.php on line 32 Warning: include_once () [function.include]: Failed opening'../../../ WP-config.php 'for inclusion (include_path ='.:/ usr / lib / PHP: / usr / Local / lib / PHP ') in / plugins / WP-codebox / WP-codebox.php on line 32 Warning: include_once (../../../ WP-settings.php) [function.include-once]: failed to Open Stream: No. such file or Directory in / plugins / WP-codebox / WP-codebox.php on line 33 Warning: include_once () [function.include]: Failed opening'../../../ WP -settings.php 'for inclusion (include_path ='.:/ usr / lib / php: / usr / local / lib / php') in / plugins / wp-codebox / wp-codebox.php on line 33
    Should be grateful if you could look at, thanks

    Reply
  55. pete Posted the following on 2008-12-07 at 9:14 PM.

    When I try to write bare HTML my attributes are delete after I save. I'm using wordpress mu. I guess thats the reason it does not trigger the box.BTW, your site encoding is broken badly. It looks like asians encoding errors although your wordpress anounces UTF8. I even can't read the button texts. Just guessing ...

    Reply
  56. 9shell Posted the following on 2008-11-28 at 5:16 PM.

    Hello, thank you for your plug-in, today, I compared the code of several plug-ins, you this is the best. 但是. To mention a small problem:
    file = "Hello.java" have shown the file name is hello.java. So put aside some java file is not compiled, please think of ways to solve what, java case-sensitive.

    Reply
    1. Eric Posted the following on 2008-11-28 at 8:30 PM.

      Changed, there is no change version number, you re-download and install what,

      Reply
  57. funbsd Posted the following on 2008-11-13 at 11:19 AM.

    In ff and opera-ri can not be displayed "Copy to Clipboard"

    Reply
    1. Eric Posted the following on 2008-11-13 at 2:59 PM.

      Congratulations on your correct answers, you can participate in to improve.

      Reply
  58. funbsd Posted the following on 2008-11-11 at 2:42 PM.

    Well, the problem was originally option.php

    Reply
  59. funbsd Posted the following on 2008-11-11 at 2:15 PM.

    After the upgrade to 1.3.3, you can not change main.php inside the View Code and Copy to Clipboard for the Chinese, and into English, the page on the mess, and the original version not have this problem

    Reply
  60. lavermil Posted the following on 2008-11-08 at 6:03 AM.

    I am have a bit of trouble getting this line to work correctly once I have changed it. I want to support both <code> and <pre> statements. I can make it support one or the other but I want it to support both. Any suggestion on the regex of how to make this work without breaking it?
    function wp_codebox_before_filter ($ content)
    (
    return preg_replace_callback (
    "/ \ S * <(code | pre )}(?: lang = [\ "']([ \ w-] *) [\" '] | file = [\ "']([ \ w-] * \.? [\ w-] *) [\ " '] | colla = [\ "']([ \ + \ -]) [\"'] | line = [\ " '] (\ d * | n ) [\ " '] | \ s )+>(.*)< \ / (code | pre)> \ s * / siU",
    "Wp_codebox_substitute",
    $ content
    );
    )

    Reply
  61. tom posted the following on 2008-11-05 at 9:10 PM.

    Just had the following error while clicking on ruby.txt:

    http://www.ericbess.com/ericblog/wp-content/plugins/wp-codebox/wp-codebox.php?p=134&download=ruby.txt

    Reply
    1. Eric Posted the following on 2008-11-06 at 10:25 AM.

      fixed

      Reply
  62. Chrislabricole Posted the following on 2008-10-29 at 7:06 PM.

    Hi,
    Thanks for your plugin but it have 2 bugs:
    1) the numbers of lines are shifted over the code: s

    And 2) at the admin dashboard, for edit settings of you plugin, I get this:
    You are not a LEVEL 8 or above USER & hence you cannot configure WP-CodeBox. If you are a LEVEL 8 or above USER, then please Logout & Login again.

    Thanks by advance for your reply and if need, correct theses bugs ... :)

    Reply
    1. Eric Posted the following on 2008-11-06 at 10:26 AM.

      fixed in new version.

      Reply
  63. funbsd Posted the following on 2008-10-19 at 1:34 AM.

    Have just said is wrong, the second step should be as Werbeagentur-Wissen said, only the annotations '&' = " '&' on the line, and if all annotations, and elsewhere there is a problem. The third step is for the javascript is a must, other languages depending on the circumstances. No other problems found.

    Reply
  64. funbsd Posted the following on 2008-10-19 at 12:53 AM.

    Finally found a solution. First, when released the source code to be written, the code if there is ", followed be a space, can not be any other characters, otherwise modify the visual editor will be considered illegal html tags, then the contents of will be deleted. Second is to modify wp-codebox/geshi/geshi.php, will function hsc Lane '&' = "'&','"' ="'"','<' = " '"', ' " '= "'" ', comment out the preceding messages Werbeagentur-Wissen already mentioned. Third, changes wp-codebox/geshi/geshi/javascript.php, will be' SYMBOLS '=> array to remove, or change in the & Cheng & &, which according to the language you want to publish different types and different

    Reply
  65. funbsd Posted the following on 2008-10-18 at 2:32 PM.

    They've done some research and found that if the paste it directly into the source code, next to the "behind a character, then return when the visual editor, visual editor would think this is a html tag, and this label is not valid, then behind the content will be deleted. If you paste it directly into the visual editor, the visual editor will paste the code re-layout, add some <br> sort of label, and then from the wp-codebox output, it is certainly not correct. So, can be pasted into the source code, and can not have been considered to be visual editor html tag string. After such a pasting from the source code to return when the visual editor, visual editor, the code will not be re-arranged, but will be special characters "" "& so on into <>"&。 Ordinarily such a should be able to, but I can not put the wp-codebox these special characters change back, or show <>"&, do not know the reason. Please help and give pointers.

    Reply
  66. funbsd Posted the following on 2008-10-18 at 12:49 PM.

    Depressed, ah, toss a half-day, and "and" problem or Gaobu Ding. An encounter "or a" return to where visual editor was cut off, "" behind consequently gone. Unless the release does not modify them, or else come back again revised the Sha Dumo. If directly in the visual editor, paste the code inside, publish them on the all html code. I use javascript, inside has a "numbers may fail at that in the end we supposed to ah? Had not read a half-day behind the commentary, so what's to see to understand a good way to effectively

    Reply
  67. hightflty posted the following on 2008-09-29 at 5:54 PM.

    Fatal error: Cannot redeclare class geshi in / home / content / h / i / g / hightfly / html / blog / wp-content / plugins / wp-codebox / geshi / geshi.php on line 243

    Reply
  68. DaB. Posted the following on 2008-09-18 at 10:20 PM.

    @ kyle:
    I had the same problem: I just comment the line out - it seems to work here.
    Sincerly,
    DaB.

    Reply
  69. Werbeagentur-Wissen Posted the following on 2008-09-16 at 5:30 AM.

    for everyone with problems like EcApS - just open / wp-codebox/geshi/geshi.php, look where the function hsc is defined and outcomment the first escape-array element ("&"). different wp users, different usages ;)

    Reply
  70. midou Posted the following on 2008-09-13 at 12:25 PM.

    I have just insttaled it .. the html code doesn't get colored unfortunately, but it's quite great thank you!

    Reply
  71. eZ Posted the following on 2008-09-11 at 2:32 AM.

    Hi, Is there a way to set the "height" of the codebox? For example, I would like to set the height to 15 lines, and if my code is longer, it just adds a vertical scrollbar.Thanks!

    Reply
  72. Sha Miao posted the following on 2008-06-05 at 2:56 PM.

    "; meant that occur pre label" "Number must be used"; and ";. Originally, the use of pre tag "; and"; it is correctly shown, but with GESHI would not be able resolve correctly. The problem is GESHI the problem, not plug-in problem. But it does hope that by the amendment as far as possible. Be used directly in the pre tag "" can solve this problem, and in the ie67 and ff are correct. But the consequences of which could not be verified xhtml1.0. I think this is viable, but it is not a good thing.

    Reply
    1. bochgoch Posted the following on 2008-06-11 at 12:12 AM.

      Excellent plugin - I need to override some CSS to tidy things up, but excellent - thanks!

      Reply
  73. Ender Xie Posted the following on 2008-05-16 at 10:04 PM.

    I finnaly get it worked in my WP blog.We are supposed to edit the code in "Code" view, not in "Visual", then everything works fine.Nice work, pal.

    Reply
  74. yixia Posted the following on 2008-05-16 at 11:19 AM.

    $ hHead .= "<!-[ if IE]> \ n <style type\"text/css\"> \ n "; $ hHead .=". wp_codebox (overflow-x: auto; overflow-y: hidden; padding-bottom: expression (this.scrollWidth> this.offsetWidth? \ "15px \": 0); width: 100%;) \ n "; $ hHead .=" </ style> \ n <! [endif] -- "";
    This added
    function codebox_header ()
    And delete the css in the / * ie hack * / parts through css validation

    Reply
  75. yixia Posted the following on 2008-05-16 at 9:56 AM.

    Again, if the background settings-writing has been turned on WordPress should correct invalidly nested XHTML automatically
    So, like <? Php will become <? Php one more space, "! - Will become"! - Can not automatically jump to this filter :?:

    Reply
  76. yixia Posted the following on 2008-05-13 at 10:40 PM.

    Reworked a little bit of code, in order to streamline the output html, get rid of unwanted id address or http://www.e-xia.com/2008/05/wp-codebox-122-bug-fix/ but he had no to understand is why the cookie, we should keep it? After the switch is not want to maintain the status? To do a little bit of time to encounter a small problem, really enough to create misunderstandings, so I usually onclick = "javascript: function ()", then in the function where you can directly use this to get the call this function of the object, I have in front of the home page achive list [+] is doing, basically the same as javascript, like html, but this is the wrong call wpcd_toggle_collapse years and finally can only pass this as an argument came in quite depressed, you know why? The last compressed packet inside js seems misplaced folder, and this is also correct, and is interested in it would no longer next time. There you said "n" can not copy did not try out, anyway, with the three examples you give, can successfully copy, maybe I had misunderstood js may also be placed in the wrong relationship.

    Reply
  77. yixia Posted the following on 2008-05-09 at 11:54 PM.

    Do not know why this plugin on my blog, that does not work, in the active plug-in without Baocuo, change the settings did not Baocuo, in the html source file can see the reference to the js and css of the codebox
    I have html editing mode to add <pre ..., you can get in the foreseeable mode, also tried and failed, I also disabled all the plug-in, the same does not work. I directly copy the sample code here, but also useless to know exactly how this plug-in does not play a role in the html source file, what will change?

    Reply
    1. yixia Posted the following on 2008-05-10 at 12:23 AM.

      To find the reasons is because the downloaded version does not correct due to
      http://downloads.wordpress.org/plugin/wp-codebox.zip
      Here to download, and dared not to use Thunder, right download additional reporting a bug: in main.php inside get_settings ( 'home') requested the change get_settings ( 'siteurl'), because of my index.php is not in the installation directory If the words with the home reference to js and css will complain.
      Another bug is the "and" show "and" this do not know if the conflict with other plug-ins tomorrow to continue testing.
      Thank you, to provide that kind of plug-ins

      Reply
      1. yixia Posted the following on 2008-05-11 at 7:30 PM.

        To write a message in front of me have to delete it, thank you, themselves found it too wordy in : oops:
        But today went on the millennium bug, because it is really very much like the plug-in.
        Is mainly copy to clipboard this method, because only in ie the time but also in order to expand, so the increase in the php code inside, if not ie hide the link inside the javascript added that if the show [-] hide this time Link Also, the current view and download regarded the first line of code in front of the spaces removed, and not very comfortable, so the trim is removed, download the regular expression added <pre….> .* \ n (to remove the front of a blank line.
        Fa http://www.e-xia.com/?p=58, if interested, can take a look.
        In addition, I found this written http://www.jeffothy.com/weblog/clipboard-copy/ how firefox achieve copy to clipboard, but as there should be reference to a swf, does not know how to put this address js years, can think of only parameter passing, less comfortable, so it is useless.

        Reply
        1. Eric Posted the following on 2008-05-12 at 9:23 PM.

          Feelings you WPCD support, you do change it WPCD lack. I'm one by one to make the changes you do test and added to the release, in the changlog logs were added to a contribution to the information.
          Also report to you modify your file a bug. Line = "n" when you copy to clipboard no effect.
          "," The problem is in the wordpress editor hooks to cut corners, should be able to be resolved.

          Reply
        2. yixia Posted the following on 2008-05-13 at 5:09 PM.

          Kane did not think you really will be very impressed to say, in fact I never do not have to copy to clipboard there is no good test, I use firefox, the right ie the test does not do well: redface:

          Reply
  78. Michael posted the following on 2008-05-08 at 12:47 AM.

    Very nice plugin, thank you.
    This is another vote to keep the [Copy to Clipboard] [+] visible at all times (with either word wrap or cleverer use of CSS)
    Thanks, I'm finding it very useful.

    Reply
  79. KimHoon Posted the following on 2008-04-19 at 5:37 PM.

    Wonderful plugin! But 1 more thing.
    How can I make word-wrap (no auto scrollbar)?

    Reply
  80. Frank Wang Posted the following on 2008-04-17 at 6:39 PM.

    can't work with wordpress 2.5
    Can not be used under version 2.5 oh ..
    Hope for an early update

    Reply
    1. Eric Posted the following on 2008-05-07 at 9:37 PM.

      Try it again!

      Reply
  81. Becca Posted the following on 2008-03-28 at 2:07 AM.

    When I wrap (without the spaces) around basic html, it breaks and doesn't work.

    Reply
    1. Jeff posted the following on 2008-04-04 at 8:12 PM.

      You need to move the 'copy to clipboard' to the left sign. I use this for SQL scripts. When they are too long (and most are), you can't see the 'copy to clipboard' unless you go to the bottom of the script and then use the scrollbar to scroll to the right. Most users don't even realize it's there as a result.

      Great plugin otherwise.

      Reply
      1. Jeff posted the following on 2008-04-04 at 8:13 PM.

        Oopss .. I meant left "side" obviously. Thx!

        Reply
  82. Chris Posted the following on 2008-03-25 at 11:20 PM.

    Nice plugin but it breaks the Lightbox-2 plugin (http://wordpress.org/extend/plugins/lightbox-2/). If your WP-CODEBOX plugin is enabled at the same time as Lightbox-2, Lightbox-2 doesn 't work (it just shows the images in the browser window, ie the Ajax calls fail).

    FYI ...

    Reply
  83. codefrenzy Posted the following on 2008-03-23 at 2:43 PM.

    Hi there,

    Thanks for an awesome plugin.

    I've got it working by writing my posts in 'code' view in wordpress. However, when I edit the article, it goes back to the 'visual' view on wordpress. When I switch back to the 'code' view, the following happens:

    For php:
    1. Becomes?>
    3. 'Becomes \' and each time I edit the article, another \ (slash) is added

    Do you have any idea why this might be happening or am I doing something wrong?

    Cheers and thanks for the plugin!

    Reply
    1. codefrenzy Posted the following on 2008-03-23 at 2:46 PM.

      Oops! Looks like my comment didn't come through properly. I'll try again.

      1. <? Php disappears
      2.?> Becomes? & Gt; (without the space between & and gt; - I just can't post that in this comment)
      3. 'Becomes \' and each time I edit the article, another \ (slash) is added

      Thanks again :)

      Reply
  84. EcApS posted the following on 2008-03-12 at 2:54 AM.

    Does no work with ">"
    exemple:

    echo aes>> / etc / modules
    echo dm_mod>> / etc / modules
    echo dm_crypt>> / etc / modules

    shown:

    echo aes>> / etc / modules
    echo dm_mod>> / etc / modules
    echo dm_crypt>> / etc / modules

    Reply
    1. Eric Posted the following on 2008-03-12 at 9:47 AM.
      ? View Code BASH
        1
       2
       3
      
        etc / modules echo aes>> / etc / modules
       etc / modules echo dm_mod>> / etc / modules
       / / No problem! 
      Reply
      1. Vladimir Posted the following on 2008-06-02 at 2:56 AM.

        If Prototype or LightBox or ProtoBox or whatever does not work with WP CodeBox, you will have to do the following:
        Open / wp-content/plugins/wp-codebox/js/codebox.js and find these lines:
        function $ (id) (
        return document.getElementById (id);
        )

        Then replace it with
        if ( 'undefined' == typeof $) (
        function $ (id)
        (
        return document.getElementById (id);
        )
        )

        Since Prototype's $ function is extented with respect to CodeBox's one, the code should work fine.
        Hope this helps.

        Reply
        1. MoebiuZ posted the following on 2008-07-07 at 3:40 AM.

          That is not working on IE7

          Reply
        2. Eric Posted the following on 2008-07-07 at 8:53 AM.

          I'am Ie 7, no problem!

          Reply
        3. MoebiuZ posted the following on 2008-07-08 at 3:29 AM.

          I mean, the workaround vladimir posted (and you integrated on wp-codebox). I'm using wp-codebox with lightbox-2 and codebox breaks the lightbox-2 script. On FF works fine.Anyway, I like too much your plugin , it 'the best I have seen on syntax highlighting.

          Reply
        4. Vladimir Posted the following on 2008-06-02 at 3:10 AM.

          Eric, there is one more bug in the code: when creating a download link, you are using htmlspecialchars () function to screen special characters. However, by default, htmspecialchars () assumes iso-8859-1 charset, which is wrong for the most of blogs. So it would be more correct to use wp_specialchars () instead.

          Reply
        5. Ralph posted the following on 2008-06-04 at 9:32 PM.

          I get:
          Warning: Invalid argument supplied for foreach () in / home / xxx / public_html / wp-content / plugins / wp-codebox / geshi / geshi.php on line 2281 Warning: Invalid argument supplied for foreach () in / home / xxx / public_html / wp-content / plugins / wp-codebox / geshi / geshi.php on line 2281 Warning: Invalid argument supplied for foreach () in / home / xxx / public_html / wp-content / plugins / wp-codebox / geshi / geshi . php on line 2281 Warning: Invalid argument supplied for foreach () in / home / xxx / public_html / wp-content / plugins / wp-codebox / geshi / geshi.php on line 2281
          Any ideas?

          Reply
      2. cc posted the following on 2008-05-28 at 12:40 AM.

        Or upstairs to say "" the problem I have found that when the write in the source code model, for example <pre lang="C"> p-> q ... ... if there would be no problem can be immediately released as soon as I cut back to visual mode, the will be converted into <pre lang="C"> p-> q ... ... and then released can only see the error in the form of, and I tried a few other code highlighting plug-in, with an editor, the While the editing shows the p-> q, but no problem after the release, you can see p-> q
        So, should not the editor and I hope the boss to solve is that there is a line number in this column are sometimes inexplicably very wide, including your here are a few examples, should not my browser issues now (I use firefox)

        Reply
        1. cc posted the following on 2008-05-28 at 12:41 AM.

          Take a look at a map posted to you http://i264.photobucket.com/albums/ii169/coffeecat10/code.jpg

          Reply

Leave a reply

  1. You will post the following soon.
    Go ahead and start typing.