Drupal blogroll and blog import from LiveJournal

I need some help with Drupal…

Blogroll Friends list Block

This is the simpler of the two problems. I use the Drupal aggregator module to create a blogroll of blogs I read at http://tola.me.uk/friends. On the front page of my website I’d like a “friends” block on the right hand side which lists the names of all the feeds in my blogroll with a link to respective websites. So far I can only see how to make a block which displays recent blogroll posts.

Do I need to write my own PHP block to do this (I’ve found a function in the aggregator API which does something similar and I’ve nearly figured out how to tweak it) or can I do it more simply with a view which presents itself as a block? Surely this is a pretty standard thing to want to do, list feed sources.

Import Blog from LiveJournal

I’ve asked this on Drupal forums but had no reply yet, so I thought I’d throw it to a wider audience.
I’d like to import nearly three years worth (219 entries) of my LiveJournal to my new Drupal powered blog. LiveJournal allow you to export entries as either CSV or XML files, a month of entries per file (that’s 33 files for me).

There is a page entitled Migrating from LiveJournal on the Drupal web site, but I think it may be slightly out of date. It offers three methods of migration:

1) Use IFRAMEs – not really what I want
2) Using Node Import – by using an RSS feed it says that the actual content will still be hosted at LiveJournal, which isn’t what I want. I think it’s also now out of date because contrary to what it says, RSS feeds are now available to all LiveJournal users.
3) Use the Livejournal Module to import the raw data into Drupal – This sounds like the best method. Unfortunately, the module is no longer available or maintained.

I’m now thinking that my best option is to use the Node Import module to try and import the CSV or XML files, but I have no idea how to do it and the documentation for that module doesn’t mention supporting the blog post content type. Alternatively, the new Import/Export API module might do this?

If I can use the Node Import module, What XML format do the blog posts need to be in to be imported and what date format do they need to use?

I don’t think I will be able to preserve all LiveJournal features like “tags” because they don’t appear in the exported XML files, but I’d quite like to convert all instances of a custom [lj user=”joebloggs”] tag with an [a href=”http://joebloggs.livejournal.com”] tag. This makes me wonder if I should somehow utilize the RSS feed of the blog which already has this conversion done, as well as other useful things like a link to the original LiveJournal post and comments.

If I have to write my own module to do this in Drupal 4.7, might this be a good use of XSLT? I’ve been meaning to play with that for a while.

Leave a Reply

Your email address will not be published. Required fields are marked *