/[drupal]/contributions/modules/buddylist/README.txt
ViewVC logotype

Contents of /contributions/modules/buddylist/README.txt

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.8 - (show annotations) (download)
Wed Feb 21 17:58:35 2007 UTC (2 years, 9 months ago) by fago
Branch: MAIN
CVS Tags: HEAD
Changes since 1.7: +1 -5 lines
File MIME type: text/plain
fixed drupal version in the README
1 Readme
2 ------
3 This module allows users to put each other on a personal 'Buddy List'.
4
5 Features include buddy groups and the ability to track your buddies' recent posts.
6
7 Send comments to Robert Douglass at: http://drupal.org/user/5449/contact
8
9
10 Requirements
11 ------------
12 This module requires Drupal 5.x.
13
14 This module does not yet offer PostgreSQL support. If you would like to contribute to this module by creating the appropriate PostgreSQL schema, please submit your code at http://drupal.org/project/issues/buddylist
15
16
17
18 Installation
19 ------------
20 1. Copy the buddylist.module to the Drupal modules/ directory.
21
22 2. Enable buddy list in the "site settings | modules" administration screen.
23
24 Enabling the buddylist module will trigger the creation of the database schema. If you are shown error messages you may have to create the schema by hand. Please see the database definition at the end of this file.
25
26 3. Enable buddy list blocks you want in the "blocks" administration screen.
27
28 4. Optionally add the following theme function to your PHPTemplate's template.php file:
29
30 function phptemplate_username($object) {
31 global $user;
32 /* Use the default theme_username for anonymous users, nodes by this user */
33 if ($user->uid == 0 || $object->uid == $user->uid || $object->uid == 0) {
34 return theme_username($object);
35 }
36 if (!user_access('maintain buddy list')) {
37 return theme_username($object);
38 }
39
40 /* an array, keyed on buddy uids */
41 $buddies = buddylist_get_buddies($user->uid);
42 /* Find out if this buddy is in the user's buddy list */
43 foreach ($buddies as $buddyuid => $buddystructure) {
44 if ($buddyuid == $object->uid) {
45 $output .= theme_username($object);
46 $output .= ' (';
47 $output .= theme('remove_from_buddylist_link', $object);
48 $output .= ')';
49 return $output;
50 }
51 }
52 /* The user is not in the buddylist, give a link to add */
53 $output .= theme_username($object);
54 $output .= ' (';
55 $output .= theme('add_to_buddylist_link', $object);
56 $output .= ')';
57 return $output;
58 }
59
60
61 Database Schema
62 ---------------
63 If the automatic creation of the database tables was unsuccessful you can try creating the tables by hand using the following SQL:
64
65 CREATE TABLE `buddylist` (
66 `uid` int(10) unsigned NOT NULL default '0',
67 `buddy` int(10) unsigned NOT NULL default '0',
68 `timestamp` int(11) NOT NULL default '0',
69 `received` tinyint(1) NOT NULL default '0',
70 UNIQUE KEY `uid-buddy-label` (`uid`,`buddy`),
71 KEY `uid` (`uid`)
72 ) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */;
73
74 --
75 -- Table structure for table `buddylist_buddy_group`
76 --
77
78 CREATE TABLE `buddylist_buddy_group` (
79 `uid` int(11) NOT NULL default '0',
80 `buddy` int(11) NOT NULL default '0',
81 `label_id` int(11) NOT NULL default '0',
82 PRIMARY KEY (`uid`,`buddy`,`label_id`)
83 ) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */;
84
85 --
86 -- Table structure for table `buddylist_groups`
87 --
88
89 CREATE TABLE `buddylist_groups` (
90 `uid` int(11) NOT NULL default '0',
91 `label_id` int(11) NOT NULL default '0',
92 `label` varchar(255) NOT NULL default '',
93 `visible` tinyint(1) NOT NULL default '0',
94 PRIMARY KEY (`uid`,`label_id`)
95 ) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */;
96
97
98 Credits
99 -------
100 Written by Adrian Rossouw.
101 Thanks to Ratko Kovacina for the comments/debugging info
102 Browsing improvements by Doug Sikora
103
104 Maintainer: Robert Douglass
105 Status: maintained (Feb. 2006)
106
107 Request/Approval Feature by Ankur Rishi, courtesy of Jewcy.com
108
109 TODO
110 ----
111 1. PGSQL schema (see buddylist.install, buddylist_install())
112 2. Rework texts so that one is not stuck with "buddy" but could choose "contact", for example
113 3. Make a workflow whereby a buddy request is sent to the buddy for confirmation which is required before the buddy can be added.
114 4. Make the notification that someone added you to their buddylist use the privatemsg module, if available.
115 5. Consider possible Views module integration.

  ViewVC Help
Powered by ViewVC 1.1.2