Magnolia WordPress Plugin

Current Version: 1.4

This plugin makes it easy to output a list of your Ma.gnolia bookmarks anywhere on your site. You can set it to only pull bookmarks with a specific tag, which is great for listing sites related to a specific category or post. You don’t even need WordPress!

Please download the plugin and provide me your feedback in the comments of this page. I’ll do my damnedest to fix any bugs you report and look forward to expanding it to be even more useful!
Download
Magnolia WordPress Plugin 1.4

Make sure to join the Plugin group on Ma.gnolia to add your site to the list if you are using this plugin!

Install

WordPress

  • Drop the entire plugin folder into wp-content/plugins/ - the final paths will be:
    • wp-content/plugins/magnolia/last_rss.php
    • wp-content/plugins/magnolia/magnolia.php
  • Activate the plugin in the admin area of your wordpress install

Any Site Running PHP 4+, Without WordPress

  • Drop the magnolia folder into a directory of your site
  • Open magnolia.php and edit line 31, changing $rss->cache_dir = ABSPATH . 'wp-content' to point to a directory on your server. Use a fully qualified path in place of ABSPATH . 'wp-content'. For example, you may need to use $rss->cache_dir = /user/mysite/public_html/cache'.
  • Add an include or require statement at the top of the pages that will display the links
  • Use the same PHP snippets as you would for WordPress, see the examples page to see some in action.

To Use

This plugin is pretty straightforward, so all it takes once you’ve installed the plugin is a single line of PHP, inserted wherever you want the list of links to appear. You can display several lists on a page without any issues as well. You can pass the following variables to the plugin:

Configuration Option Setting
Collection is the Ma.gnolia account to use if you want to pull from a person’s bookmarks, or the short name of the group if you want to display bookmarks from a group.
Number of Bookmarks sets the amount of links you want the tag to output, this defaults to 10.
Show Descriptions tells the plugin whether or not it should include descriptions in the output. This defaults to “Do Not Show”.
Show Publication Dates tells the plugin whether or not it should output the date the URL was bookmarked in Ma.gnolia. This defaults to “Do Not Show”.
Use Ma.gnolia’s links? determines whether the links should point directly to the bookmarked URL, or the bookmark’s page on Ma.gnolia. This defaults to the Bookmark’s actual URL.
Tag allows you to pass in a tag to narrow down the list of results. Only bookmarks matching that tag will be output. This is empty by default, so it pulls all bookmarks regardless of their tags. Use a plus sign (+) to separate multi-word tags. For example “web+design”.
Collection Type determines whether you are pulling bookmarks from an individual (’people’) or a group (’groups’). This works in conjunction with $collection.
View collection link controls whether a link to view more links from the collection is output.
Feed Type determines how much information will be output with each link:

  • lite (default) will output a description, mimicking the behavior of version 1.3
  • full will output the bookmark thumbnail image, the description and the tags associated with the bookmark

The output consists of an unordered list, each link contained in a separate list item tag.

Example of Usage

Check out these examples to see the code in action! Each example include the snippet of PHP used to create it and an explanation of each option.

Behind the Scenes

Barry Price built the first version of this plugin, maintaining it through v 1.2 and what you see here is a a modified version of his work and the Last RSS Parser, which does much of the heavy lifting. At this point, I (BaldTechnologist on Ma.gnolia) have picked up the project and will be adding features as suggestions come in and time allows. If you have an idea, please contact me and I’ll see what I can do!

Contribute, for Free!

It’s easy to support this free plugin, and it won’t cost you a thing! Here are a few simple ways:

  • When you plan to buy something from Amazon, follow this link (Amazon.com). It won’t cost you anything, but it will add a small amount of your purchase to my account.
  • Write about the Ma.gnolia for WordPress plugin on your site
  • Add a link back to my site (www.silverspider.com) from yours
  • Drop me a line to say hi and let me know where you are running the plugin.

Changes Made

Version 1.4

  • Added the ability to pull bookmarks from group collections as well as those of individual people. Tags can be used with either, so you can pull bookmarks from the Web Design group that have been tagged with ‘css’.
  • Added ability to pull the Full feed from Ma.gnolia, which includes:
    • Thumbnails of each bookmark
    • The tags applied to each bookmark

    Please note, this is all or nothing, so you cannot just pull the image, or the image and description without the tags. Sorry, but that’s how it’s coming through and I spent too much time trying to find a way around it with a couple of different RSS parsers.

  • Changed the variable $username to $collection to fit the new model of pulling from groups or individuals.
  • Added configuration option to enable/disable the link to view more Ma.gnolia bookmarks

