"));

Eric @ EricBess WebHome Eric @ EricBess WebHome

胜不骄,败不馁,胸有激雷而面如平湖 - Not arrogance, not defeated Holderness, chest and face a shock such as mine Pinghu

Chinese (Simplified) flagItalian flagKorean flagPortuguese flagEnglish flagGerman flagFrench flagSpanish flagJapanese flagArabic flagRussian flagGreek flagDutch flagBulgarian flagCzech flagCroat flagDanish flagFinnish flagHindi flagPolish flagRumanian flagSwedish flagNorwegian flag
By N2H

WP-CODEBOX Plugin (代码高亮插件) WP-CODEBOX Plugin (code highlighted plug-in)

Author: Eric.Wang Author: Eric.Wang
Plugin URL: http://wordpress.org/extend/plugins/wp-codebox/ Plugin URL: http://wordpress.org/extend/plugins/wp-codebox/
Tags: syntax highlighting, syntax, highlight, code, formatting Tags: syntax highlighting, syntax, highlight, code, formatting
Requires at least: 2.0 Requires at least: 2.0
Tested up to: 2.5.1 Tested up to: 2.5.1
Stable tag: 1.2.3 Stable tag: 1.2.3
Download Download

Donate for this plugin development, Thanks! Donate for this plugin development, Thanks!

== Description == == Description ==

WP-CODEBOX代码高亮插件,支持多种语言、代码下载、复制到剪贴板、代码框收放及后台默认属性设置。 WP-CODEBOX code highlighted plug-in, support multiple languages, code downloaded, copied to the clipboard, code box Shoufang and background default attribute set. 本插件还在持续开发中,欢迎使用及报告bugs. 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. 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. 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. ) 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 == == Basic Usage ==

Wrap code blocks with `<pre lang="LANGUAGE" line="1" file="download.txt" colla=" ">` and `</pre>` Wrap code blocks with `<pre lang="LANGUAGE" line="1" file="download.txt" colla=" ">` and `</ pre>`

Possible Parameters: Possible Parameters:

`LANGUAGE` is a [ GeSHi ] supported language syntax; `LANGUAGE` is a [GeSHi] supported language syntax;
`file` will create a code downloading attribute.; `file` will create a code downloading attribute.;
`line="n"` will hide the single codebox; `line =" n "` will hide the single codebox;
`colla=" /-"` will expand/collapse the codebox. `colla =" /-"` will expand / collapse the codebox.
`line,file,colla` is optional. `line, file, colla` is optional.

== Installation == == 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. 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. 2. Activate the plugin through the 'Plugins' menu in WordPress.
3. Go to Option->Wp-CodeBox set default setting. 3. Go to Option-> Wp-CodeBox set default setting.
4. Create a post/page that contains a code snippet following the [ proper usage syntax ] 4. Create a post / page that contains a code snippet following the [proper usage syntax]

== Frequently Asked Questions == == 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"? 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. Answer: disactivate other Gashi based syntax highlighter plugin first.

== Screenshots == == Screenshots ==

1. PHP, no line numbers. 1. PHP, no line numbers.

 < div id = "foo" > <?php function foo ( ) { echo "Hello World! \\ n" ; } for ( \ $i = 0 ; \ $i < 10 $i    ) { foo ( ) ; } ?> </ div > <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. 2. Java, with line numbers, collapse codebox.

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

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

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

== Usage == == Usage ==

