Relationship Management and "Buddy Lists" in Drupal

Error message

The spam filter installed on this site is currently unavailable. Per site policy, we are unable to accept new submissions until that problem is resolved. Please try resubmitting the form in a couple of minutes.

At the core of all the hype around "social networking," and "social media," is the fact that "social" websites allow members of a website to connect with each and develop relationships without needing the administrators or content editors to mediate these connections. This from the "build and they'll come," school of design and strategy. In any case, even though Drupal is a fundamentally social platform, there is no user-to-user relationship support in the core of Drupal.

This is probably not a problem: there are a lot of ways to conceptualize relationships on a website, and not all websites need the same set of social features. So flexibility is a good thing. Some sites may want and need facebook-like features for creating lists of friends, and some sites might need on-site activity lists, a la or LiveJournal's "friends-list" aggregator, or Facebook's "news feed." Or a site might simply want a way for users to bookmark other users. There are a lot of different approaches to social network management, and every site needs something different.

We're working on a really nifty site that needs to have some pretty rigorous social networking features. In addition to two-way connections between buddies, we needed private-messaging support, support for popularity-contest-esque voting, as well as recommend the site's content to other people. We decided that the User Relationships module was the only really acceptable solution for this site because of its extensibility and maturity, but this isn't to say that the development of this feature has been completely painless, but we'll get to that in a moment.

The User Relationships module is a very big sub-project and it contains a great deal of functionality. It connects with, and is supported by modules like the Activity module, which we've used to power the site's recommendation engine. In general, User Relationships allows administrators to define kinds of relationships (eg. friend, co-worker, family, and so forth) and the describe the terms of the relationship: for example, administrators can decide on a per-relationship type basis if the connection needs two-way approval or just one way approval.

The truth is that, the module itself has worked really well. We've had a few issues integrating the Activity module with users relationships. We've wanted to allow users to comment on their friend's activities on the site, a la Facebook "status comments" in the contemporary iteration of that site; this took a bit of massaging, but we've submitted a patch that remedies this issue. In spite of the challenge, the features and structure of this module have really made it possible to implement a first-class social networking environment in Drupal, and having these kinds of social networking features available in the platform is a very good thing indeed.