Number 3 in Widget-A-Day is a Google Reader widget.
This widget will display your latest shared stories. You can change the amount of stories to display and how to display them.
svn co http://svn.wp-plugins.org/google-reader-widget/trunk
- WordPress 2.2 or 2.0.x/2.1.x with WordPress Widgets
- file_get_contents (PHP 4.3.0 or greater) or cURL
- Your Google Reader User ID
- Download googlereader.zip
- Extract and upload googlereader.php to the plugins/ directory
- Enable Google Reader in the Plugin admin panel
- In widget admin panel, place Google Reader in the sidebar, and edit it to enter your user id
- Displays your latest shared items from Google Reader
- Completely customizable display
- Caching for large traffic sites
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:
02774557510273097991 would be my user id.
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
The second part, called items end, is the ending of the widget. By default, this is:
<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:
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
When I try to use my custom google shared id: emilio.gagliardi instead of the numeric version, nothing shows up: this is the full URL to my shared items:
how can i use this in your widget?
It would be great to offer a %date% item; the date that it was shared.
Hey, cool widget, I’ve been using it in my blog.
I’d like to ask you 2 things: 1. some way to customize the html that your widget is generating, 2. same request that @emilio was asking, named users instead of numeric ids.
Thanks in advance,
Is it possible to add more than one google reader widget to a sidebar? I have more than one shared feed and would like to include them all.
I would love to use this widget, but it doesn’t hold the ID. After one page load, the ID resets to the default and nothing is displayed on the page.
I love this widget, and have just begun to program my own. So I tried to modify the widget myself, but can’t figure out how to do it.
Can you tell me how to add another of these widgets on my site? I’d like to have my Personal Google Reader feed AND my Professional Google Reader feed. Is that possible? Can you tell me how??
Great widget, although it would be great if there was a space between each posting…
Thanks for your work,
This just stopped working all of a sudden. Thoughts?
How often does it reload. My two latest reader items don’t show.
Is it possible to manipulate the links so that only one line shows, and rest is hidden?
Is this no longer a functioning plugin with the recent changes to Google Reader’s sharing features?