->
Full Name: Google Code Prettify for wordpress
Plugin Version: 1.0
For WP:2.0+
Copyright: GPL
Introduction:this plugin using google-code-prettify to highlight source code in your posts.
Author:Dean Lee
Author Location:China
Plugin Page:Go to
Download:[download#2]
Language:English, more or add your languages.
Notice: you will need to have JavaScript enabled in your browser for this to work.
I had developed another Source Code syntax highlighting plugin using Geshi before,but they are totally different things.with Geshi,code is parsed on the server side,no javascript is needed.
It’s hard to say which is the better,choose one based on your own needs.
How To:
This plugin requires WordPress v.2.0 or later.
- unzip and upload the files to your wp-content/plugins/ directory.
- Activate the plugin by logging into your WordPress administration panel, going to ‘Plugins’, then clicking the ‘Activate’ button for ‘Google Code Prettify’.
- Done,enjoy it.
Usage
Put code snippets in
- <pre class=”prettyprint”>…</pre>
or
- <code class=”prettyprint”>…</code>
and it will automatically be pretty printed.
Example
Bash
- #!/bin/bash
- # Fibonacci numbers
- # Writes an infinite series to stdout, one entry per line
- function fib() {
- local a=1
- local b=1
- while true ; do
- echo $a
- local tmp=$a
- a=$(( $a + $b ))
- b=$tmp
- done
- }
- # output the 10th element of the series and halt
- fib | head -10 | tail -1
C
- #include
- /* the n-th fibonacci number.
- */
- unsigned int fib(unsigned int n) {
- unsigned int a = 1, b = 1;
- unsigned int tmp;
- while (–n >= 0) {
- tmp = a;
- a += b;
- b = tmp;
- }
- return a;
- }
- main() {
- printf(”%u”, fib(10));
- }
FAQ (from http://code.google.com/p/google-code-prettify/)
- Which languages does it work for?
The comments in prettify.js are authoritative but the lexer should work on a number of languages including C and friends, Java, Python, Bash, SQL, HTML, XML, CSS, Javascript, and Makefiles. It works passably on Ruby, PHP and Awk and a decent subset of Perl, but, because of commenting conventions, doesn’t work on Smalltalk, Lisp-like, or CAML-like languages. - How do I specify which language my code is in?
There’s no way to tell it which language because would complicate the interface. If it doesn’t guess the language properly, that’s a bug. - Which browsers does it work with?
It’s been tested with IE 6, Firefox 1.5 & 2, and Safari 2.0.4. Look at the test page to see if it works in your browser.
Full Name:GooglePR
Plugin Version: 1.5
For WP:2.1.+
Copyright: GPL
Introduction:this plugin allow you add the Google PageRank into your blog.
Author:Andot
Author Location:China
Plugin Page:Go to
Download:GooglePR(zip)and GooglePR_RPC.zip(if you want your OWN RPC Service)
Language:english, more or add your languages.
How To:
- Download “googlepr” and unzip it.
- Upload “googlepr” to the plugins folder of your WordPress installation.like this:cnwper.cn/wp-content/plugins/googlepr
- Activate the plugin in your administration panel.
- edit your template file,add the codes below to where you want to show the GooglePR infomatiion.I suggest you use the “Sidebar Modules” and you can creat a php module and show it on the sidebar of your blog.:)
- <?php class_exists('GooglePR') ? GooglePR::bar(): ''; ?>
- If you want your own RPC Service,please download the GooglePR_rpc.zip,unzip it and upload it to the plugins folder of your WordPress installation.then edit the URL in “googlepr.js” of “googlepr” folder.





