Nucleus XBEL Reader 0.10
Wednesday, 27 October 2004
Ever wanted to publish your bookmarks on your blog? I’ve created a Nucleus plugin just for this purpose. Instead of using some weird non-standard solution, I decided to base the plugin on an existing standard called XBEL. This standard defines the contents of a bookmarks file in XML format.
There are already existing tools for creating XBEL files, some even offering the ability to export existing bookmarks from browsers. For example, for Firefox – my main browser – I use the Bookmarks Synchronizer extension. This extension allows me to select an existing folder from my bookmarks and export it as an XBEL file to an FTP server. It even offers the ability to do this automatically every time the browser is closed. So set it up once and it will keep the XBEL file on the FTP server up-to-date.
This is where the XBEL Reader plugin for Nucleus comes in. It takes the XBEL file on the server and displays it in your weblog. That’s all there is to it. Simply configure the plugin and specify the location of the XBEL file on the server and place the following code somewhere in your skin
- Mozilla stuff
- Nucleus CMS
- Surfin’ Safari
- Ars Technica
- Mac Rumors
The output of the plugin is entirely customizable. The example above is just the default output generated by this plugin, styled with clever CSS definitions. You can specify which HTML tags it generates and how it should display the contents of the XBEL file. For example, you can use nested folders, but you can also display the contents as simple list. Also, if the bookmarks in your browser used separators, you can choose whether you want to show these or not… Same thing applies to the title of the root folder.
Reading of Firefox Livemarks
Firefox has a great feature called Livemarks. They look like folders, but the contents is automatically generated from an RSS or Atom feed. It allows you to keep up-to-date on the headlines of your favorite website without even visiting that particular site. If you see a headline you like, simply click on it and it will be shown.
The XBEL Reader plugin can also handle Livemarks that are exported to the XBEL file. It will automatically detect them and can optionally retrieve the RSS or Atom feeds and present the contents as a folder with bookmarks, just like Firefox does. In other words, The XBEL Reader contains a complete RSS and Atom reader!
Provide a RSS feed for your bookmarks
An additional feature of this plugin is the ability to export the XBEL data as a RSS feed. Combined with Firefox’s Livemark function you can now share your favorite bookmarks with the whole world. Add one your bookmark to own browser and will automatically appear in every browser that is registered to your bookmarks feed. To enable this feature you only need to add one parameter to the existing
xml-rss2.php file. Instead of calling it directly you need to call it as
xml-rss2.php?xbel=yes. A one line modification in your skin’s will even allow auto-discovery of this bookmark feed:
<link rel="alternate" type="application/rss+xml" title="RSS - Rakaz.nl Feed" href="xml-rss2.php" /> <link rel="alternate" type="application/rss+xml" title="RSS - Rakaz.nl Bookmarks" href="xml-rss2.php?xbel=yes" />
How to install it
Download the file
XMLPlugins.zip, extract the files and place them into the plugins folder of your nucleus installation. Go to the management console and the plugin section. First of all, install
XMLSupport and finally install
The two plugins should appear in the list of currently installed plugins. In this list you can also edit the options of these plugin. The most important option is the location of the XBEL file. By default the plugin assumes you have placed it in the root folder of your Nucleus installation. The default name is
bookmarks.xbel. If you don’t have an XBEL file yet, you can use this one for testing.
To actually use the plugin you must edit the skin of your blog. Simply include, in a convenient place the skin var
<%XBEL%>. Nucleus will then replace this with your bookmarks.