Version 1.3

I’ve made some changes, both major and minor to the plugin, including:

  • Changed quote usage from single quotes to double quotes to improve parsing efficiency.
  • Improved comments within the script
  • Moved the feed parser class (Last RSS) to a separate file for ease of maintenance.
  • Various code, formatting and commenting changes

Upcoming Changes

These are not currently prioritized, but I want to add these features/implement these revisions:

  • Add CRON abilities to pre-cache feeds instead of waiting for a request
  • Add ability to search multiple tags (AND & OR)
  • Add functionailty to add each day’s links into WordPress as a post
  • …(this is where your suggestions come in)

About this Entry

Posted:
9:31 pm on Monday, March 19th, 2007
Categories:
General
Interact:
Add a Comment
RSS 2.0
Trackback

Add a Comment

Replies

  1. Ian Delaney Says:

    OK. So how can I get this to automatically happen? Say every two days?

  2. Alex Says:

    Hi Ian, can you provide a bit more detail on the functionality you are interested in? At this point, the plugin will always display the latest links stored in Ma.gnolia’s feeds, which are updated every 30 minutes. So if you were to add this page to Ma.gnolia right now, it should show up on your site, via the plugin within 30 minutes or so.

    Does that answer your question, or were you interested in something different?

  3. Niptoon Says:

    Please join our Blog for discussions on topics about The Virtual Reality.
    Technology development of The Virtual Reality and its perspectives.

  4. Darren Says:

    Hi Alex,
    I’ve got the plugin installed and activated, but I’m getting ye olde “Unable to output bookmark list” error.

    I’ve got two bits of code running, including one that’s copied directly from your examples page. You can see what’s going on in the sidebar of this page:

    http://tinyurl.com/yp3sh8

    Any troubleshooting tips?

  5. Alex Says:

    Hi Darren, thanks for checking out the plugin! A couple of other things to check:

    1. Make sure that there isn’t a typo in your ma.gnolia account name in the collection option.
    2. Make sure that $rss->cache_dir in magnolia.php points to a directory that can be written to by your Web server. You may need to modify the permissions of that directory, or create a new one with the proper permissions.

    Could you post, or send me the PHP you have placed in your templates? That should make it easier for me to help you track down the problem.

  6. Darren Says:

    Thanks for getting back to me so quick. I’m pretty sure it’s option #2, as I cut and pasted the code from one of your examples to confirm that it wasn’t a typo on my part.

    I’ll check out the directory.

    This is the code I’m currently using:

  7. Darren Says:

    Hmm…that didn’t work out. I’ll shoot you an email with the code.

  8. Alex Says:

    Hi Darren, I haven’t seen the code come through, but I have some pretty tight spam filters. Have you sent it yet, or am I jumping the gun? :)

  9. Darren Says:

    I did send it, but we’re pretty sure it’s correct regardless. I’ve got a web guru on my end trying to diagnose the issue. I’ll get back to you when I know more.

  10. Alex Says:

    Hrrrm, well I guess it hit the spam trap. I’ve white listed your domain, so if you do end up needing me to help, feel free to re-send that code as it should get through.

  11. Jeremy Frank Says:

    Alex, this plugin looks great, however, I’ve got the plugin installed and activated, but I’m also getting the “Unable to output bookmark list” error. I believe my folder permissions are correct. I’m using the sample code from the first example on this site. Temp rss files are appearing in my wp-content folder.

    Any ideas?

  12. Jeremy Says:

    One additional piece of info: the contents of the cache file is only one line:

    b:0;

    Does this mean that the cache file isn’t being generated correctly, or does it mean that magnolia’s feed isn’t being read correctly?

  13. Alex Says:

    Howdy all! I apologize for the slow response to some of these problems. I’ve been investigating them as time allows in between a couple of other pressing issues.

    Jeremy - that does sound like the file isn’t being generated correctly. Double-check the settings you have in place within the plugin config, also make sure that your server is able to write to the directory that the cache file is stored in.

  14. Jeremy Says:

    I think the issue is my shared hosting environment (GoDaddy). I found on an obscure support forum that most shared hosting environments prohibit the “fopen()” call in PHP (which lastRSS uses).

  15. Alex Says:

    Ahhh, good catch Jeremy! That would definitely lead to the problem, and is likely the root of the issue for some other folks as well.

    At this point I don’t have the time to port hte plugin to use another option (Magpie comes with WP I believe), but if I get the opportunity I will see how viable that is. Also, there is rumor that the folks at Ma.gnolia may be adding some features down the road that would eliminate, or at the least, greatly reduce the need for the plugin altogether. We’ll see how that works out.

  16. Danny Zacharias Says:

    Is there a way to customize the plugin so that the display of the retrieved bookmarks order according to rating first and name second?

  17. Alex Says:

    Hrrrm, I don’t have the built-in at the moment, but I’ll take a look at the scripts and the feed over the next couple of days and see how feasible that would be. I haven’t tinkered with the ratings as I haven’t had any requests around them, so I don’t know how easy or hard the change will be to make. From what I’ve seen on Ma.gnolia, only a small slice of users take advantage of ratings, so this like a good feature as it may help add value to the ratings themselves.

  18. Chris Pallé Says:

    Hey Alex- Totally diggin’ the customize-ability of the plugin. It seems there is a really long lag, though. I’m guessing the RSS cache should be speeding that up, though. Maybe I have something wrong?

    I have the rss file in a separate folder that is writable.

    Any suggestions?

    Thanks,
    C

  19. Alex Says:

    Hi Chris, I think the issue is on the Ma.gnolia side of things. I was trying to use a Ma.gn olia feed for Feedburner and it kept timing out, as does a copy of the plugin running on my local box. Rather frustrating I know. Sadly, there isn’t much I can do about it.

    One thing that I am experimenting with, and that I alluded to above is an experiment that I am trying - using Feedburner as the host of my feed. Feedburner caches the RSS, so even when Ma.gnolia has issues, the feed is still available. I think it will also ease a bit of the traffic hitting the Ma.gnolia servers, which is a good thing too.

    If all goes well, I’ll post about the results.

  20. Chris Pallé Says:

    Update:
    Hey, think you’re right. Put the code back in and everything things to be humming a long just fine.
    Quick question, though. I noticed in your main feed you have ma.gnolia updates too. How did you get that working?

    Thanks, CP

  21. Chris Pallé Says:

    Hah. Nevermind, I just found a link in your related entries. Sweet. Thanks :-)

  22. Alex Says:

    I’m glad you saw the link Chris! I love that feature of FeedBurner, I can’t wait until they ADD the capability to merge two or more feeds as they’ve talked about for a while now. That should make for some great combinations and functionality. Yahoo Pipes is another interesting option.

  23. Robert Says:

    Thanx a lot. It functions properly. I just gave the php request a class in the template and it’s easy to style with CSS.

  24. Alex Says:

    I’m glad to hear it Robert!

  25. Thomas Says:

    Publishing a daily digest to my WP blog - thus I own the content - would make me move from delicous.

    Looking forward to see that in a future version.

    Thanks Thomas

  26. Alex Says:

    Hi Thomas, at this point Ma.gnolia actually provides this capability. If you look at my home page, you’ll see a couple of posts showing my Ma.gnolia links. These posts are coming straight from Ma.gnolia and are posted as normal content in my system. You may want to check it out by creating n account, and then going to the Blog Settings tab within the Account settings.

    Alternately, the Ma.gnolia API provides this capability, but I haven’t had a chance to play with it as of yet.

  27. Thomas Says:

    I was already wondering. Great - thanks for letting me know. Will give it a try.

  28. David Says:

    I have a blog and this plugin is very useful

  29. Alex Says:

    I’m glad you’ve found it useful David. Thanks for letting me know!

  30. dr.xero Says:

    hello alex.. nice plugin there..very useful, i use it on my site..

  31. Alex Says:

    Thanks dr. xero, I’m glad you like it!

  32. shadowX_19 Says:

    hello alex.. this is a very good plugin. i will use it now and by the way your theme really nice..

  33. Alex Says:

    Thanks for the kind words for the plugin and my site design shadowX_19!

Related Entries

Recent Books

  • Farthing
  • The 106 Mortgage Secrets All Homebuyers Must Learn--But Lenders Don't Tell
  • The Geek's Guide to Home Buying: Don't Be a Dummy! Get Twice as Smart for Half the Price! (The Geek's Guides series)
  • Chief of Station, Congo: Fighting the Cold War in a Hot Zone
  • The Arabian Nights (Everyman's Library)

Recent Music

  • Super Taranta!
  • Blueprint 2: The Gift
  • Fear Is On Our Side
  • Corinne Bailey Rae
  • The Orchard

SilverSpider.com is powered by WordPress, these great plugins and SilverSpider Play List
Site RSS Feed RSS: Entries and Comments