Readme ------ This module allows users to put each other on a personal 'Buddy List' , also enabling them to keep up with their friend's postings via the 'My Friend's Blogs' block. Send comments to adrian@daemon.co.za. Requirements ------------ This module requires Drupal 4.4.0 or CVS from March 25 2004 or later. Installation ------------ 1. Create the SQL tables. This depends a little on your system, but the most common method is: mysql -u username -ppassword drupal < buddylist.mysql Postgres database initialization file is also included, but not tested. 2. Copy the buddylist.module to the Drupal modules/ directory. 3. Enable buddy list in the "site settings | modules" administration screen. 4. Enable buddy list blocks you want in the "blocks" administration screen. 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; }