I've been doing some hand fiddling with the Drupal comments file recently and have needed to rebuild the statistics and the tread field in the comments table. Where there are many scripts I've found to rebuild comment_statistics, there's little out there on rebuilding the comment thread field (which at first looks like a little black magic). I've built a script which walks all nodes and rebuilds both. (Parts of the script are mine, parts are lifted out of comments.module parts are bits of code I've found on drupal.org).
One thing I wanted to do on the new seanreiser.com was have flickr sets as first class nodes. Nothing against the way the flickr module and flickr sets module creates a page flickr sets page, I just wanted something a little different. Quite frankly I wanted access to all the viewsy goodness drupal can give. Also as flickr doesn't provide an RSS for flickrsets I can have Drupal provide it for me.
A PHP class to wrap the Disqus. Documentation coming soon.
I've spent some time today ubuntu 8.04 (Hardy Heron) on an eeePC 901. All the information on how to do it is out there but scattered across a number of websites so I'm putting together a quick howto. The ubuntu site has a lot of information on 700 and 900 but not a lot on 901. As the hardware is mostly the same for the 1000, I suspect that a good deal of this will work on that unit, but I have no practical experience with the 1000. I am assuming that you have some linux knowledge and are relatively comfortable in a terminal.
There are a number of ways of doing this. The eee doesn't have a CD/DVD drive and I didn't have a USB drive handy so I did the install off a USB Stick.
Work's been busy so I haven't posted much. I have 20 half written posts in my queue to finish... maybe some writing on the plane to Austin later in the week, when I visit Dell.
As I get a lot of traffic for integrating Disqus and Drupal I wanted to help publicize Rob Loach's Disqus Module. It looks like it's for Drupal 6 only right now, so you'll still need my hacky howto if you're planning on using Drupal 5, but if you're using Drupal 6, Rob's module is the way to go!
Thanks Rob!
As regular readers of my blog know I'm using Drupal's ActivityStream module to power the Life Stream page on my site. I've wanted to add an activity stream block and remove the twitter / lastfm blocks for a while now, but haven't gotten around to it until tonight. It's a short function but I figure I'll post it in case someone else is looking for it.
Just add the following function to activitystream.module
When I added disqus to seanreiser.com I thought it was simple, but one of my tweeps asked for a howto so maybe it wasn't . Also I seem to have had a few hits on from google searching on "disqus drupal". So for the curious here's are the steps I followed.
I noticed that items from my activity stream were popping up in the last viewed (and potentially most popular content). As I'd rather not show these items I've changed statistics_title_list in drupal's statistics.module as follows:
function statistics_title_list($dbfield, $dbrows) {
return db_query_range(db_rewrite_sql("SELECT n.nid, n.title, u.uid, u.name FROM {node} n INNER JOIN {node_counter} s ON n.nid = s.nid INNER JOIN {users} u ON n.uid = u.uid WHERE %s <> '0' AND n.status = 1 and (n.type = 'story' OR n.type = 'page') ORDER BY %s DESC"), 's.'. $dbfield, 's.'. $dbfield, 0, $dbrows);
}
Since the beginning of the year I've written 3 small scripts that create RSS feeds w/ media enclosures out of sources without such feeds. In some cases the scripts are a little wanky because they rely on screen scraping to get the job done. I hadn't released the code since I always planned on doing more with it. As I haven't gotten around to it, I suspect I never will. As the scripts are working I might as well release them to the world at large. This is not the best code I've written, it just gets the job done.
Although I don't comment much about religion here, I feel a need to post this so folks know it's out there.
Recently I have been attending The Church of the Heavenly Rest here in New York City. One of the interesting things about the church is that they post their sermons on the Media and Communications Page or their site. On the down side, they don't have any xml feed available so I'd have to remember to download to go the the site, download the mp3, add it to iTunes, etc etc. So, always a person to spend a couple of hours scripting something to save 5 mins of time, I wrote a script that scrapes the page, and creates an iTunes compatible RSS feed with enclosures. In addition to the mp3 files, any PDFs posted on the site are also included in the feed. I'm running the script once a day so there might be some delay between something being posted on their site and mine.
Sean Reiser, 40, is a developer, technologist, and amateur photographer. Sean has spent the past 20 years as a programmer, system architect and development manager. He is a life long New York resident.
Sean currently serves as the President and Chief Geek Officer of Repair Sense, Inc.. Please go to that site with any professional inquiries.
Sean can be found using a number of social networks. These are the ones he's most active on: