In the past, I’ve used a bookmark synchronizing Firefox extension to upload an XBEL (XML) file to my web site each time I opened or closed Firefox. Everything worked great, but the number of bookmarks I had was getting very large very quickly, and uploading/downloading the XBEL file took longer and longer. It also took longer to load Firefox due to the amount of bookmarks it had to load on startup. Finally, I got fed up with it. I started searching for some sort of way to efficiently manage all these bookmarks and get the content I wanted to read on a daily (or even hourly) basis. Guess what I found…
Introducing Bloglines
A colleage of mine, Matt, posted an entry with a link that explained how to use Bloglines to keep track of my bookmarks. Skeptical but interested, I visited. Much to my surprise, Bloglines didn’t just look good, but it worked extremely well! I had expected it to be another run-of-the-mill, nothing-extraordinary service that I would end up forgetting about later on, but that proved not to be the case.
The tutorial helped me get a jumpstart on just why the site exists, to begin with. It’s not del.icio.us part 2, like I had previously thought. It is more of an RSS aggregator with a massive heap of features at your disposal. I highly recommend you sign up and at least give it a shot. If you think your Firefox Livemarks are sufficient, think again. When you get about 90 or more RSS feeds, you’ll know exactly what I’m talking about.
The API
One of the “big things” going around right now is APIs. Amazon has one, Google has one, eBay has one, and Bloglines has one. (Other sites have them, too, but those are the popular ones that come to mind.) The powerful thing about APIs is that they give developers access to cross-site information, which is very important for any site like Amazon, Google, eBay, or Bloglines. Equipped with an API, we can take information that we work with and store elsewhere and process/utilize that information on our own site. You have to agree, this is extremely convenient.
With Bloglines, you can take any username (and optionally any folder), and output them in an HTML format. Have a look at mine (or just my blogs folder). Awesome! Now we can just run a PHP include to get that HTML output on our site, right?
The Problem
Unfortunately, there is a slight inconvenience with the output result that we get from Bloglines. The output is a bunch of DIV’s! We know that this should obviously be an unordered list and not a bunch of DIV tags. This means that a simple “include my blogroll” won’t be sufficient if you want your web site to stay semantically correct. Additionally, you may wish to only output a specific number of blogmarks at any given time. The API doesn’t permit this (although you can separate a specific number of blogmarks in another folder at the Bloglines web site, it is not as convenient to create so many folders).
The Solution
Introducing BlogLiner (yes, you read that right: BlogLiner). What does BlogLiner do? It’s a Wordpress plugin that makes the Bloglines output into a pretty unordered list. Results are output exactly as you order/manage them on the Bloglines web site, so you manage your blogmarks as you would normally, and they’ll be output the same way on your blog. Oh, and yes, you can output just one folder or every folder you have on Bloglines. The only requirement is you have to have Wordpress to use the plugin. (If you’re a tricky fellow, you might take the source code and modify it to work in your own blogging software, though.)
Installation
First, download BlogLiner, unzip it, and upload the PHP file to your /wp-content/plugins/ directory. Then login to your Wordpress admin area and activate the plugin. Click the “Plugin editor” tab, select to edit the “BlogLiner” plugin, and change the settings appropriately. The four settings are your username, the folder you want to show as your blogroll (if you want to show all folders, leave the second variable empty), whether or not you want to show your support for Bloglines by including a link back to them at the end of the blogroll, and how many new blogroll entries you want to display. After you’ve done that, go to your theme editor and decide where you want to output your blogroll. Just pop this code there, and hit the update button:
<?php bloglines_roller(); ?>
You’re Done!
That’s it! There’s nothing more to it, thank goodness! Enjoy it, report bugs, suggest features, and let me know what you think about it!
Update!
I’ve updated the ZIP file. BlogLines now supports a URI-type command so that you can not only specify default settings, but override those settings by sending variable/value pairs to the function via var=value&var2=value2. There are examples in the new BlogLines.php plugin file of how to use it. Enjoy!
Update Again
I know it’s kind of obvious, but I just wanted to note that this extension is available for Textpattern, thanks to Bob.
Another update
I updated the plugin to version 0.2. There’s only one new feature, and that is folder titles appear when all folders are displayed.