**Example 1: PHP, no line numbers** ** Example 1: PHP, no line numbers **
<pre lang="php"> <pre lang="php">
<div id="foo"> <div id="foo">
<?php <? php
function foo() { function foo () (
echo "Hello World!\\n"; echo "Hello World! \ \ n";
} )
for (\$i = 0; \$i < 10 $i ) { for (\ $ i = 0; \ $ i <10 $ i ) (
foo(); foo ();
} )
?> «>
</div> </ div>
</pre> </ pre>
**Example 2: Java, with line numbers, collapse codebox** ** Example 2: Java, with line numbers, collapse codebox **
<pre lang="java" line="1" colla="-"> <pre lang="java" line="1" colla="-">
public class Hello { public class Hello (
public static void main(String[] args) { public static void main (String [] args) (
System.out.println("Hello World!"); System.out.println ( "Hello World!");
} )
} )
</pre> </ pre>
**Example 3: Ruby, with line numbers starting at 18, code downloading(ruby.txt)** ** Example 3: Ruby, with line numbers starting at 18, code downloading (ruby.txt) **
<pre lang="ruby" line="18" file="ruby.txt"> <pre lang="ruby" line="18" file="ruby.txt">
class Example class Example
def example(arg1) def example (arg1)
return "Hello: " arg1.to_s return "Hello:" arg1.to_s
end
end
</pre> </ pre>

== Supported Languages == == Supported Languages ==

The following languages are supported in the `lang` attribute: 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 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== == Release Notes ==

**1.0** : First internal release; Uses GeSHi v1.0.7.20; ** 1.0 **: First internal release; Uses GeSHi v1.0.7.20;
**1.0.1** : Add View Code AJAX feature; ** 1.0.1 **: Add View Code AJAX feature;
**1.1** : Add simple background configuration for highlighter style/formatting customization; ** 1.1 **: Add simple background configuration for highlighter style / formatting customization;
**1.2** : css tuning and option i18n compatible; ** 1.2 **: css tuning and option i18n compatible;
**1.2.1** : Uses GeSHi v1.0.7.21; ** 1.2.1 **: Uses GeSHi v1.0.7.21;
**1.2.2** : WP 2.5 compatible; ** 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.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. ** 1.2.3 **: Uses GeSHi v1.0.7.22, add the keywords link to API manual option.

== Donate == == Donate ==

== Future Feature== == 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. 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 Star2 Stars3 Stars4 Stars5 Stars ( 7 votes, average: 5 out of 5) (7 votes, average: 5 out of 5)
Loading ... Loading ... Loading ...
-欢迎为本文评级 -- Welcome to this paper rating

相关日志 Related Log

本文读者也关心以下内容: In this paper, readers also concerned about the following:

  • N/A N / A

03月3rd, 2008 03月3 rd, 2008 作者: eric | WordPress | Trackback ? | 46 评论 | Author: eric | WordPress | Trackback? | 46 Comments | Email This Post Print This Post | 3,761 views | 3761 views

Add a Comment Add a Comment

Leave a reply Leave a reply

