Creating A View To Display a Users Buddies to Other Users

I’m working on a site that will launch soon that features some social networking functionality, including friend lists. We are using the Buddylist2 module and while there are some default blocks for things like “My Buddies” that show a user their buddies, there was not a similar block that would show one user another user’s buddies.

We were able to create a custom view with the argument “Buddylist2: Nodes author is buddy of UID” that used the following custom argument handling code:

This worked for us because the view, which creates a block, is only displayed when you are looking at a user’s profile, which is a nodeprofile node authored by the user.

Discover more from Gregory Heller

Subscribe now to keep reading and get access to the full archive.

Continue reading