Barry Price, the creator of the Ma.gnolia plugin for WordPress has set its development aside and has encouraged me to adopt the project. As I use the plugin heavily on this site, and I enjoy development, I decided to take him up on it.
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.
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!
Make sure to join the Plugin group on Ma.gnolia to add your site to the list if you are using this plugin!
- Drop the entire plugin folder into wp-content/plugins/ – the final paths will be:
- Activate the plugin in the admin area of your wordpress install
This plugin is very basic at the moment, 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 pass the following variables to the plugin:
- $username is the Ma.gnolia account to use, this is typically your account.
- $numLinks sets the amount of links you want the tag to output, this defaults to 10.
- $showDescriptions tells the tag whether or not it should include descriptions in the output. This defaults to “Do Not Show”.
- $showPubDates tells the tag whether or not it should output the date the URL was bookmarked in Ma.gnolia. This defaults to “Do Not Show”.
- $useMagnoliaLinks 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”.
The output consists of an unordered list, each link contained in a separate list item tag.
Example of Usage
Here’s a snippet to output three bookmarks, with their associated descriptions from my bookmark list, regardless of the tag.
<?php magnolia('BaldTechnologist',3,1,0); ?>
<li><a href="http://www.flickr.com/photos/17328648@N00/sets/1737284/" title="Cool & Wacky Records - a photoset on Flickr:: No Description" class="ToolTip">Cool & Wacky Records - a photoset on Flickr</a></li>
<li><a href="http://www.fortymedia.com/blog/post/59" title="Attention Mapping: The 10-Point Exercise:: Attention is the most fundamental unit of design. Once you get past the color schemes, typography, layouts, graphical treatments, etc., it all comes down to guiding and shaping the viewer’s attention." class="ToolTip">Attention Mapping: The 10-Point Exercise</a></li>
<li><a href="http://haha.nu/misc/html-tags-illustrated/" title="HTML Tags illustrated:: A collection of photos that demonstrate HTML tags." class="ToolTip">HTML Tags illustrated</a></li>
<li class="MagnoliaLink"><a href="http://ma.gnolia.com/people/BaldTechnologist/bookmarks" title="Alex Jones on Ma.gnolia::Browse through the sites and pages that I have added to my bookmark list on Ma.gnolia. If you're a member, add me as a contact!" class="ToolTip">View my bookmarks on Ma.gnolia</a></li>
Five Bookmarks Tagged with “Design”, No Descriptions, Pointing to the Original URL
<?php magnolia('BaldTechnologist',5,0,0,0,'design'); ?>
Ten Most Recent Bookmarks with their Descriptions and the Time they Were Saved to Ma.gnolia, Pointing to the Link’s Ma.gnolia URL
<?php magnolia('BaldTechnologist',10,1,0,0,'History'); ?>
Barry Price built the first version of this plugin, and what you see here is a a modified version of his work the Last RSS Parser, which does much of the heavy lifting. At this point, Alex (BaldTechnologist on Ma.gnolia) has 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!
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.
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
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 the ability to pull from groups in addition to by tags
- Documentation with some examples
- Improve configuration options
- …(this is where your suggestions come in)