這個外掛並未在最新的 3 個 WordPress 主要版本上進行測試。開發者可能不再對這個外掛進行維護或提供技術支援,並可能會與更新版本的 WordPress 產生使用上的相容性問題。

Google Reader Widget

描述

Requirements

  • WordPress 2.2+ or 2.0.x/2.1.x with WordPress Widgets
  • PHP 4.3.0 or greater (needed for function file_get_contents)
  • Your Google Reader User ID

Features

  • Displays your latest shared items from Google Reader
  • Completely customizable display
  • Caching for large traffic sites

User ID

In order to get your shares, you need to know your user id according to Google Reader. This can be found by going to the ‘Shared Items’ link, and copying the 20 digit number at the end of your shared items link.

So something like:
http://www.google.com/reader/shared/02774557510273097991
Where 02774557510273097991 would be my user id.

Formatting

There are 3 parts needed to format the output.

The first part, called items start in the admin panel, is the first part of the widget after the title. For the default formatting, this is just <ul>.

The second part, called items end, is the ending of the widget. By default, this is:
</ul>
<a href=”%googlereader%” style=”float:right;”>Shared Items</a>

The third part is what is called for each item. By default, this is:
<li style=”list-style-type: none;”><a href=”%link%”>%title%</a></li>

The premise of calling each value is this:

  1. start
  2. item
  3. item
  4. item
  5. end

The formatting for items is:

  • %link% – Link to the item
  • %title% – Title of the item
  • %site% – The title of the site the item is from
  • %sitelink% – The link to the site the item is from
  • %number% – The number of the current item
  • %comment% – The comment (note) made when sharing an item

The formatting for start and end is:

  • %googlereader% – Link to your Google Reader shared page
  • %count% – Number of items shown

螢幕截圖

  • Default Display
  • Admin Panel

安裝

  1. Download googlereader.zip
  2. Extract and upload googlereader.php to the plugins/ directory
  3. Enable Google Reader in the Plugin admin panel
  4. In widget admin panel, place Google Reader in the sidebar, and edit it to enter your user id

常見問題

What does cache time mean?

It’s the number of seconds before the content will be requested again. You can set this to be 0 or -1 to not use the caching system. If you edit any of the widgets in the widget admin panel, the cache is cleared.

My widget doesn’t display any stories

This could be for many reasons. First possibilty, you incorrectly entered your Google Reader ID. Next, your host might not support file_get_contents or curl. Try changing the use option to curl in the widget admin panel. You could try using some sort of fsockopen if neither curl nor file_get_contents work. If your host doesn’t support outside requests, this widget will not work for you.

評價

There are no reviews for this plugin.

貢獻者及開發者

“Google Reader Widget” 是一個開源的軟體。以下的人對這個外掛作出了貢獻。

貢獻者

將 Google Reader Widget 外掛本地化為台灣繁體中文版。

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