|
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.
"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.
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.
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.
== 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.







Brother, help me look at it? Why is my display is not normal!
ReplyCode 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
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:
Replyhttp://www.jhdxr.com/blog/html/tech/fix-wp-codebox-show-bug-for-ie6-and-ie7.html
Boss hopes to solve this problem! Too painful!
ReplyIn the same article, I put a 2 after the code that displays the results are not normal. . . .
ReplyChrome Under
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?
ReplyThis 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.
ReplyI 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
ReplyHalo forget labels. Is because the document does not join the footer
Replythanks, very useful.
ReplyThx for sharing
ReplyThank you very much problem-solving!
ReplyHello, use this plug-in is very good, but now has a minor defects,
Replyhttp://www.clang.cn/blog/?p=603
The line side effects of some deformation of the number of rows that can help analyze the reason?
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. line_numbers pre (padding-left: 10px;)
ReplyChanged to:. Line_numbers pre (padding: 0px;)
I've added a custom CSS so that CodeBox doesn't go too big for large codes:
. wp_codebox (
Replymax-height: 800px;
overflow: auto! important;
)
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,
ReplyDiego
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
ReplyAmount. . . Tip a few minutes ago with the new. . Solve the problem. .
Replyvery nice thanks
Replytanx for this post: di love this web
Replyoh great features ..
ReplyHow to removal language type title next to 'view code' on functionality bar?
ReplyAsk
file = "Download ruby.txt": Create a downloadable save the name of the
This document should be placed on ruby.txt Which path? ?
Reply//全部选中全部取消处理
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
Replythanks for this poste
Replyvery good! tanks;
Replyvery helped me!
Eric,
ReplyVery 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 ...
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 ..
ReplyVery nice plug-in, why not updated?
ReplyHi Eric!
I created the Hungarian translation of your script.
ReplyDownload link: http://vrnagy.ath.cx/stuff/wp-codebox-hu_HU.mo
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.
Replymain.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"
ReplyFigured 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
Replyi 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?
Replyi had a look at the code but couldn't find a solution
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.
ReplyI 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.
ReplyHi, 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?
ReplyOn FF works fine.Anyway, I like too much your plugin, it 'the best I have seen on syntax highlighting.
Replyrn This article comes from: www.EricBess.com Detailed Source Reference: http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/
You need to add "text-align: left;" to ". Wp_codebox pre" otherwise in some circumstances all of the code will be centered.
ReplyI 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!
Replywow ... i'm such an idiot XD
it's:
and atm. i'm using <\ / pre>
Replyhell ... ..
i give up, just del this ....
ReplyWorks great, thank you
ReplyVery supportive! Doing great.
ReplyThe 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?
ReplyHow can bright html statement ah?
Replynot working with wp 2.7
ReplyThis blog is working in WP 2.7
ReplyI 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.
Replylang = "csharp"
Replythank you, I really need it.

ReplyIs 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!
ReplyHalo ~ ~ 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
Reply↓ ↓ this option, I tried, whether or not checked, failed to see any changes. h ttp: / / test.35sun.com/temp/wp-codebox-2.gif
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.
ReplyHai,
Any ideas how?
ReplyOn the wordpress plugins page, it says you get a button in your TinyMCE editor.
Looks like I don't get this button
Wordpress version: 2.7
Thanks,
Me
File download problem after install 1.3.31, fixed by alter line 38 in wp-codebox.php to,
Replyif (preg_match ( "/ \ s * <pre(.*file=[\"']".$download."[\"'])[^> ]+>(.*)< \ / pre> \ s * / siU ", $ content, $ match)) (
If anyone has the same problem, try this fix.
It seems, that there's a Bug! ^ ^
ReplyI 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; ">
Yes, the top one
ReplyThanks ..
ReplyHi,

ReplyMe, 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
Hi,
ReplyI 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
Hi Eric,
Replynice 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.
Hello.
ReplyI 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.
My codes are not spacing out
ReplyWhy is this?
Hello, after installing plugin, unintentionally blog to export data out there have been some mistakes, as
ReplyWarning: 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
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 ...
ReplyHello, 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:
Replyfile = "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.
Changed, there is no change version number, you re-download and install what,
ReplyIn ff and opera-ri can not be displayed "Copy to Clipboard"
ReplyCongratulations on your correct answers, you can participate in to improve.
ReplyWell, the problem was originally option.php
ReplyAfter 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
ReplyI 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?
Replyfunction 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
);
)
Just had the following error while clicking on ruby.txt:
Replyhttp://www.ericbess.com/ericblog/wp-content/plugins/wp-codebox/wp-codebox.php?p=134&download=ruby.txt
fixed
ReplyHi,

ReplyThanks 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 ...
fixed in new version.
ReplyHave 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.
ReplyFinally 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
ReplyThey'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.
ReplyDepressed, 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
ReplyFatal 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@ kyle:
ReplyI had the same problem: I just comment the line out - it seems to work here.
Sincerly,
DaB.
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
ReplyI have just insttaled it .. the html code doesn't get colored unfortunately, but it's quite great thank you!
ReplyHi, 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"; 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.
ReplyExcellent plugin - I need to override some CSS to tidy things up, but excellent - thanks!
ReplyI 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$ 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] -- "";
ReplyThis added
function codebox_header ()
And delete the css in the / * ie hack * / parts through css validation
Again, if the background settings-writing has been turned on WordPress should correct invalidly nested XHTML automatically
ReplySo, like <? Php will become <? Php one more space, "! - Will become"! - Can not automatically jump to this filter
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.
ReplyDo 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
ReplyI 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?
To find the reasons is because the downloaded version does not correct due to
Replyhttp://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
To write a message in front of me have to delete it, thank you, themselves found it too wordy in
ReplyBut 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.
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.
ReplyAlso 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.
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:
ReplyVery nice plugin, thank you.
ReplyThis 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.
Wonderful plugin! But 1 more thing.
ReplyHow can I make word-wrap (no auto scrollbar)?
can't work with wordpress 2.5
ReplyCan not be used under version 2.5 oh ..
Hope for an early update
Try it again!
ReplyWhen I wrap (without the spaces) around basic html, it breaks and doesn't work.
ReplyYou 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.
ReplyOopss .. I meant left "side" obviously. Thx!
ReplyNice 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 ...
ReplyHi 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!
ReplyOops! 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
ReplyDoes no work with ">"
exemple:
shown:
ReplyIf 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.
ReplyHope this helps.
That is not working on IE7
ReplyI'am Ie 7, no problem!
ReplyI 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.
ReplyEric, 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.
ReplyI get:
ReplyWarning: 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?
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
ReplySo, 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)
Take a look at a map posted to you http://i264.photobucket.com/albums/ii169/coffeecat10/code.jpg
Reply