Code Snippet
First off, Code Snippet 2.0 is not mine. I didn’t make it, I won’t take any credit for it. The original creator was the person who hosted a blog at http://blog.enargi.com/codesnippet/ (which no longer works and is apparently down for good; however, it is GPL.). I came across the plugin awhile ago and and I’ve decided that I couldn’t just let it be lost to the ages and I’ll let it live here as long as I’m able.
Straight from the readme.txt, Code Snippet 2.0 is is a WordPress plugin for displaying code with highlighting in blog posts. The plugin uses GeSHi syntax highlighter engine. I’ve seen others, but they’ve gone the way of the dodo and most of them didn’t have as many supported languages at Code Snippet 2.0. I also think that Code Snippet does a better job than the Code Auto-escape plugin.
Install
- Download the plugin here. Or potentially, an older version from here.
- Copy archive to wp-content/plugins directory
- Extract the zip file
- When extracted properly you should have following directory structure: /wp-content/plugins/codesnippet
- Since I’ve not tore through the code, the plugin will probably not work if extracted/copied in diffrenet directory.
- Enable the Plugin
Usage
The original author recommended always wrapping your code in a <pre> tag; however, I’ve found that you generally don’t need to. To use it, simply surround your code with as such and specify your language type:
int main(int argc, char** argv) { return 0; }
[/code]
And you get this:
Or you could do something like:
<?php
echo “Hello World!”;
?>
[/code]
echo "Hello World!";
?>
If you find a bug in it, drop a comment or an email to wyatt dot neal at gmail and I’ll try my best to fix it for you.
Also, if you have find that your language isn’t here and you write your own GeSHi hack to work with it, let me know and I’ll drop a link on this page so that people can find you. Heck, I’ll even put it in the archive so the world can share it if you want. Here’s the list of supported languages:
Collapse Language List
- actionscript-french
- actionscript
- ada
- apache
- applescript
- asm
- asp
- bash
- caddcl
- cadlisp
- c_mac
- c
- cpp
- csharp
- css-gen
- css
- delphi
- diff
- div
- dos
- d
- eiffel
- freebasic
- gml
- html4strict
- ini
- inno
- java
- javascript
- lisp
- lua
- matlab
- mpasm
- nsis
- objc
- oobas
- oracle8
- pascal
- perl
- php-brief
- php
- python
- qbasic
- sdlbasic
- smarty
- sql
- vbnet
- vb
- vhdl
- visualfoxpro
- xml

