Museums and the Web

An annual conference exploring the social, cultural, design, technological, economic, and organizational issues of culture, science and heritage on-line.

You are hereConferences on-line and on-site / buddylist

buddylist


jtrant's picture

By jennifer trant - Posted on 22 March 2006

just installed the buddylist module:
http://drupal.org/handbook/modules/buddylist

Buddylist: list your social network
Drupal 4.6

Buddy list enables users to add buddies in their social network to their user account. Users can maintain a list of their buddies and keep track of what their buddies are posting to the site. They can also track their buddy's buddies and thereby explore a social network.

You can add buddies via user profiles. The administrator must enable viewing users profiles to be able to use the buddy list option. On the View tab of the user profile, there is a Buddy list section. One of the buddy list actions is Add Buddy. Select this action to add a user to your buddy list. Administrators can also enable the Buddylist block, or Recent Buddy Content. This block allows you to see a list of your buddies and content from your buddies respectively. An administrator can also enable the Friends Of A Friend (FOAF) module to allow for sharing of buddy lists between different social networking applications.

You can

* add a buddy by looking at user profiles.
* allow users to view profiles in administer >> access control >> permisions.
* enable the buddy list blocsk at administer >> block.
* administer the buddy list block at administer >> settings

jtrant's picture

5. Optionally add the following theme function to your PHPTemplate's template.php file:

function phptemplate_username($object) {
global $user;
/* Use the default theme_username for anonymous users, nodes by this user */
if ($user->uid == 0 || $object->uid == $user->uid || $object->uid == 0) {
return theme_username($object);
}
if (!user_access('maintain buddy list')) {
return theme_username($object);
}

/* an array, keyed on buddy uids */
$buddies = buddylist_get_buddies($user->uid);
/* Find out if this buddy is in the user's buddy list */
foreach ($buddies as $buddyuid => $buddystructure) {
if ($buddyuid == $object->uid) {
$output .= theme_username($object);
$output .= " (";
$output .= theme('remove_from_buddylist_link', $object);
$output .= ")";
return $output;
}
}
/* The user is not in the buddylist, give a link to add */
$output .= theme_username($object);
$output .= " (";
$output .= theme('add_to_buddylist_link', $object);
$output .= ")";
return $output;
}

j. trant
archives & museum informatics
www.archimuse.com

j. trant co-founder Museums and the Web | partner archives & museum informatics www.archimuse.com