blog

Archive for the ‘projects’ Category

Free licenses for Mailplane 2.0—Mailplane 2.0 の無料ライセンズ

Tuesday, August 19th, 2008

I’ve written before about Mailplane, a high-quality Gmail client with some great Mac-specific features. I’ve been happy to be associated with the project as its Japanese localizer. I recently completed the localization for the upcoming version 2.0. As a result, I’ve received twenty free licenses for Mailplane 2.0 from the developer, Ruben Bakker. Email me if you’re interested in one, and keep your eyes peeled for the 2.0 gold release.

前にもここで話題にしたことはあるが、今日は Mailplane の新バージョンを発表しよう。 Mailplane は Mac 的な機能満載の Gmail クライアントで、Gmail 2.0 対応の最新バージョン (2.0) が近々リリースされる。 自分は Mailplane の日本語版担当なので開発者のルーベン・バッカーさんから Mailplane 2.0 の無料ライセンズを20件頂きました。欲しい方はこちらにメールしてください。

尚、日本ではもうすぐ Mailplane が MacFan で紹介されるとのこと。楽しみ!最後に、日本語版で問題があると思ったら、勝手に書き上げる前に直接教えてね。^^ お願いします。m(__)m

Yet Another Related Posts Plugin 2.0

Sunday, July 13th, 2008

Well, it’s been a while since I updated my plugin YARPP—in my humble opinion the best related posts plugin for WordPress. ^^ Today I release version 2.0, incorporating a number of important requests and bug fixes:

  • New algorithm which considers tags and categories, by frequent request
  • Order by score, date, or title, by request
  • Excluding certain tags or categories, by request
  • Sample output displayed in the options screen
  • Bugfix: an excerpt length bug
  • Bugfix: now compatible with the following plugins:
    • diggZEt
    • WP-Syntax
    • Viper’s Video Quicktags
    • WP-CodeBox
    • WP shortcodes

Check out the Yet Another Related Posts Plugin page on this site, the page on wordpress.org, or download it directly now!

The 北京话儿 Beijing Pirate T-shirt

Saturday, June 14th, 2008

Speaking of t-shirts, I’d been toying with a t-shirt idea for the past year or two: a Beijing Pirate t-shirt. Let me explain…

A distinctive feature of Beijing dialect of Mandarin (and, indeed, most northern Chinese dialects) is the very frequent rhoticization (adding to or replacing the end of a word with “arr”) whose function is often glossed as a diminutive suffix. This phenomenon is called 儿化 (érhùa) in Chinese. Here are some examples, blatantly stolen from Wikipedia:

  • 公园(gōngyuán)(public garden) → 公园儿(gōngyuánr), pronounced “gōngyuár”
  • 小孩(xiǎohái) (small child) → 小孩儿(xiǎoháir), pronounced “xǐaohár”
  • 事 (shì) (thing) → 事儿(shìr), pronounced “shèr”

The result of this variation is that it makes you sound like a pirate… and thus my t-shirt idea was born:

Beijing Pirate shirt

(more…)

Markdown for WordPress and bbPress

Wednesday, May 21st, 2008

I like many others am a big fan of John Gruber’s Markdown, a simple typesetting spec for entering text in a clean, legible plain-text fashion and outputting to (X)HTML. Michel Fortin did the fabulous job of porting the Markdown engine to PHP, making it a plugin for WordPress, bBlog, and TextPattern.

I’ve been using Markdown for all my blog posts here. Recently, though, I was in charge of a bbPress bulletin board (the “less is more” sister project to WordPress) for the Shoreland Scav Hunt team, and wanted to use Markdown formatting there. And I wasn’t the only one wanting to do this.

With some experimenting and research into the filters in the bbPress text flow (different than the WordPress one), I was able to make Markdown work in bbPress. This involved adding a special bbPress plugin wrapper to Michel Fortin’s PHP Markdown Extra. I’ve rereleased this plugin as Markdown for WordPress and bbPress, available at both wordpress.org and bbpress.org. Enjoy!

The Children of America

Tuesday, April 15th, 2008

Just a quick announcement: Inspired by one of my favorite phrases from Barack Obama’s compelling speech on race in America, I created a website called The Children of America which gives you a random photo of a child of America. The importance of investing in our future as a nation through investment in our children is often only glossed over in politics… it’s always good to be reminded of what we’re working for.

The Children of America
Visit The Children of America

The project also acts as my foray into the Flickr API… I’m particularly proud of the dynamic submission chooser. Use it to submit your own creative-commons-licensed Flickr photos of American children.

Modifiying WordPress plugin activation behavior

Saturday, January 5th, 2008

As I continue to work on and debug Yet Another Related Posts Plugin and WP-Smartdate, I’ve come across an issue where plugin activation fails, but I get no useful error message.

When I try to activate the plugin, I am redirected to a url of the type /plugins.php?error=true&plugin=...&_error_nonce=.... This redirect just gives me the plugins control panel with my plugin still disactivated, and with no useful error message.1 This apparently is an issue with the Plugin Protection mechanism introduced in WP 2.2. A quick fix (hack) is available on the WP forums.

Here’s hoping this helps some people scratching their heads, and that this behavior is reconsidered/fixed in future releases.


  1. Apparently some people get a message like “Plugin could not be activated because it triggered a fatal error.” 

Yet Another Related Posts Plugin

Saturday, December 29th, 2007

UPDATE:

This posting is now outdated… for the latest information on YARPP, please visit YARPP’s very own page on my site, or its page on wordpress.org. If you have questions, please submit on the wordpress.org forum. Thanks!

Description