:mrgreen::|:twisted::arrow:8O:):?8):evil::D:idea::oops::P:roll:;):cry::o:lol::x:(:!::?:

  1. You will post the following soon. You will post the following soon.
    Go ahead and start typing. Go ahead and start typing.
Hide Post Comments Hide Post Comments
  1. 沙渺 posted the following on 2008-06-05 at 2:56 pm. Sha Miao posted the following on 2008-06-05 at 2:56 pm.

    &gt ; 的意思是说pre标签中出现><号必须使用&gt ;和&lt ;。 >; means that the label of a pre> <, must use>; and <;. 本来在pre标签中使用&gt ;和&lt ;是能正确显示的,但加上GESHI之后就不能正确解析。 Originally used in the pre label>; and <; can be displayed properly, but will not be able to add GESHI after properly resolve. 这个问题是GESHI的问题,不是插件的问题。 GESHI this issue is the question, not plug-in problems. 但的确希望作者能尽量修正。 But do hope that the author can be as much as possible. 在pre标签中直接使用><可以解决这个问题,并且在ie67和ff中都正确。 In the direct use of pre tab> <can solve this problem, and in ie67 and ff are in the right. 但造成的后果是不能通过xhtml1.0验证。 However, the consequences can not be xhtml1.0 is verified. 我想这虽然可行,但不是件好事。 I think that although feasible, but not a good thing.

    Reply Reply
    1. bochgoch posted the following on 2008-06-11 at 12:12 am. 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! Excellent plugin - I need to override some CSS to tidy things up, but excellent - thanks!

      Reply Reply
  2. Ender Xie posted the following on 2008-05-16 at 10:04 pm. 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. 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 Reply
  3. yixia posted the following on 2008-05-16 at 11:19 am. 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]-->"; $ 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] -->";
    把这个加到 Add to this
    function codebox_header() function codebox_header ()
    并删掉css中的/*ie hack*/部分来通过css校验 And deleted in the css / * ie hack * / css by some to check

    Reply Reply
  4. yixia posted the following on 2008-05-16 at 9:56 am. yixia posted the following on 2008-05-16 at 9:56 am.

    再来,如果在后台settings-writing中开启了WordPress should correct invalidly nested XHTML automatically Then, if in the background in open settings-writing the WordPress should correct invalidly nested XHTML automatically
    那么像<?php 就会变成< ?php多了一个空格,<!-会变成< !-能不能自动把这个filter跳过去 Then, as <? Php it will become <? Php one more spaces, <! - Will become <! - Can not automatically jump past this filter : »:

    Reply Reply
  5. yixia posted the following on 2008-05-13 at 10:40 pm. yixia posted the following on 2008-05-13 at 10:40 pm.

    重新修改了一点点代码,为了精简输出的html,去掉不需要的id地址还是在http://www.e-xia.com/2008/05/wp-codebox-122-bug-fix/不过不理解的就是为什么要放cookie呢? Re-edit a little code, in order to streamline the export of html, do not need to remove the id address or http://www.e-xia.com/2008/05/wp-codebox-122-bug-fix/ but not Understand is why the cookie to put it » 是不是以后想保持开关的状态? Is not after the switch to maintain the status » 做的时候碰到一点点小问题,真是哭笑不得,平时都是onclick="javascript:function()",然后在function里就可以直接用this来获得调用这个function的object,我首页的achive list前面的[ ]也是这么做的,基本上是一样的javascript,一样的html,但是在wpcd_toggle_collapse里调用this就是不对,最后只能把this当一个参数传进来了,相当郁闷,你知道是为什么吗? Do a little bit of time to encounter problems, is dumbfounding, usually are onclick = "javascript: function ()", then the function can be directly used in this call this function to get the object, my home page in front of the achive list [ ] Is to do so, is essentially the same as the javascript, the same html, but in wpcd_toggle_collapse this is the wrong call in the end only when a parameter to this-come, quite depressing, you know why? » 上次压缩包里面的js好像放错folder了,这次的也改正了,有兴趣的话就再下一次吧。 The last cabinet inside the js seems misplaced folder, this is correct, then the interest on it again next time. 还有你说的"n"不能copy没试出来,反正用你给的3个例子,都能成功copy,可能是我理解有误,也有可能是js放错的关系。 You also said the "n" can not copy did not try out anyway you to use the three examples, can successfully copy, I understand there may be mistaken, may also be misplaced js relations.

    Reply Reply
  6. yixia posted the following on 2008-05-09 at 11:54 pm. yixia posted the following on 2008-05-09 at 11:54 pm.

    不知道为什么这个插件在我的blog上就是不起作用,在active插件时不报错,更改设置也不报错,在html源文件里能看到引用了codebox的js和css Do not know why this plug-in on my blog is not working, when not in active plug-in error, error or change the settings in the html source, quoted codebox to see the js and css
    我在html编辑状态下添加的<pre...,在可见即可得模式下也试过,都失败了,我还禁用了所有插件,同样不起作用。 I edit the html state added <pre ..., in a mode that can also tried, and failed, I also disable all plug-ins, the same does not work. 我直接copy了这里的示例代码,也没用怎样才能确切知道这个插件是不是起作用了呢,在html源文件会有什么变化? I direct a copy of the sample code here, but also useless to know exactly how this is not the role of the plug-in is, in the html source What happens »

    Reply Reply
    1. yixia posted the following on 2008-05-10 at 12:23 am. yixia posted the following on 2008-05-10 at 12:23 am.

      原因找到,是因为下载的版本不正确引起的 To find the reasons for that is because the downloaded version caused by incorrect
      http://downloads.wordpress.org/plugin/wp-codebox.zip http://downloads.wordpress.org/plugin/wp-codebox.zip
      这里下载的,没敢用迅雷,右键直接下载的另外,报告bug一个:在main.php里的get_settings('home')请改成get_settings('siteurl'),因为我的index.php不在安装目录,如果用home的话引用js和css会报错。 Download it here, Mogan with Thunder, the right to download addition, a bug report: main.php in the get_settings ( 'home') to change get_settings ( 'siteurl'), because I have not installed index.php Directory, if we use the words quoted js home and css will error.
      另一个bug是<和>都显示&lt;和&gt;这个不知道是不是和别的插件冲突,明天继续测试。 Another bug is <and> have shown that <and> do not know whether this is not plug-ins and other conflicts, tomorrow to continue testing.
      谢谢提供那么好的插件 Thank you so good to provide plug-in

      Reply Reply
      1. yixia posted the following on 2008-05-11 at 7:30 pm. yixia posted the following on 2008-05-11 at 7:30 pm.

        把我前面写得留言都删掉吧,谢谢,自己都觉得太罗嗦了 I write the messages are deleted from the front of it, thank you, too find themselves the Luosuo : oops: 不过今天又继续抓虫,因为真的很喜欢这个插件。 But today it continues to grasp insects, because really like this plug-in.
        主要是copy to clipboard这个方法,因为只能在ie而且是在expand的时候才能用,所以在php代码里面加了如果不是ie隐藏这个链接,在javascript里面加了如果显示[-]的时候隐藏这个链接还有,现在的view和download都把代码第一行最前面的空格去掉了,不是很舒服,所以把trim都去掉了,download的正则表达式加了<pre....>.*\n(来去掉最前面的一个空行。 Mainly copy to clipboard this approach, because only in ie and is used to expand the time, so in php code inside the increase, if not hide the link ie, the javascript inside and if the show [-] hide this time Links have now put the view and download the first line of code removed from the top of the box, it is not very comfortable, so all the trim removed, download the regular expressions are added <pre ....> .* \ n (to remove the front of an empty line.
        发在http://www.e-xia.com/?p=58,如果有兴趣的话可以看一下。 In the http://www.e-xia.com/?p=58, if interested can look at it.
        另外我找到了http://www.jeffothy.com/weblog/clipboard-copy/这个写了如何在firefox下实现copy to clipboard,不过因为当中要引用了一个swf,不知道怎么把这个的地址放到js里,能想到的只能是参数传递,不太舒服,所以也就没有用了。 In addition, I found this http://www.jeffothy.com/weblog/clipboard-copy/ wrote in firefox how to achieve copy to clipboard, but because of them to use a swf, do not know how to put this address js, can think of only passing parameters, is not comfortable, so there will be no spent.

        Reply Reply
        1. eric posted the following on 2008-05-12 at 9:23 pm. eric posted the following on 2008-05-12 at 9:23 pm.

          感想您对WPCD的支持, 你所做的修改正是WPCD所欠缺的。 WPCD your thoughts on the support of the changes made to you is WPCD lack. 我正在逐个把你做的修改做测试并加到发布版,在changlog日志中加上了贡献人信息。 I was the one by one in your changes do add testing and release, in changlog logs has contributed to people with information.
          同时也向你报告你的修改文件的一个bug. line="n" 时copy to clipboard无作用。 At the same time you have to report changes to the document a bug. Line = "n" when the copy to clipboard no role.
          &lt,&gt问题是wordpress editor hooks 在捣鬼,应该是可以解决的。 <,> is wordpress editor hooks in Daogui, should be able to solve.

          Reply Reply
          1. yixia posted the following on 2008-05-13 at 5:09 pm. yixia posted the following on 2008-05-13 at 5:09 pm.

            没想到你真的会看哦,很感动的说,其实我从来都不用copy to clipboard也就没有好好测试,我用firefox的,对ie的测试做得不好:redface: Did not expect you will really Kano, very touched by that, in fact, I never do not have to copy to clipboard there is no good test, I use firefox, ie on the test not done well: redface:

            Reply Reply
  7. Michael posted the following on 2008-05-08 at 12:47 am. Michael posted the following on 2008-05-08 at 12:47 am.

    Very nice plugin, thank you. 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) 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. Thanks, I'm finding it very useful.

    Reply Reply
  8. KimHoon posted the following on 2008-04-19 at 5:37 pm. KimHoon posted the following on 2008-04-19 at 5:37 pm.

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

    Reply Reply
  9. Frank Wang posted the following on 2008-04-17 at 6:39 pm. Frank Wang posted the following on 2008-04-17 at 6:39 pm.

    can't work with wordpress 2.5 can't work with wordpress 2.5
    不能在2.5版下使用哦.. Version 2.5 can not be used, oh ..
    希望早日更新 Hope to update

    Reply Reply
    1. eric posted the following on 2008-05-07 at 9:37 pm. eric posted the following on 2008-05-07 at 9:37 pm.

      Try it again! Try it again!

      Reply Reply
  10. Becca posted the following on 2008-03-28 at 2:07 am. 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. When I wrap (without the spaces) around basic html, it breaks and doesn't work.

    Reply Reply
    1. Jeff posted the following on 2008-04-04 at 8:12 pm. 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. 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. Great plugin otherwise.

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

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

        Reply Reply
  11. Chris posted the following on 2008-03-25 at 11:20 pm. 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). 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 ... FYI ...

    Reply Reply
  12. codefrenzy posted the following on 2008-03-23 at 2:43 pm. codefrenzy posted the following on 2008-03-23 at 2:43 pm.

    Hi there, Hi there,

    Thanks for an awesome plugin. 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: 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: For php:
    1. becomes ?> 1. Becomes?>
    3. ' becomes \' and each time I edit the article, another \ (slash) is added 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? Do you have any idea why this might be happening or am I doing something wrong?

    Cheers and thanks for the plugin! Cheers and thanks for the plugin!

    Reply Reply
    1. codefrenzy posted the following on 2008-03-23 at 2:46 pm. 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. Oops! Looks like my comment didn't come through properly. I'll try again.

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

      Thanks again Thanks again :)

      Reply Reply
  13. EcApS posted the following on 2008-03-12 at 2:54 am. EcApS posted the following on 2008-03-12 at 2:54 am.

    Does no work with ">" Does no work with ">"
    exemple:

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

    shown:

    echo aes &gt;&gt; /etc/modules echo aes>> / etc / modules
    echo dm_mod &gt;&gt; /etc/modules echo dm_mod>> / etc / modules
    echo dm_crypt &gt;&gt; /etc/modules echo dm_crypt>> / etc / modules

    Reply Reply
    1. eric posted the following on 2008-03-12 at 9:47 am. eric posted the following on 2008-03-12 at 9:47 am.
       1 2 3 1 2 3 
       echo aes >> / etc / modules echo dm_mod >> / etc / modules // no problem ! echo aes>> / etc / modules echo dm_mod>> / etc / modules / / no problem! 
      Reply Reply
      1. Vladimir posted the following on 2008-06-02 at 2:56 am. 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: 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: Open / wp-content/plugins/wp-codebox/js/codebox.js and find these lines:
        function $(id) { function $ (id) (
        return document.getElementById(id); return document.getElementById (id);
        } )

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

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

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

          That is not working on IE7 That is not working on IE7

          Reply Reply
          1. eric posted the following on 2008-07-07 at 8:53 am. eric posted the following on 2008-07-07 at 8:53 am.

            I'am Ie 7, no problem! I'am Ie 7, no problem!

            Reply Reply
            1. MoebiuZ posted the following on 2008-07-08 at 3:29 am. 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. 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 Reply
        2. Vladimir posted the following on 2008-06-02 at 3:10 am. 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. 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 Reply
          1. Ralph poste