2 Great WordPress Plugins

I haven’t played with WP plugins for a long time because I had been very comfortable with my plugin suite :) Yesterday I did a little search to see if there are new exciting plugins out which suit my taste, and found 2!

  • GoldenGate: if you uses PicasaWeb and often inserts photos from there to WP posts, like me, you must know how painful it is to get the PicasaWeb photo URL out. This plugin makes it a breeze~ Actually I found it several months ago but at that time I failed to get it worked because of some PHP memory limit problem. This time it works somehow :) Give it a try if you uses PicasaWeb.
  • Yet Another Related Posts Plugin: I began to look for a good “related posts” plugin from the first day I started this blog. Though there are quite a few choices, no one really rocks. Some “powerful” plugins try to analyze post content and calculate the similarity, but they won’t work for Chinese. So I finally used a “full manual” plugin named “Terong Related Links“. Speaking frankly that plugin isn’t interesting at all and the author doesn’t seem to maintain it any more. This time with one or two google searching I found this post, which compared a few related posts plugins and selected YARPP out. Just by looking at the options I know this is exactly the plugin I want. YARPP leverages the category and tag information, which are what bloggers actually use to organize posts!

Still tweaking them, so much fun to play with WP~



From Cat Bath

PicasaWeb Host Domain Changed

Several days ago I found that my pictures shown with Picasa Web Matrix plugin on blog were gone. At first I thought it was fault of PicasaWeb, because fetching the RSS link in Firefox will return a “400 Bad Request” error. But today I noticed I can still receive friends’ picture updates from PicasaWeb in Google Reader… And the RSS link in IE works well actually. So I guess the problem is on the plugin.

After a few minutes’ examination, the problem is uncovered. In the codes of Picasa Web Matrix plugin, a regular expression with “google” is used from matching the image src value, but PicasaWeb appears to just changed its host domain name from “google.com” to “ggpht.com”…. So, simply change this line

preg_match(‘/http:\/\/.*\.google\..*\/([^.]*\.(jpg|png|gif))/i’, $photos[$count][‘thumbURL’], $picasaWebSlugMatches);


preg_match(‘/http:\/\/.*\.ggpht\..*\/([^.]*\.(jpg|png|gif))/i’, $photos[$count][‘thumbURL’], $picasaWebSlugMatches);

and the photos are back again :)




Embed PicasaWeb Album in WordPress, XHTML 1.0 Compatible

It’s quite convenient that Google PicasaWeb released the new feature of embedding album by flash. But the same as some other places in PicasaWeb, the codes it gives out aren’t XHTML 1.0 compatible, either…

Though it’s not a big deal and I know someone thinks w3c standards stupid, I would like my own blog in clean and tidy codes, and I wish there are some more strict standards in HTML world, that will make programmers life much easier and make Internet more organized.

The more realistic problem, which drove me to do some experiments and write down this post, is that WordPress is actually quite picky with html codes. If you use PicasaWeb’s codes in WordPress, wich use “embed” tag, WordPress will change it to “ibed” tag automatically. That will lead to some annoying small bugs when you want to edit the post or switch between “Visual” and “Code” modes. So I guess I’d better feed WordPress, this picky girl, some W3C compatible codes.

Finally I chose the plugin pb-embedFlash to do that. For example, PicasWeb gives me such codes for embedding one of my albums

<embed type=”application/x-shockwave-flash”
width=”400″ height=”267″

Then with pb-embedFlash, what I need to do is just use codes like this

[ flash http://picasaweb.google.com/s/c/bin/slideshow.swf?
weiwei9%2Falbumid%2F5084619049582967009%3Fkind%3Dphoto%26alt%3Drss w=400 h=267]

Use the swf URL followed by a question mark and the value of flashvars in codes given by PicasaWeb. Note that I leave a blank space between the “[” and “flash” to avoid being converted.

I have to admit it’s not an easy job to insert some Flash in WordPress without plugins, so I strongly suggest the plugin – pb-embedFlash.