Today I’m releasing Yet Another Related Posts Plugin (YARPP1) 1.0 for WordPress. It’s the result of some tinkering with Peter Bowyer’s version of Alexander Malov & Mike Lu’s Related Entries plugin. Modifications made include:

  1. Limiting by a threshold: Peter Bowyer did the great work of making the algorithm use mysql’s fulltext search score to identify related posts. But it currently just displayed, for example, the top 5 most “relevant” entries, even if some of them weren’t at all similar. Now you can set a threshold limit2 for relevance, and you get more related posts if there are more related posts and less if there are less. Ha!
  2. Being a better plugin citizen: now it doesn’t require the user to click some sketchy button to alter the database and enable a fulltext key. Using register_activation_hook, it does it automagically on plugin activation. Just install and go!
  3. Miscellany: a nicer options screen, displaying the fulltext match score on output for admins, an option to allow related posts from the future, a couple bug fixes, etc.

Installation

Just put it in your /wp-content/plugins/ directory, activate, and then drop the related_posts function in your WP loop. Change any options in the Related Posts (YARPP) Options pane in Admin > Plugins.

You can override any options in an individual instance of related_posts using the following syntax:

`related_posts(limit, threshold, before title, after title, show excerpt, len, before excerpt, after excerpt, show pass posts, past only, show score);

Most of these should be self-explanatory. They’re also in the same order as the options on the YARPP Options pane.

Example: related_posts(10, null, 'title: ') changes the maximum related posts number to 10, keeps the default threshold from the Options pane, and adds title: to the beginning of every title.

There’s also a related_posts_exist) function. It has three optional arguments to override the defaults: a threshold, the past only boolean, and the show password-protected posts boolean.

Examples

For a barebones setup, just drop <?php related_posts(); ?> right after <?php the_content() ?>.

On my own blog I use the following code with <li> and </li> as the before/after entry options:

Related posts:

No related posts.

Coming soon (probably)

  1. Incorporation of tags and categories in the algorithm. I’ve gotten the code working, but I still need to think about what the most natural algorithm would be for weighing these factors against the mysql fulltext score currently used (and works pretty well, I must say).
  2. Um, something else! Let me know if you have any suggestions for improvement. ^^

Version log

1.0 Initial upload (20071229)

1.0.1 Bugfix: 1.0 assumed you had Markdown installed (20070105)


  1. Pronounced “yarp!”, kind of like this, but maybe with a little more joy:
     

  2. Did you know that threshold has only two h’s!? I’m incensed and just went through and replaced all the instances of threshhold in my code. It’s really not a thresh-hold!? 

Introducing Smartdate

Tuesday, November 27th, 2007

I recently have been working on a WordPress plugin called WP-Smartdate and I’m happy to say that it is hosted at wordpress.org starting today. As some people have noticed, my blog recently has included little links on word like “yesterday,” with a machine readable version of the date reference (called a “microformat” in the biz). Download the plugin and get started!

WP-Smartdate 0.1
4 kb - zip

This blog post describes release 0.1… For the latest description, check out the WP-Smartdate plugin page or mitcho.com/code.

Please comment! I would love to hear your feedback on the plugin.

Description

WP-Smartdate looks for relative date expressions in your blog posts, such as “tomorrow,” “this coming Monday,” “last Friday,” and adds the date reference (like “2007-11-26”) as a machine-readable microformat.

Why Smartdate?

WP-Smartdate was created for three simple audiences:

  1. For the machine: While many professional information retrieval algorithms go far beyond the scope of this program, smartdate helps the process along by adding machine-readable tags to relative date expressions.1 In addition, these machine tags, in turn, help the human: a search on Google for “November 7th, 2007,” for example, will not pull up a document talking about “yesterday,” written on the 8th, but it will pull up the smartdate output of 2007-11-07.
  2. For the human reader: Blog posts are often written in the “now,” using relative time expressions without concern for how the text will be read in the future. WP-Smartdate makes such posts easier to read and comprehend temporally2.
  3. For me: Because I think this sort of thing is fun!

A typology of smartdate date expressions

The following types of expressions are resolved with respect to the speech time—in WP-Smartdate’s case, the blog post date.

  1. simple references: “yesterday,” “today,” “tomorrow,”
  2. next/last DOTW expressions: “next Friday,” “this past Sunday,” “this Monday”

For the future

  • static dates: “January 1st, 2007”
  • duration shift expressions: “5 days ago,” “fourscore and seven years ago”
  • day of the week shifts: “2 Fridays ago”
  • clean up the code!

  1. One could argue that relative dates are a perfect place to use the abbr tag, as they are a sort of natural-language shortcut for more static temporal expressions. In fact, WP-Smartdate’s output also follows the datetime microformat design pattern draft with two caveats: 1. Unfortunately, the datetime semantic class has not yet been set as the standard is a draft. WP-Smartdate uses datetime. See the Date and Time datatype proposal for more information. 2. The current recommendation for datetime pushes for following the W3C datetime profile, which does not support the ISO-8601 time interval specification, which is will be used by WP-Smartdate. 

  2. Even though the abbr tag should only be used for machine reading

Mailplane Japanese localization available!

Tuesday, September 4th, 2007

Mailplane, the fabulous Mac OS X Gmail client, just reached 1.5.1, including my Japanese localization. My “exotic” (read “non-Roman”) preferences were even featured on the website! While Mailplane is currently in private beta, I have some invites so let me know if you want in. The localization still has a number of quirks, so I would appreciate any feedback along those lines, too.

UPDATE: Also covered in other blogs


© 2006-2008 mitcho (Michael 芳貴 Erlewine).
Proudly powered by WordPress.
Entries (RSS) and Comments (RSS).
The views expressed on these pages are mine alone and do not
reflect those of my employers and clients, past and present.