Recommended Reading: Google Reader Shared is a WordPress plug-in that pulls in your shared items from Google Reader. Includes easy configuration, widget support, ability to embed in a page or post (shortcode), and caching.

New version 2.0.1 added March 19, 2009!

Download version 2.0.1 from the WordPress plug-in repository »

Description

“Recommended Reading: Google Reader Shared” gets the shared items from your Google Reader account.

Version 2 is a major update that adds even greater control over the output, and the ability to embed the output in a page or post with simple shortcode!

Want to easily share posts you recommend from other blogs? Want to share selected posts from your business partners’ news feeds or friends’ blogs? The “Recommended Reading” plug in is the easy way to do it! All you need is a free Google Reader account.

It includes an easy to use configuration panel inside the WordPress “settings” menu. From this panel you can control:

  1. Your Google Reader ID… or look it up dynamically with your Google username and password!
  2. Number of posts to show.
  3. Format of post dates (or hide dates).
  4. Option to show the source blog with link.
  5. How many characters from the post’s content or summary to show (including all, or none).
  6. Handling of links (new window, nofollow properties).
  7. Display of your notes.
  8. Advanced content output and styling when embedding on a page or post.

Use the sidebar widget, embed in a page or post with simple shortcode, or, for advanced users, call the list by a function in your template.

Precise CSS classes throughout the output (with common WordPress conventions) allows granular control over the look within templates.

Powerful caching stores and compares the the feed’s provided update information, giving you fast performance with a feed that’s always up to date.

Requires PHP 5 or newer.

Installation

  1. Easily install by searching for “Recommended Reading” in the “Add New” menu option under “Plugins”, or manually upload the folder `recommended-reading-google-reader-shared` to the `/wp-content/plugins/` directory.
  2. Activate the plugin through the ‘Plugins’ menu in WordPress.
  3. Configure the plugin by going to the “Rec. Reading” menu item under “Settings”.
  4. Add to your blog or website!
    1. Widget users can add it to the sidebar by going to the “Widgets” menu item under “Appearance” and adding the “Rec. Reading” widget.
    2. If you want to display the output on a page or post, just type `[recreading]` into the content.
    3. Template authors can output the list anywhere in by calling the function: `google_reader_shared()`; pass the value “true” - `google_reader_shared(true)` - to replicate shortcode output.

Frequently Asked Questions

Q: How do I set up a Google Reader account?
A: Everything you need to know:

Q: How do I share posts?
A: Click the “Share” button at the bottom of any post from within Google Reader.

Q: Do I need to be at my computer to update my recommended reading?
A: Nope! Since the plug in gets posts from the Google Reader shared feed, you can update your website’s or blog’s feed from any Google Reader interface that supports shared items. You can even recommend items from your mobile phone using Google’s or third party clients (I personally use and recommend Byline for the iPhone).

Screenshots

WordPress plug-in: front end

Rec Reading Configuration Panel

Rec Reading Shortcode Output

Change Log

v1.01
Added “Quick Set” option to display settings
Vastly improved handling of ID validation
Fixed source post links

v1.02
Fixed description of “Trim Post Content”
Option for opening links in a new window
Improved output error checking for config saved with invalid feed ID
JavaScript and PHP code optimizations throughout

v1.5
Added caching based on feed update tag
Added control over display of shared item notes
Added control over widget title
More standard widget output
Added more help to plugin options
Added options to support plugin author

v1.51
Fixed path issue causing validation and lookup issues

v1.52
Improved path handling for validation and lookup
Added check for PHP 5

V1.522
Fixed error in PHP check

v1.540
Smarter requirements checking
Modified code causing fatal error upon attempting activation in PHP4

v1.541
Fixed additional fatal error upon attempting activation in PHP4

v2.0
Easily embed in a page or post with shortcode; includes special settings!
Option to hide stand alone notes
Add rel=”nofollow” to links
Control the preface text for item source and publish date
Improved built in help
Misc code improvements and clean up

v2.0.1
Updated options code for compatibility with future versions and Wordpress MU

Coming soon:
Override settings via parameters when called by function
Support for individual shared folders
PHP4 computability layer (if enough demand)

