Creating A View To Display a Users Buddies to Other Users

Gregory Heller Profile Photo
Gregory Heller

on

September 9, 2008

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:
<?php
if (arg(0) == 'user' && is_numeric($uid = arg(1)) && arg(2) == '') {
  return array(
$uid);
}
?>
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.

Share it!

ı have followed your writing for a long time.really you have given very successful information. In spite of my english trouale,I am trying to read and understand your writing. And ı am following frequently.I hope that you will be with us together with much more scharings. I hope that your success will go on. Türkiyenin en gelişmiş en popüler oyun sitesi olan oyun cambazında bedava oyun,oyun,oyunlar ve birçok aktiviteleri bulma olanağı sağlıyor.Sizde oyuncambazına gelin oyun oynamanın tadını çıkarın. | Oyunlar | Oyun | Çocuk Oyunları | Makyaj yapma oyunları | Giysi Giydirme oyunları |
thanks
Thanks Benjamin, I fixed it. mirc
nice site well done
The activity of social networking, which was not invented a few years ago on the internet, involves developing relationships, fostering conversations, sharing experiences chat - sohbet - sohbet kanalları - sohbet odaları earning and teaching ----- chat
We were able to create a custom view with the argument "Buddylist2: Nodes author is buddy of UID" sohbet that used the following custom argument
Just a note that the <span class="searchword1"> stuff should be left out, and the &&amp; should just be an & benjamin
Thanks Benjamin, I fixed it.