Google Code Prettify for wordpress

Sunday 27 May 2007 @ 11:47 pm

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.
AuthorDean Lee
Author Location:China
Plugin PageGo to
Download:[download#2]
LanguageEnglish, 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.

  1. unzip and upload the files to your wp-content/plugins/ directory.
  2. Activate the plugin by logging into your WordPress administration panel, going to ‘Plugins’, then clicking the ‘Activate’ button for ‘Google Code Prettify’.
  3. Done,enjoy it.

Usage

Put code snippets in

  1. <pre class=”prettyprint”>…</pre>

or

  1. <code class=”prettyprint”>…</code>

and it will automatically be pretty printed.

Example
Bash

  1. #!/bin/bash
  2.  
  3. # Fibonacci numbers
  4. # Writes an infinite series to stdout, one entry per line
  5. function fib() {
  6.   local a=1
  7.   local b=1
  8.   while true ; do
  9.     echo $a
  10.     local tmp=$a
  11.     a=$(( $a + $b ))
  12.     b=$tmp
  13.   done
  14. }
  15.  
  16. # output the 10th element of the series and halt
  17. fib | head -10 | tail -1

C

  1. #include
  2.  
  3. /* the n-th fibonacci number.
  4.  */
  5. unsigned int fib(unsigned int n) {
  6.   unsigned int a = 1, b = 1;
  7.   unsigned int tmp;
  8.   while (–n >= 0) {
  9.     tmp = a;
  10.     a += b;
  11.     b = tmp;
  12.   }
  13.   return a;
  14. }
  15.  
  16. main() {
  17.   printf(”%u”, fib(10));
  18. }

More examples

FAQ (from http://code.google.com/p/google-code-prettify/)

  1. 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.
  2. 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.
  3. 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.



Dean’s FCKEditor for WordPress plugin(V1.4)

Sunday 27 May 2007 @ 11:45 pm

Full Name: Dean’s FCKEditor
Plugin Version: 1.4
For WP:1.5.x+
Copyright: GPL
Introduction:Replaces the default Wordpress editor with FCKeditor 2.4.2
AuthorDean Lee
Author Location:China
Plugin PageGo to
Downloaddeans_fckeditor_v1.4(zip)
LanguageEnglish, more or add your languages.
How To:

  1. Download “deans_fckeditor_v1.4.zip” and unzip it.
  2. Upload “deans_fckeditor” to the plugins folder of your WordPress installation.like this:cnwper.cn/wp-content/plugins/deans_fckeditor
  3. Activate the plugin in your administration panel.
  4. Done,enjoy it.

Chick read more to look the demo pictures.pic via Dean Lee.
cnWPer.cn
cnWPer.cn




GooglePR Plugin for wordpress

Sunday 27 May 2007 @ 11:43 pm

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.
AuthorAndot
Author Location:China
Plugin PageGo to
DownloadGooglePR(zip)and GooglePR_RPC.zip(if you want your OWN RPC Service)
Languageenglish, more or add your languages.
How To:

  1. Download “googlepr” and unzip it.
  2. Upload “googlepr” to the plugins folder of your WordPress installation.like this:cnwper.cn/wp-content/plugins/googlepr
  3. Activate the plugin in your administration panel.
  4. 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.:)
    1. <?php class_exists('GooglePR') ? GooglePR::bar(): ''; ?>
  5. 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.



AlexaRank Plugin for wordpress

Sunday 27 May 2007 @ 11:42 pm

Full Name:Alexa Rank
Plugin Version: 1.5
For WP:2.1.+
Copyright: GPL
Introduction:this plugin allow you add the Alexa Rank into your blog.
AuthorAndot
Author Location:China
Plugin PageGo to
Downloadalexarank(zip)and AlexaRank_rpc.zip(if you want your OWN RPC Service)
Languageenglish, more or add your languages.
How To:

  1. Download “alexarank” and unzip it.
  2. Upload “alexarank” to the plugins folder of your WordPress installation.like this:/wp-content/plugins/alexaran
  3. Activate the plugin in your administration panel.
  4. edit your template file,add the codes below to where you want to show the alexarank infomatiion.I suggest you use the “Sidebar Modules” and you can creat a php module and show it on the sidebar of your blog.:)
  5. If you want your own RPC Service,please download the alexarank_rpc.zip,unzip it and upload it to the plugins folder of your WordPress installation.then edit the URL in “alexarank.js” of “coolweather” folder.
    1. <?php class_exists('AlexaRank') ? AlexaRank::bar(): ''; ?>



Permalinks Migration Plugin for wordpress

Sunday 27 May 2007 @ 11:41 pm

Full Name:Permalinks Migration Plugin
Plugin Version: 1.0
For WP:1.5.x+
Copyright: GPL
Introduction:With this plugin, you can safely change your permalink structure without breaking the old links to your website,and even doesn’t hurt your google pagerank.
AuthorDean Lee
Author Location:China
Plugin PageGo to
Downloaddeans_permalinks_migration(zip)
LanguageEnglish, more or add your languages.
How To:

  1. Download “deans_permalinks_migration” and unzip it.
  2. Upload “deans_permalinks_migration” to the plugins folder of your WordPress installation.like this:cnwper.cn/wp-content/plugins/deans_permalinks_migration
  3. Activate the plugin in your administration panel.
  4. goto admin panel->options->PermalinksMigration.set the old permanlink structure of your site.
  5. goto admin panel->options->Permalinks.change the new permalink structure to what you want. (personally I recommend /%category%/postname%/)
  6. Done,enjoy it.

Many people want to change their permalink structure,for example, from /%year%/%monthnum%/%day%/%postname%/ to /%category%/%postname%/

But doing so will make all pages indexed by search engines become invalid,moreover, losing visitors from other sites or bookmarks that links to you.
Continue Reading »
Permalinks Migration Plugin for wordpress




Next Posts »» «« Previous Posts