Jeremy Lavergne says:
I’ve not looked yet, but does this plugin just use the highlight files from VI or the likes? It would seem that it’d be easily updated then by adding new files from VI or what have you.
16 March 2007, 10:21 amWyatt says:
I’m not really sure, Jeremy. Looking at the code it appears that it’s really just an assembly of everyone else’s GeSHi PHP translators with some tweaked wrapping to make it work correctly in WordPress. I just can’t remember if VI uses the GeSHi stuff or not.
16 March 2007, 12:40 pmJR says:
You should mention adding the codesnippet/codesnippet.css link to the header and defining the codesnip-container class in the installation instructions.
19 March 2007, 1:51 pmWyatt says:
The following has been added to the readme.txt thanks to JR:
After looking more carefully at the code, I see that it adds the following action to wp_head:
echo ‘<link rel="stylesheet" href="’.get_option(’siteurl’).$this->pluginLocation.‘/codesnippet.css" type="text/css" />’, "\n";
echo ‘<style type="text/css">’, "\n";
echo ‘.codesnip-container {‘.$this->getStyle().‘}’, "\n";
echo ‘</style>’, "\n";
}
That automatically adds a link to the provided css file and a separate style for the codesnip container (as defined in the plugin config, I would assume). I don’t use wp_head in my custom theme, so that’s why it didn’t link to it automatically. You might want to include a small note for custom theme users to link to the css and define a style for codesnip-container.
Details are in the readme.txt. Thanks again JR.
19 March 2007, 9:44 pmBladimir Favio Yapura - Blog » Blog Archive » Nuevo PlugIn says:
[...] PlugIn 0 Comments Acabo de instalar un nuevo plugin para mi blog, se trata de Code Snippet, para que sirve?? para escribir esto por [...]
23 March 2007, 5:13 amtakn says:
thanks for keeping this great plugin alive.
25 March 2007, 3:52 pmLøb og fiks PHP! | Mattias’ virtuelle hukommelse says:
[...] Bemærk i øvrigt lige det super seje plugin jeg har installeret, der sørger for at farve PHP-koden efter bedste principper Plugin’et kan for de interesserede downloades herfra: http://blog.hackerforhire.org/2007/03/16/code-snippet-20/ [...]
5 April 2007, 11:36 amLustiges Computieren » Blog Archive » Codeschnipsel says:
[...] verwendet. Leider gibt’s die Seite des Authors nicht mehr, wobei sich dieser nette Herr freundlicherweise der Pflege des auf GPL basierenden Codes angenommen [...]
17 April 2007, 10:43 amEric and Jessica » Blog Archive » Small fixes says:
[...] and to get those fancy code blocks to show up I installed the Code Snippet 2.0 plug-in and disabled my WYSIWYG editor. We’ll see how that [...]
5 May 2007, 5:03 pmgad says:
thx for this wonderful plugin.
9 May 2007, 5:40 pmThe Historical Webber » Blog Archive » How does the yahoo/flash map work… says:
[...] thanks to CodeSnippet for providing a way to show code. This was the 5th one I tried that finally [...]
11 May 2007, 1:09 pmBernie SR says:
Would this plugin dispaly the code in my posts , I have inadvertently added some code from a widget to my blog. Every time that I post the widget is enbedded in each message. Obviuosly I want to renmove the offending code
4 June 2007, 7:22 pmWyatt says:
Bernie, I don’t think that it would do this; however, I’m not very familiar with the new WP-widget system. This plugin should only display code that you have wrapped in a code block.
7 June 2007, 9:12 pmJohn says:
Great plugin. This saves a lot of time.
Im having trouble displaying the line numbers. I checked the option and it displays a grey bullet point in front of each line. Any tips?
22 July 2007, 7:58 amJohn says:
No worries now. It seems that my themes CSS was overiding the list style.
22 July 2007, 3:05 pmWyatt says:
Glad to heard that you got it fixed before I had a chance to look at it John.
24 July 2007, 1:05 pmIn a galaxy far far away… » Blog Archive » Enargi Code Snippet Plugin says:
[...] was able to download the plugin here after finding the original host was [...]
30 July 2007, 2:39 pmLexxy`s Blog » Blog Archive » Code Snippet says:
[...] hier Code Snippet [...]
26 August 2007, 4:10 pmThe Double Zero » Blog Archive » Codesnippet and firestats incompatability - finale says:
[...] Go grab the code snippet plugin and if you like codesnippet copy this image, put it on your sidebar and show your appreciation! [...]
26 August 2007, 10:29 pmמחשבות, מחשבים, ושאר דברי בלע » Blog Archive » CodeSnippet says:
[...] לי לגלות פלאגינים מעניינים ושימושיים. פלאגין כזה הוא Code-Snippet 2.0, שמאפשר שתילת קוד בפוסטים וצביעה שלהם בהתאם, ממש כמו [...]
27 August 2007, 1:33 pmseramar says:
Hey recently I posted a snippet in a post and after a reader tried to paste the code into their blog I found a new problem -
The codesnippet plugin converts ” ” to curly quotes… and therefore are not always/universally recognized by web browsers or processed correctly.
To view the specific example: http://www.thedoublezero.org/comment-exchange-movement
When a reader tried pasting it into their sidebar it wouldn’t work. I asked about their theme and tried it out and found the problem to be the quotes. Any idea on how to override this OR to fix it permanantly?
Thanks, man – so far your responsiveness has been great!
Seramar
28 August 2007, 8:43 pmseramar says:
found the fix… it appears that the offense is contained to lang=”html4strict”
To fix it go to the html4strict.php file contained in wp-content/plugins/codesnippet/lib/geshi/html3strict.php
Line 57 will read:
Delete everything between the parenthesis so it looks like
Should fix your issues.
Thanks anyway – glad if I was of any help!
28 August 2007, 9:02 pmseramar says:
bah! That is kinda messed up… codesnippet didn’t work right, but anyway you should get the idea. I will also submit the fix to the GeSHi folks and hope they take care of it.
-Seramar
28 August 2007, 9:03 pmWyatt says:
Alright everyone, I’ve tagged out a 2.1 version of CodeSnippet, which is the download link on this page. I’m going to be upgrading the GeSHi to the latest and greatest as well as adding in some new functionality.
This is going to be living at http://blog.hackerforhire.org/code-snippet/ from now on and I’m probably not going to be monitoring this post
Thanks for all the feedback!
28 August 2007, 10:41 pmWyatt says:
I’m testing out the newest version to see how the new languages will work. Looks good to me
Ruby test
class Greeter
def initialize(name)
@name = name.capitalize
end
def salute
puts "Hello #{@name}!"
end
end
# Create a new object
g = Greeter.new("world")
# Output "Hello World!"
g.salute
Jason says:
echo ‘pluginLocation.‘/codesnippet.css" type="text/css" />’, “\n“;
echo ‘’, “\n“;
echo ‘.codesnip-container {’.$this->getStyle().‘}’, “\n“;
echo ‘’, “\n“;
}
Wyatt says:
Yeah, sorry Jason. Line numbers and file-reading aren’t in the code yet. I have to find a good way to secure it so someone couldn’t say file=”wp-config.php” lines=”1-20″
It’s coming, I promise
31 August 2007, 10:05 pmSin Ideas » Internet Explorer y max-height says:
[...] aqui, todo culpa de IE y [sarcasmo]su grandioso soporte de los estándares[/sarcasmo]. Al poner el plugin para resaltar la sintaxis del código que escriba, quize que si el código era muy grande lo [...]
1 September 2007, 6:47 amWyatt says:
Alright, comments on this post are closed. From now on, use the main-page for this.
http://blog.hackerforhire.org/code-snippet/
1 September 2007, 10:23 amChronicles of the Hidden Truth » Installing Code Snippet 2.0 plugin says:
[...] As I expect to be able to publish some articles with source code, I was wondering about the availability of Worpress plugins dealing with syntax highlighting. Fortunately I was not alone on that, and I download this nice plugin CodeSnippet [...]
4 September 2007, 6:48 pmMike Saeger says:
I can’t get this VB code to display properly:
If Request.QueryString(“mi”) “” Then
ddmi.SelectedIndex = ddmi.Items.IndexOf(ddmi.Items.FindByValue(mi))
btnSearchClick() ‘
End If
The (less than) and (greater than) signs always show up as < and > instead of the actual symbols.
5 September 2007, 10:16 amMike Saeger says:
My previous comment is confusing. What I should have said is that the (greater than) sign shows up as (ampersand gt
and the (less than ) sign shows up as (ampersand lt;)
5 September 2007, 10:18 amWyatt says:
ddmi.SelectedIndex = ddmi.Items.IndexOf(ddmi.Items.FindByValue(mi))
btnSearchClick()
End If
Looks like it works to me. Remember to wrap your code with the [ code ] block (minus the spaces).
Now I will admit that if you copy and past this, it’s probably going to give you some weird “quote” signs because of how the GeSHi engine works. If you have a complaint about that, you’ll need to take it up with them
5 September 2007, 1:43 pmNatrium says:
I just had the same problem with > and into >
And the codesnippet-plugin doesn’t seem to recognize the >
Solution: use the code-editor in stead of the visual-editor of Wordpress.
6 September 2007, 6:45 amNatrium says:
second try
I just had the same problem with > and into >
And the codesnippet-plugin doesn’t seem to recognize the >
Solution: use the code-editor in stead of the visual-editor of Wordpress.
6 September 2007, 6:46 amMike Saeger says:
I even turned off the Visual Editor in my Profile and as soon as I hit SAVE, or SAVE and Continue the < > signs disappear. It must be in the version of WordpressMU I’m running (wordpress-mu-1.1.1). If I use the Visual Editor then the < > are replaced by their ampersand lt/gt semicolon html names.
6 September 2007, 10:49 amWyatt says:
Natrium makes a very valid point. I never used the Advanced/Visual editors to write code blocks, generally because they caused more headache than anything.
Mike, are you sure you are wrapping things in the
[code lang="vb"][/code] tags? If you aren’t, I know even the raw/standard editor in WordPress will remove <>. I think that it looks like an unclosed tag to WordPress.
I’ll see what I can do to get > and < found in the parsing.
6 September 2007, 5:45 pmCrusty Blog » Blog Archive » Test GeSHi says:
[...] a couple different syntax highlighters for Wordpress. The one I’ve settled on is CodeSnippet. This plugin allows syntax highlighting by using code blocks. [...]
27 September 2007, 7:34 amPets Information Directory » Eulogy pet says:
[...] eulogy pet footer sore for you reassurance sturdy couchs. Some of you are within useing what the eulogy pet is intelligent [...]
3 October 2007, 1:22 amctcodre’s blog » Blog Archive » code snippet says:
[...] tag-ului . ceea ce am gasit astazi este un plugin care face cam aceleasi lucruri. look here for Code Snippet. Si un mic test sa vedem daca merge: [code lang=”java”] public class HelloWorld { [...]
3 October 2007, 12:38 pmMB.MathemaTeX » Archive du blog » Code Snippet says:
[...] Site officiel : http://blog.hackerforhire.org/code-snippet/ [...]
21 October 2007, 7:22 amMacScripter: Introduction to Database Events at The Joy of Scripting says:
[...] 27.10.2007: Or just have a look at the library code right here: (Test of the Code Snippet plugin for [...]
27 October 2007, 3:38 pmBanan says:
If someone will have trouble with bash language, just download the original geshi.php file form http://qbnz.com/highlighter/ and replace it with the one in the code snippet package. It work’s fine for me
12 November 2007, 12:17 pmWyatt says:
Testing update to the GeSHi stuff. This fixes the bash issue referenced above.
echo "This is a terrible test example";
FILE=`which yes`;
for i in `seq 1 91`; do echo $i | $FILE; done
Rob’s geeky discoveries Blog » Flash getURL clickthrough workaround for MySpace says:
[...] You’ll have to manually swap those curly brackets for standard double quotes as Code Snippet doesn’t like this [...]
3 December 2007, 11:42 amCreate Digital Media » phpBB to bbPress Migration Process - Step 1, Remove Spam Users says:
[...] aside: The lovely code highlighting in this post was provided with the Code Snippet Wordpress plugin, which I installed because WP was misinterpreting my [...]
5 December 2007, 1:08 ammuttznutz says:
Hi,
Excellent plugin, and thanks for keeping it running.
I think I’ve found a bit of an “undocumented feature”.
My problem was that putting code into comments didn’t load the .css file.
I’m not a php wizz, but I think it may be because of the pageHasCode test in codePresentInPosts().
So if there’s no code in the original post, CodeSnippet won’t detect it in the related comments.
Nothing I can’t work around, but it would be useful if you could confirm.
Thanks — Andy
5 December 2007, 8:43 amWyatt says:
Hi Andy,
You’re right, CodeSnippet will not highlight code in comments if there isn’t a previous [code] block in the post. I don't have a quick workaround for this other than putting in a blank [code] block for people that don't want to touch the code; however, that looks absolutely stupid. I'm not sure what impact pushing everything through the filter; however, I'll take a look at it.
10 December 2007, 11:33 pmWyatt says:
Rob mentioned he was having an issue with the following block of code. It seems to be a problem with the GeSHi ‘html’ parser. My recommendation is to use the ‘php’ one instead as it seems to catch the flakeyness.
HTML Version:
PHP Version with some cleanups:
table.adiflmw { width: 396px; height: 250px; border-width: 0px 0px 0px 0px; border-spacing: 0px; border-style: none none none none; border-color: white white white white; background-color: white; }
table.adiflmw td { border-width: 0px 0px 0px 0px; padding: 0px 0px 0px 0px; border-style: none none none none; border-color: white white white white; background-color: white; -moz-border-radius: 0px 0px 0px 0px; }
a:link, a:active, a:visited { color:#ffffff; }
</style>
<table class="adiflmw">
<tr>
<td valign="top" align="left">
<span>
<a href="http://adidaswidgets.glueserv.co.uk/v9/" id="adiCt1" rel="nofollow"><img src="http://adidaswidgets.glueserv.co.uk/v9/adiflm396×38.jpg" border="none" /></a><br />
<object type="application/x-shockwave-flash" allowScriptAccess="never" allowNetworking="internal" height="130 name=" width="396" align="middle" data="http://adidaswidgets.glueserv.co.uk/v9/Clock02.swf?spURL=http://www.justgiving.com/gorillarob&getCountDownLink=http://adidaswidgets.glueserv.co.uk/v9/">
<param name="allowScriptAccess" value="never" />
<param name="allowNetworking" value="internal" />
<param name="movie" value="http://adidaswidgets.glueserv.co.uk/v9/Clock02.swf?spURL=http://www.justgiving.com/gorillarob&getCountDownLink=http://adidaswidgets.glueserv.co.uk/v9/" />
<param name="quality" value="high" />
<param name="wmode" value="opaque" />
<param name="bgcolor" value="#ffffff" />
</object>
<br />
<a href="http://www.justgiving.com/gorillarob" id="adiCt2" rel="nofollow"><img src="http://adidaswidgets.glueserv.co.uk/v9/adiflm396×82.jpg" border = "none" /></a></span>
</td>
</tr>
</table>
I think it has to do with the weird characters that are being used … probably a GeSHi bug since the regex is matching it on my end.
11 December 2007, 12:10 amDenkZEIT » Blog Archive » Neues Wordpress-plugin installiert: CodeHighlighter says:
[...] CodeHighlighter bin ich fndig geworden. Alternativ hatte ich mir noch Code Snippet angesehen. Letzteres war mir aber zu Astronautisch mit Zeug, das ich nicht brauche. Z.B. einer [...]
22 December 2007, 2:17 pm智熏 says:
[code lang="php"[
[/code]
14 January 2008, 7:10 am智熏 says:
oops -.-;;
14 January 2008, 7:13 amWyatt says:
That’s why I added in a preview for this beast
16 January 2008, 9:41 pmjutirain says:
Thanks for the great plugin!
However, does the plugin provide indenting feature?
Also, I found that the plugin doesn’t work for php…
The code inside [?php & ?] will be eat up by wordpress. (using brackets deliberately to prevent php being eaten)
P.S. I’m using wordpress 2.0.2
19 January 2008, 7:28 amWyatt says:
@jutirain
> However, does the plugin provide indenting feature?
Unfortunately, it does not. I have the plan to read from a file on
the back burner, but it hasn’t been implemented in anything less than
my local SVN copy.
> Also, I found that the plugin doesn’t work for php…
> The code inside [?php & ?] will be eat up by wordpress. (using brackets
> deliberately to prevent php being eaten)
echo "this is a PHP test.";
$tmp = array();
for ($i = 0; $i < 25; $i++) {
$tmp["myspot" . $i] = $i;
}
?>
#test some invalid php code
<?php
[?php & ?] ; //this should be invalid php code
//intentionally don’t close the bracket
Looks like it works here and I haven’t noticed any issues with
19 January 2008, 3:26 pmwordpress 2.0.2, but I’d recommend upgrading just for the security
fixes.
Code Snippet_Wordpress plugin says:
[...] I’m attempting to keep his wonderful contribution available so I’ve given it a home at http://blog.hackerforhire.org/code-snippet/. If you find any bugs with it, let me know and I will do my best to resovle [...]
23 January 2008, 12:03 amTechnoTinkering » Blog Archive » Finally, close but not perfect says:
[...] http://blog.hackerforhire.org/code-snippet/ [...]
11 March 2008, 11:45 pmWp Wordpress » Blog Archive » Code Snippet says:
[...] I’m attempting to keep his wonderful contribution available so I’ve given it a home at http://blog.hackerforhire.org/code-snippet/. If you find any bugs with it, let me know and I will do my best to resovle [...]
22 March 2008, 3:38 pmLee says:
I also have the same issue jutirain has. WP eats the code.
25 April 2008, 7:49 pmWyatt says:
function foo($bar) {
$i = 0;
for($i = 0; $i < count($bar); $i++) {
print($bar[$i]);
}
}
?>
<?php
function foo($bar) {
$i = 0;
for($i = 0; $i < count($bar); $i++) {
print($bar[$i]);
}
}
?>
[/code ] minus the space so it will print out properly
chaozz@work » Blog Archive » My flatfile database system (3) says:
[...] snippets in this Wordpress post I use a plugin called CodeSnippet, which can be downloaded here: http://blog.hackerforhire.org/code-snippet/ Category: Development | Comment (RSS) [...]
27 April 2008, 3:17 amTeam Programming Dragon.編程龍 » Blog Archive » WordPress Plugin for Code Display says:
[...] 當中的 display,應該是目前看過 plugin 數最多的一個需求了,諸如 Code Markup, Code Snippet, CodeHighlight, iG: Syntax Hiliter, Preserve Code Formatting [...]
28 May 2008, 9:53 amCiekawe pluginy do Wordpressa | Spam Factory says:
[...] Code snippet - plugin do wyświetlania kodu (np. php – można zdefiniować w jakim języku kod wklejamy) na naszym blogu. Poniżej przykład z php if(isset($_GET[‘c’])) {$c = $_GET[‘c’]; if($userInfo = checkValidationCode($c)){ /*Check validation code*/ $email = $userInfo[‘user_email’]; } else $error = “The verification code is not valid.”; } else $error = “The verification code is not valid.”; [...]
30 June 2008, 8:18 amPixelsetzer » » Code Snippet Plugin says:
[...] hinzufügen. Wer das Plugin haben möchte, kann mal die Seite des Herstellers besuchen: klick Da ich selber erst seit kurzen mit Wordpress arbeite, werde wohl noch mehr Artikel zum Thema [...]
21 July 2008, 5:53 amharbrigging says:
Someone submit this to programminghelp.com forum site please! Thanks!!!
25 July 2008, 3:31 pmAfficher du code dans WordPress via une extension - Blue Cosmos Team Blog says:
[...] conséquent, j’ai trouvé ici une extension qui gère plus de 50 langages de programmation. Pour l’utiliser il suffit [...]
26 July 2008, 8:58 amPerseverance Trumps Talent » Blog Archive » Testing out Code Snippet 2.0 says:
[...] The folks over at Hacker for Hire have a great plugin for Wordpress called Code Snippet 2.0. [...]
27 August 2008, 12:35 pmjutirain says:
The same issue with Mike..
The will be be the ampersand lt/gt semicolon. I’m sure I’ve include the
properly since the syntax highlighting works.
10 September 2008, 9:16 amjutirain says:
Sorry for the mistake in last post.
The same issue with Mike..
The will be be the ampersand lt/gt semicolon. I’m sure I’ve include the [code][\code] properly since the syntax highlighting works.
10 September 2008, 9:19 amWyatt says:
The problem seems to be with the rich-text editor in WordPress. Unfortunately, I don’t know enough about the internals of the rich-text editor to patch the code to handle it. My only recommendation is to use the basic editor for now. I’ll see what I can do to fix it, but I think trying to keep up with WordPress’s changes to their rich-editor is probably going to be more involved. Again, the applicable test:
ddmi.SelectedIndex = ddmi.Items.IndexOf(ddmi.Items.FindByValue(mi))
btnSearchClick()
End If
Aktuelle Plugin-Liste at IT-Serie says:
[...] Code Snippetzum Formatieren von Quelltext, mit farblicher Darstellung (Syntax highlighting), kennt sehr viele Programmiersprachen, nummeriert Zeilen wahlweise automatisch [...]
14 September 2008, 7:48 amray says:
SET @a = ‘abc’
www.jclaudius.net/blog » How to Upgrade to Ubuntu 8.04 LTS (Hardy) via Command Line says:
[...] – This is my first time using code-snippet and I love it. Props to hackerforhire.org for reviving such a useful [...]
12 November 2008, 11:48 pmPixelsetzer » » Praktische Wordpress PlugIns, die ich selber benutze says:
[...] Code Snippet ist für alle praktisch und sinnvoll, die Code veröffentlichen wollen. Dabei spielt es keine Rolle, ob es sich um PHP, JAVA, C oder eine andere Programmiersprache handelt, den es gibt schon jede Menge implementierte Layouts für viele verbreitete Script und Programmiersprachen. [...]
14 December 2008, 6:42 amPixelbath » Blog Archive » GeSHi JSFL Language File says:
[...] last post about JSFL caused me to look for a nice syntax highlighting plugin. I found the excellent Code Snippet plugin that uses GeSHi (Generic Syntax Highlighter) for its highlighting engine. Since there seems [...]
8 January 2009, 5:33 pmandra says:
thank’s man for this plugin, i like it.
17 February 2009, 2:54 am12 Wordpress Plugins to Display and Highlight Code within your Blog : Speckyboy Design Magazine says:
[...] Code Snippet WP Plugin [...]
19 February 2009, 5:05 amCode Snippet Plugin | WordPress Plugins Database - WordPressPluginsDatabase.com says:
[...] I’m attempting to keep his wonderful contribution available so I’ve given it a home at http://blog.hackerforhire.org/code-snippet/. If you find any bugs with it, let me know and I will do my best to resovle [...]
24 February 2009, 2:27 amkiko says:
beautiful blog merciiiii
23 March 2009, 7:40 pmPaulo Lima says:
Hi,
The download link is broken, 404 file not found. =/
11 May 2009, 7:58 amWyatt says:
Sorry about that. It’s broken from me moving to a new server. The link should be good now. If not, let me know.
11 May 2009, 8:35 amAna Flávia says:
Hi,
17 July 2009, 6:25 pmThe plugin doesn’t work in WP 2.8.1 “/
Wyatt says:
Just upgraded this site to WP 2.8.1 and it appears to be working. I did have an issue with the redirection plugin though. If you can provide me more details on what you’re having a problem with, I’d be happy to try and fix it.
17 July 2009, 11:48 pmAna Flavia says:
Hi Wyatt.
19 July 2009, 9:05 amMy problem is in the panel of control. After I updated for WP 2.8.1, the panel of control shows a message saying that I have not sufficient permissions to access the page. In my blog it works correctly, but I only would like to change the CSS. Here the print of the page when I try to access: http://i28.tinypic.com/slqpeq.jpg
Thank you very much! ^^
Wyatt says:
Hmm, it appears to be a bug with the way that WordPress is accessing the plugin configuration pages. I’ll see what I can do to fix that.
19 July 2009, 1:15 pmAna Flavia says:
The plugin works perfectly now!
19 July 2009, 9:31 pmThanks ^^
Biia says:
Hi Wyatt.
28 July 2009, 4:21 pmMy WP is 2.8.1, the panel of control shows a message saying that I have not sufficient permissions to access the page. I want to change the CSS. Here the print of the page when I try to access: http://i158.photobucket.com/albums/t94/bia-chan05/print.png
Thanks!
Biia says:
Hi Wyatt.
28 July 2009, 4:22 pmMy WP is 2.8.2, the panel of control shows a message saying that I have not sufficient permissions to access the page. I want to change the CSS. Here the print of the page when I try to access: http://i158.photobucket.com/albums/t94/bia-chan05/print.png
Thanks!
Wyatt says:
I’ll take a look at it tonight. Blackhat and Defcon aren’t quite the friendliest networks in the world and AT&T had horrible 3g service while I was out there.
2 August 2009, 7:56 pmWyatt says:
Biia,
I’ve updated the plugin. The current release on the WP should be 2.1.5 which should address you issue. The previous versions of 2.1.x should work correctly; however, they didn’t have the version number updated to reflect the actual version installed so attempting to update these through WP would probably fail. If you need a direct link, try this: http://downloads.wordpress.org/plugin/codesnippet-20.2.1.5.zip
2 August 2009, 11:51 pmWyatt says:
Biia, you might want to give that link a few. Looks like the WP extend site is taking longer to update than normal.
2 August 2009, 11:54 pmBiia says:
Hi Wyatt,
3 August 2009, 8:03 pmI update my WP for the new version 2.8.3
Now it’s working perfectly!
Sorry for the duplicated comment =D
Thanks!
Kare says:
Hi, and thanks for an excellent plug-in.
6 August 2009, 12:33 pmBut when I tried to install it from within WordPress 2.8.3 it didn’t activate or show up in the plugins list and when trying to install it again it told me that it was already installed. It had installed a folder called “codesnippet-20″ containing another folder called “codesnippet” in the plugins folder. When I removed those folders, downloaded the zip file directly and copied the “codesnippet” (not “codesnippet-20″) folder into the plug-ins folder of WordPress it worked perfectly. Maybe there is some bug in the installation procedure?
Wyatt says:
Make sure you download the 2.1.5 version from Wordpress.org. I’ve not had any issues with this version.
13 August 2009, 9:57 pmkevin says:
Great plug-in. I will try it
Many Thanks
20 August 2009, 5:21 amKarsten says:
Hi,
29 August 2009, 1:03 amThe plugin works nicely, thanks. Is there an easy way to insert tabs, so the code in formatted nicely?
TIA
Wyatt says:
I’ve toyed with the idea of inserting tabs/spaces into the code; however, the GeSHi engine only does highlighting and not code-formatting or beautification. I’ve found that if you copy and paste your code, with tabs and spaces, it seems to lay out in the same fashion on the screen. If that’s not working, let me know and I’ll get on fixing it
29 August 2009, 9:02 amJosh says:
I’ve got this up and running and it seems to be working great so thanks for keeping this thing alive. I would also be interested in the ability to indent code etc. I’ve tried copying preformatted code but it doesn’t maintain it once I paste it into the post.
thanks agai.
8 September 2009, 8:35 amHire Personnel says:
thanks for sharing this plug in.now i can solve my problem.
9 September 2009, 8:49 amppat says:
Hi! I’ve WP 2.8.4 and codesnippet doesn’t work. Even when I move plugins/codesnippet-20/codesnippet/ to plugins/codesnippet/ I can’t see any entry in “Manage Plugins” option in the administrative interface.
12 September 2009, 11:17 amNeither the posts show higlighted code.
Wyatt says:
I’ve not upgraded to WP 2.8.4 yet; however, I will do it this weekend and see if I can figure out what the problem is. Code snippet should exist in the /wp-content/plugins/codesnippet directory. A couple of quick thinks to check are:
12 September 2009, 5:19 pm
Quantum says:
I had an attempt at looking at the plugin as I to had discovered its not working. Trying to do a clean install via the plugins page said something about the plugin not having a valid header. In addition the readme.txt needs a little tweak to pass the validator (see: http://wordpress.org/extend/plugins/about/validator/)
20 September 2009, 11:10 amWyatt says:
@Quantum, If you’re having issues with the plugin, please drop me an email with the specifics of what’s breaking. I’ve been running the current 2.1.5 version without issue. I’ll update the readme.txt to pass the validator in the next release since the only parts that are failing are screenshots (which I don’t have any) and the change log (which will replace the version history section).
Again, let me know what problems you’re having so we can get you fixed up.
Thanks,
Wyatt
20 September 2009, 11:24 pmma says:
Hi
I have the same problem as @Quantum. I added the plugin via the internal dashboard plugin install (Plugins / Add New) and at the end it said something like “The plug in does not have a valid header”. I cannot re-install (it says I already have it) and cannot use it (does not appear in the list of installed plug ins.
WP 2.8.4 here.
9 October 2009, 2:40 amOliver Mezquita says:
Looks nice! I’ll give it a try. Thanks!
23 October 2009, 12:23 pmKonferens Uppsala says:
thanks dear for the post about hacker for hire, but the theme of hackers is much bad in minds of people. what you say?
10 November 2009, 10:47 amgiovanni says:
thanks for this plugin. I’m using it for the first time but I have a problem with the output formatting of python code.
I’ve written:
print "hello"
and I get:
1.
def __init__(self):
2.
print “hello”
How to avoid line numbers from showing? At least not in this way…
thanks!
17 November 2009, 4:13 amgiovanni says:
Nice: my code formats well in the previous comment, while in my blog I get the result I reported…
17 November 2009, 4:15 amWyatt says:
giovanni:
Under the Settings -> Code Highlighting, you can tune the CSS that is used to display code. Sorry it took me so long to get back to you, but if you’re still having problems, drop me an email at
Code Snippet Highlighting | iBlott.com - Not Quite as Catchy You’d Think. But iLike says:
[...] in http://blog.hackerforhire.org/code-snippet/ Engine [...]
2 March 2010, 8:10 am11 Plugins làm nổi bật code trong bài viết - wWw.RubicVn.cOm says:
[...] Code Snippet WP Plugin [...]
3 March 2010, 10:10 pmWM says:
Rossi
001122334455
Roma
via del corso
n.25