An extension already? Bravo. I’d try it, but I don’t use Wordpress. =P
May 5th, 2005 at 10:17 pm
And the moral of the story is, use Wordpress. ;)
(Alternatively, you might download my code and integrate it into your own blogging system as mentioned in my post, though that does require some decent PHP knowledge. I think you can do that, Bob.)
May 5th, 2005 at 10:54 pm
Hmm, it’s late. Didn’t dig into your code, but modified it for Textpattern.
wdhaven.com/blogliner.php.txt
Now it’s a textpattern plugin as well.
May 6th, 2005 at 12:55 am
Good work Jona, and thanks Bob, now I can use it too– If everything goes to plan expect it on my site soon.
May 6th, 2005 at 6:02 am
I made some modifications to it and will updated my entry sometime today with a new version of the plugin. Also, thanks for the TxP port, Bob. Told ya you could do it. ;)
May 6th, 2005 at 8:10 am
Jona, you suck, you made me actually do something. Gosh!
I think the textpattern version is cooler, you can change the username, folder, limit, and show support options on a per-tag basis. And in version 0.1! Oh yeah!
May 6th, 2005 at 12:24 pm
Actually, it’s version 0.2 now.
May 6th, 2005 at 12:29 pm
Uh, that’s my point. I added that in the Textpattern port in version 0.1, you waited until 0.2. That makes me cooler than you. =P
May 6th, 2005 at 12:58 pm
Oh. Darn it! Darn YOU!! You and your coolness!!
May 6th, 2005 at 1:00 pm
Lol yeah I saw that. I thought to myself, “man that bob guy is really on top of things” ;o). Again, great job Jona.
May 6th, 2005 at 4:37 pm
awesome plugin. importing the BL xml ans then managing the links was not so hot. Your plugin works great! the div to li code is wonderful.
thanks!
May 19th, 2005 at 2:01 pm
Hmm i can’t appear to get this to work, even using the default setting still get an error :S
May 21st, 2005 at 5:11 pm
Hi Dave, what error are you getting?
May 21st, 2005 at 5:55 pm
hey jona, I’m getting an error also, you can see it here: Quality Peoples.com in my sidebar. You can see the output and then cut and paste that link into the location bar and it works fine.
For some reason, it worked and then stopped working. I don’t know what i did to break it. I thought that maybe it was a BlogLines thing. any ideas?
May 29th, 2005 at 11:50 pm
Ed, if you didn’t change the plugin’s code, I can’t imagine why you’d be getting this error. Maybe you can email me the code?
May 30th, 2005 at 1:23 am
hi jona, let me make sure i didn’t mess with the code. i’ll uninstall the plugin and reinstall it again.
May 31st, 2005 at 12:21 am
A very useful plugin - saves me having to import my feeds from BlogLines. But I have a couple of quibbles, if you don’t mind!
View the plugin in action on my site…Notice the gaps in the list? On BL, I have several folders of grouped feeds, but they don’t seem to come through using the plugin. Would there be any way to fix that?
Also, you may want to escape HTML entities, since some feed titles have HTML characters in them, such as
June 22nd, 2005 at 8:41 pm
I mean & and <
June 22nd, 2005 at 8:42 pm
Grant, those gaps are LI’s that contain UL’s. This is the proper HTML for grouping multiple nested unordered lists. The UL itself becomes a list item within the list. The LI’s that contain the UL’s have a class of “bloglinesfolder,” so you can style your CSS to change those gaps. As far as HTML-proofing, I suppose I can do that, though it appears that Bloglines does it for me already — so there isn’t really any need, as far as I can see.
June 23rd, 2005 at 8:36 am
My remark about HTML-proofing comes from a particular entry in the list…Notice near the bottom of my links page, just after A List Apart and 456 Berea Street, an entry labeled “all in the”…The name is actually “all in the <head>”, with the actual angle brackets in place. So the end of the listing is missing, and there is an error, since the browser thinks there is an actual HEAD element in the middle of that link.
June 23rd, 2005 at 6:30 pm
What’s strange, Grant, is that my Bloglines blogroll doesn’t do the same thing. In Bloglines, I have all in the , and if you look at my complete blogroll you can see that shows up fine. I thought Bloglines automatically converted HTML? My misunderstanding is from the apparent inconsistency, really. I don’t understand why it works for me but not for you. There must be a small difference somewhere that I can’t seem to pinpoint…
June 23rd, 2005 at 10:55 pm
Yeah, the all in the <head> works for me using BlogLiner too.
June 23rd, 2005 at 11:28 pm
Hmm. I seem to have solved the problem. I went into BlogLines and removed the subscription to that site, and then added the subscription again. And the link appears fine in my blogroll now. Weird.
June 24th, 2005 at 11:23 am
Oh Crap!
The Plugin doesn’t works.
My hoster doesnt allows directly including of Webpages :(.
August 17th, 2005 at 5:23 am
You’ll have to contact your host about that. It’s a configuration issue.
August 17th, 2005 at 8:57 am
Um… I can’t seem to get single-folder display to work, which is strange because when I leave the folder config blank the whole set displays fine — but without displaying folder names.
Has anyone else reported such a problem? The example I tried was “other places I post” from my public subs under the name “gordsellar”. It’s not working no matter how much I tweak.
September 22nd, 2005 at 1:14 pm
Oh, and by the way, it’s still an excellent plugin. :)
September 22nd, 2005 at 1:17 pm
I’ve updated to the new plugin but it seems the php function doesn’t call, either within post content (maybe it’s not supposed to) or within templates (like at the bottom of the sidebar on my front page). Why might that be?
September 27th, 2005 at 11:13 pm
You’ll need the Run PHP Wordpress plugin to run PHP within your posts. Once you install that plugin and enable PHP for that post, the PHP will be processed and show your blogroll.
September 27th, 2005 at 11:49 pm
Cool and wonderful! Thanks so much! This is rock ‘n’ roll.
October 1st, 2005 at 12:01 am
[…] Blogliner […]
November 20th, 2005 at 11:19 pm
I’m getting an error, it looks like the $file = @file($url) line is not working. But if I try to access the $url from my browser it works fine.
November 24th, 2005 at 2:45 am
Fixed it, just needed to change this:
allow_url_fopen = On
It was “Off” before by default in Gentoo
November 24th, 2005 at 2:51 am
One small problem, the URLs have ampersands in them, but it should be &, in order to be XHTML 1.0 transitional compliant.
What php code can I use to do this? There must be some function that already exists to do this.
November 24th, 2005 at 3:35 pm
Dave, you can use the following code to convert all &’s in a string into &’s.
$str = str_replace('&', '&', $str);
You can change the title of the blog you subscribed to through your Bloglines account to remedy the problem instead, though. (E.g., use “and” instead of using the ampersand.)
November 24th, 2005 at 5:02 pm
Jona,
Using “and” instead of & won’t help. The ampersands are used to separate arguments in the URL in the usual way, not as part of the blog title.
November 28th, 2005 at 3:06 pm
Oh, I understand now, Dave. Thanks for the email. I’ll make the changes and issue an upgrade once I’ve tested it out. Thanks again.
November 28th, 2005 at 3:32 pm
I just tested 0.3 and it does generate XHTML 1.0 transitional compliant code for me. Thanks a lot Jona.
November 28th, 2005 at 5:59 pm
[…] A- C A Different Monthly Archive Script (www.oneofthosedays.org.uk/projects/plugin-archives) Adhesive (redalt.com/wiki/Adhesive) v3.0 Akismet (akismet.com/) 1.1 (Duh!) Akismet Spam Count (cavemonkey50.com/code/akismet-spam-count/) Angsuman’s Referrer Bouncer (blog.taragana.com/index.php/archive/word-press-1-5-plugin-referer-bouncer) Auto Links (www.headzoo.com/) Autohyperlink (journalphoenix.com/40/autohyperlink) Bad Behavior / Bad Behaviour (www.ioerror.us/software/bad-behavior/) Bad Behavior Stats (www.ajaydsouza.com/wordpress/plugins/bad-behavior-stats-plugin/) BlogLiner (www.slightlyremarkable.com/2005/05/introducing-blogliner) 0.2 Blogs Of The Day (blogsoftheday.com/) All Versions I assume. Brian’s Latest Comments (meidell.dk/archives/2005/03/21/brians-latest-comments-15/) 1.5.5 and 1.5.8 CA-StarDate (www.funponsel.com/blog/archives/2005/05/02/ca-stardate/) Cricket Moods (dev.wp-plugins.org/wiki/CricketMoods) CG-Amazon (www.chait.net/index.php?p=238/) CG-FeedRead (www.chait.net/index.php?p=238/) CG-Inline (www.chait.net/index.php?p=238/) CG-QuickPHP (www.chait.net/index.php?p=310/) Countdown (redalt.com/downloads/) Counterize (andersdrengen.dk/projects/counterize) 0.31 (Create wp_images directory in root) D - F del.icio.us - Bookmark this! (www.arnebrachhold.de/2005/06/05/delicious-bookmark-this-wordpress-plugin) 1.0 del.icio.us Cached (www.w-a-s-a-b-i.com/archives/2004/10/15/delisious-cached/) 1.4 Download Manager (guff.szub.net/download-manager/) R1.beta2 Dunstan’s Time Since (binarybonsai.com/wordpress/time-since/) 1.1 Editor Search (www.theoneandtheonly.com/wordpress-editor-search/) 1.3 Extended Live Archives (www.sonsofskadi.net/index.php/extended-live-archive/) 0.10 Beta-r5 Favatars (dev.wp-plugins.org/wiki/favatars) 2 flickrRSS (eightface.com/code/wp-flickrrss/) 2.3 Fold Page List (http://http://www.webspaceworks.com/resources/cat/wp-plugins/30/) 1.0.1 G - K Get Recent Comments (blog.jodies.de/archiv/2004/11/13/recent-comments/) Google Analyticator (cavemonkey50.com/code/google-analyticator/) 1.3+ Google Sitemaps (www.arnebrachhold.de/2005/06/05/google-sitemaps-generator-v2-final) 2.7.1 Gravatar (www.gravatar.com/implement.php#section_2_2) 1.1 Gravatars (www.skippy.net/blog/2005/03/24/gravatars/) 2.6 Headline Images (www.coldforged.org/image-headlines-plugin-for-wordpress-15/) Hello Dolly (wordpress.org/#) 1.5 (Duh!) Hirji Date (www.usayd.com/pluginshacks/hijri-date/) InScript (www.urbangiraffe.com/plugins/inscript/) 1.7 intouch (adahas.com/work/intouch/) 1.1 Intypo (mymykry.links-ab.de/kategorie/intypo/) Jalenack’s Wordspew (blog.jalenack.com/ajax/) 1.16 L - O Lazyest Gallery (lazyest.keytwo.net/) Tested 0.7.1 and 0.8 Links Page (www.asymptomatic.net/wp-hacks/) List Subpages (robm.me.uk/projects/plugins/wordpress/list-subpages/) LiveCalendar (www.jonabad.com/livecalendar/) Tested 1.8 and 1.8.5 Miniblog (mediumbagel.org/?page_id=16) MtDewVirus’ Most Commented (mtdewvirus.com/code/wordpress-plugins/) 1.02 MyNetflix (www.jimmyoliver.net/mynetflix-plugin/) Nice Categories (txfx.net/2004/07/22/wordpress-conversational-categories/) 1.5.1 No Ping Wait (somethingunpredictable.com/wp-no-ping-wait/) Now Reading (robm.me.uk/projects/plugins/wordpress/now-reading/) Obfuscate E-Mail (www.coffee2code.com/wp-plugins/#obfuscateemail) Optimal Title (elasticdog.com/2004/09/optimal-title/) P - S PJW Wordpress Version Check (blog.ftwr.co.uk/wordpress/wp-version-check) Popup Image Gallery (www.yellowswordfish.com/index.php?pagename=popup-image-gallery-plugin) 2.2 Post Teaser (dev.wp-plugins.org/wiki/PostTeaser) Qdig-WP (randomfrequency.net/wordpress/qdig/) 0.5 Quick Post (cjbehm.dyndns.org/wingingit/quick-post/) Random Header (www.martinet.nl/wp-site/random-header-plugin) Random Posts (www.w-a-s-a-b-i.com/archives/2004/05/27/wordpress-random-posts-plugin/) 1.1 McMike’s Random Quote (www.mcmike.nl/?page_id=40) Random Talk (http://http://mangasverdes.es/codigo-wp/random-talk) 1.0 MtDewVirus’ Recent Posts (mtdewvirus.com/code/wordpress-plugins/) 1.07 Redirect to Page (cavemonkey50.com/code/redirect-to-page/) Related Posts (www.w-a-s-a-b-i.com/archives/2004/05/26/wordpress-related-entries-plugin/) 1.3.3 (Had to update the database manually, but this is possibly due to a custom database prefix) Scrobbler (leflo.de/projekte/scrobbler/) 1.3 Scrobbles (robm.me.uk/projects/plugins/wordpress/scrobbles/) SearchHistory (andersdrengen.dk/projects/searchhistory) 0.17 Search Everything (dancameron.org/searcheverything/) 0.01 Search Pages (randomfrequency.net/wordpress/search-pages/) 0.1 Shire Reckoning (www.allyngibson.net/?p=335) 0.5 Sideblog (katesgasis.com/2005/10/24/sideblog/) SimpleSearch (beaucollins.com/notes/2005/11/19/simplesearch-a-simple-full-text-solution/) 1.0 SimpleTags (www.broobles.com/scripts/simpletags/) 1.1 (See #1618 (trac.wordpress.org/ticket/1618) — need to edit wp-admin/admin-header.php to allow tagging within posts) Smart Count (wp.marcosmedia.com.ar/plugins/smart-count/) Spam Karma 2 - Reloaded (unknowngenius.com/blog/wordpress/spam-karma) (Tested 2.1 Beta 1 and seems to work fine except for comment_count updates) comment_count updates are fixed by using this SK2 plugin - lair.fierydragon.org/2005/11/sk2-wp2compatibility/) StatCounter for WordPress (citizenk.wordpress.com/wp-plugins/statcounter-for-wordpress/) 1.0 Structured Blogging (www.structuredblogging.org/) Subscribe To Comments (txfx.net/code/wordpress/subscribe-to-comments/) 2.0.2 (May need to have his text strings redefined in options panel, but otherwise works fine) Ryan Boren’s Theme Switcher (boren.nu/archives/2004/10/13/theme-switcher-plugin/) (partially works : it disables the “Current theme option” admin link) T - V Textile 1 (www.huddledmasses.org/) Trackping Separator (notes.mk-notes.com/tsp) Ultimate Tag Warrior (www.neato.co.nz/ultimate-tag-warrior/) 2.8.7 (Applied this patch (www.neato.co.nz/forum/read.php?4,114,115#msg-115) to solve ” ” problem) Note : release 2.8.8 solves this problem no more patch needed Ultimate Tag Warrior (www.neato.co.nz/ultimate-tag-warrior/) 1.3 Legacy Ultimate Tag Warrior: Tag Archive (www.neato.co.nz/ultimate-tag-warrior/) 1.0 W - Z Weighted Categories (www.hitormiss.org/projects/weighted-categories) 1.2 Witty Text (www.w-a-s-a-b-i.com/archives/2004/05/27/wordpress-random-witty-text-plugin/) Weather.com Plugin (www.didcoe.id.au/?post_id=19) 1.5 WeatherIcon (www.viper007bond.com/wordpress-plugins/weathericon/) 2.3 WebSTAT Tracker (cavemonkey50.com/code/webstat-tracker/) WordPress Database Backup (www.skippy.net/blog/category/wordpress/plugins/wp-db-backup/) 1.7 WordPress Mobile Edition (www.alexking.org/index.php?content=software/wordpress/content.php#wp_120) WP Admin Bar 2 (mattread.com/archives/2005/03/wp-admin-bar-20/) WP-Amazon (manalang.com/wp-amazon/) WP-Cron (www.skippy.net/blog/category/wordpress/plugins/wp-cron/) 1.4 WP-Dash (somethingunpredictable.com/wp-dash) (Recent Posts widget causes database errors) WP-Dash World Time (www.viper007bond.com/wordpress-plugins/world-time-for-wp-dash) WP Flickr Post Bar (tantannoodles.com/toolkit/wp-flickr-post-bar/) 0.3 (does not work with the WYSIWYG on) -> Possible solution? (wordpress.org/support/topic/50093) WP Grins (www.alexking.org/index.php?content=software/wordpress/content.php#wp_120) (need to change path around line 34 to /wp-includes/images/smilies/ from the default of /wp-images/smilies/, otherwise fine) wp-icq-status (blog.tassoman.com/78,wp-icq-status) WP SpamAssassin (www.ioerror.us/software/wp-spamassassin/) WPG2 (wpg2.ozgreg.com/index.php/Main_Page) WordPress/Gallery2 integration - tinyMCE (the rich text editor) filters wpg2 tag […]
December 17th, 2005 at 1:28 am
Excellent plugin. I highly recommend to bloggers. keep the good job!
January 22nd, 2006 at 1:39 am
Good working!!
I am proud be to Deaf :)
June 6th, 2006 at 7:44 pm
Very useful and interesting plugin, but you might make it CURL-aware, because almost every host nowadays block fopen for URLs.
I’ll try to modify the plugin by myself. If I succeed I’ll send the modified code to your evaluation. Thanks.
June 24th, 2006 at 11:01 pm
Me again.
Not that hard to make your plugin CURL-aware. :-)
Where you have a call to @file($url) in the form
if ($file=@file($url)){
do the following:
$ch = curl_init();
$timeout = 0; // set to zero for no timeout
curl_setopt ($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
$file_contents = curl_exec($ch);
$url_close($ch);
if ($file = explode("\n", $file_contents)){
Instead of using the function file() you are now grabbing the URL from the Internet using CURL, and exploding it based on new line character.
I hope this snippet can be useful for someone.
June 24th, 2006 at 11:29 pm
[…] Duas mudanças visuais no Blogue: o novo arquivo graças ao plugin (A Different Monthly Archive Script) e um novo blogroll, graças ao BlogLines e ao plugin BlogLiner, que faz o trabalho de buscar o os dados do meu blogroll público do Bloglines e formatá-los numa lista não-ordenada padrão do WordPress. […]
June 25th, 2006 at 12:12 am