26 Responses to “Google Reader Shared Items (WordPress Plugin)”

  1. Mike Ramm says:

    Hi guys,

    I use WP 2.7.1 on my blog and I cannot install the plugin. I always get a fatal error:

    Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /home/rammsoft/public_html/mikeramm/en/wp-content/plugins/recommended-reading-google-reader-shared/googlereader.php on line 80

    When I used version 1.52 the error is on line 80. When I used version 1.522 the error is on line 78. It seems like the error is caused by this line:

    $urlPost = $entry->link->attributes()->href;

    I don’t know PHP so any advice from you will be very helpful.

    Thanks,
    Mike

  2. Jake Goldman says:

    Mike — you’re not the first person to report that issue, but I’m having trouble replicating it. I think I may ditch the “simplexml” library I’m using now, as it seems to be problematic with different versions of PHP.

    Do you have any idea what version of PHP you’re using?

    I’ll send you an email… it may be helpful to experiment with the code directly on a site experiencing the problem.

  3. Jaffasoft says:

    Great that someone has made one of these. I’ve got a hobby of reading various blogs in the real estate investing industry to learn about stuff. At google reader i have about 20 different blogs.

    Can this plugin expand to be one full page iNove Theme has a full page option with no sidebar. As my side bar is like full up already. But i also would not be able to display enough links. I would request something that acts like the google ready itself. Unless i’m overlooking something can something pull into a full page of it’s own to run similar to Google Reader?

    It’s a great idea by the way and i am getting more and more blogs that i find on my hobby that i want to share with my users. So it could because a real feature main page of my blog. I’m sure lots of other blogs on various subjects would do similar.

    Why don’t some blogs allow to read the full post in the reader as well. If this was over come it would be one step better then Google Reader so a plus for people to instal the plugin.

  4. Jake Goldman says:

    Jaffasoft,

    Yes, you can create a page in WordPress that would hold your shared Google Reader items (the output from this plugin).

    In a future version, we may add a short tag to let you easily do this. For now, you would have to know at least some basics of WordPress theme creation / editing.

    You would need to create a new page template, and within that page template, call the function “google_reader_shared()”.

    If you would like, we can do this for you. We charge $125/hr; it would probably take about 30 minutes to set this up for you, or about $63.

    If you’re interested us, use the “request a quote” button or email us at and we can get the ball rolling.

  5. Mike Ramm says:

    Jake - I don’t know the version of PHP. My cPanel says “Unknown”. I will send you an email with login information to check it on my blog.

  6. Jake Goldman says:

    For those following the comments, Mike’s problem stemmed from PHP4. I’ve modified the code in the latest build (on the WordPress repository… will add here later) to more gracefully fail on PHP4 installs, as Mike has tested and confirmed!

  7. Hot Rods says:

    From the first time I reviewed the post with my recommend posts, there’s a big blank spot above the first recommendation. Every time I look at it again after making a change to the settings, the space GROWS!! Any ideas?

  8. Jake Goldman says:

    Hot Rods –

    Let me investigate and see if I can replicate the problem.

    UPDATE - I can’t replicate this, either under the hood in the HTML or in the visual display, on my test installs. I will contact you offline for support.

    Jake

  9. Aggie says:

    Dear Jake,

    I just installed this plugin on my Wordpress 2.7.1 and got the error message

    “A version of PHP with the SimpleXML class is required. This is included with PHP 5 and newer.”

    when I was going to view the settings. I’m running PHP 4.X.

    Just wanted to let you know… do you expect to release a version that works with PHP4?

    And yes - this plugin is exactly what I’ve been looking for!

  10. Jake Goldman says:

    Hey Aggie,

    As indicated at the bottom of that long page above, I’m intending to release a PHP4 compatibility layer with enough demand. Comments like yours tell me that demand is real!

    I’m hoping to have some time in the next week, but as this is a “free” project, I can’t commit to firm release dates.

    If you need this for a paying project or client, and can afford a meaningful donation, we can fast track this feature for you and aim put it out by Saturday evening.

    Otherwise, I’ll keep you apprised!

    Alternatively, you may want to ask your host if they can switch you to PHP5. Many shared hosts can easily make the upgrade, and its unlikely that you’ll see any down side.

  11. Markus says:

    Hi!

    Your Plugin looks very nice and but i have troubel to use it with wordpress-mu. Your Plugin use the whitelist and so its not possible to save the options. Can you add code and it should works wiht wordpress-mu. The solution can you find her: http://mu.wordpress.org/forums/topic.php?id=7415

    Thanks a lot!
    Markus

  12. Jake Goldman says:

    Markus - thanks for the feedback!

    We’ll definitely investigate and get a revision that’s compatible with WordPress MU out soon.

  13. Markus says:

    : That sounds great! Thank a lot!

    Markus

  14. says:

    hey this plug in looks incredible. I’ve been using google reader for about a year now and I’d love to put all my shared items on my personal website. is there a way to get the plugin to display all my shared items, including the ones I posted months ago?

  15. Jake Goldman says:

    Hey James,

    Thanks for the feedback!

    Notice the “Number of Posts” option in the settings panel? If you leave that blank, it will show all of your posts!

    Probably want to avoid that in the sidebar, but if you’re using the “short code” method, this is probably fine (there’s no “paging” however, so it will just be one long page… maybe by the time we get to version 3 we’ll add paging!).

  16. says:

    oh so it doesnt create a new word press blog post for each shared item? damn. I’d def. pay for that feature.

  17. dev3k says:

    great plugin , just one question is there anyway to make navigation for shared posts using AJAX for example to show 5 posts per page?!

  18. Jake Goldman says:

    dev3k -

    Thanks for the input!

    Though there’s no support for paging “out of the box” right now, it’s certainly possible. Paging support (and AJAX for the widget is a great idea) is definitely on the road map, however.

    If you would like to fast track this feature, please consider making a donation and stating this is your top feature.

    James -

    There’s not really any way to automatically create a post when you click the “share” button in Google Reader. There may be a way to check for new shared entries every time your blog is loaded, and generate a new post for each entry. However, I’d have to think about what form this takes.

    I can’t say that this is high on the roadmap of priorities, but it looks like this extension may provide a path to what your looking for:

    If you willing to *really* spend (we’re not talking $10) on this functionality, use the “Request Services” button or email me, and we can discuss a project.

  19. I’m trying to setup Recomended Reading by when I try to validate my google reader id it says “There was a problem with the request.” and doesn’t work. I also get the same issue if I try to put in my gmail credentials to get the id that way. If i save the id anyways my blog doesn’t load since the php crashes, here is the error…

    PHP Fatal error: Call to undefined function curl_init() in C:\inetpub\wwwroot\wp-content\plugins\recommended-reading-google-reader-shared\googlereader.php on line 55

    Just wondering if you know why this is happening. Thanks.

  20. Jake Goldman says:

    Nino,

    That error seems to indicate that you don’t have the “curl” PHP library installed!

    http://us.php.net/curl

    CURL lets PHP “scrape” or load pages outside of your domain. We use CURL to attempt to load your shared feed URL, and confirm that it actually exists and has some content (its used for similar purposes for the ID validation and username/password method).

    Pretty much every major hosting service provides CURL preinstalled; it’s an extremely common library that enables a lot of sites (that use PHP) to do pull external data.

    I suppose we could build in a check for CURL, as we do for our PHP5 XML Library, but I’m surprised to hear of someone who, apparently, is running PHP5 but doesn’t have that library.

    Where are you hosting your site?

    UPDATE
    Looking at your WHOIS records I’m betting you’re self hosting via Dynamic DNS. Adding the CURL library for PHP should be a pretty simple matter; there’s lots of information on the web if you do some “Googling around.”

  21. Jake,

    Excellent thanks for the help. Installed cURL for PHP and it worked. Note to anyone else that comes along this make sure your PHP root is in your PATH env var.

  22. Spencer says:

    Hi Jake - looks like a great Plug-In…here’s what I am getting during install, see below please:

    Fatal error: Call to undefined function: register_setting() in /nfs/c02/h04/mnt/41287/domains/venturelinx.com/html/wp-content/plugins/recommended-reading-google-reader-shared/googlereader.php on line 44

    When I delete the googlereader.php file I can access WP Admin again. I am on WP 2.6 - could this have something to do with it?

    Thanks,

    Spencer

  23. Jake Goldman says:

    Spencer,

    That’s exactly the reason. The line in question is the first “register_setting” call; that’s a relatively new API call for formally registering plug-in options that is expected to be required in the next major version of WordPress (2.8) and is presently required in WordPress MU 2.7.

    As the WordPress plug-in repository indicates, WordPress 2.7 or newer is required for this plug-in. I could, in theory, build some special handling in for older versions of WordPress, but I’ve chosen to build “forward”.

    If at all possible, I’d encourage you to upgrade to 2.7.

    You can try version 2.0 (the code at issue was introduced in 2.0.1) by using the “Older Versions” link in the repository, but it has not been tested with 2.6.

  24. Neil Duckett says:

    Great plugin, however i’m in the same boat with the …

    “A version of PHP with the SimpleXML class is required. This is included with PHP 5 and newer.”

    Looking forward to a new version for php 4, although i’m sure my server has php5, i checked earlier today …. hmmm, interesting.

  25. irene says:

    It’s a great plugin, thanks.

    I have a problem with codification, when the note have any accent it brokes post (and all design blog it’s afected).

    Thanks for help.

  26. [...] Google Reader Shared Items - Everybody enjoys a good “link luv” post. I personally always have good intentions, but don’t end up writing them nearly as often as I’d like. This plugin is about as close as I’ve found to a perfect lazy blogger sharing tool. When I read an interesting article in my google reader, I simply click the “share” button at the bottom, and shortly thereafter it shows up here on this blog in the sidebar. [...]