For buddylist.module developers...
This is a very simple feature and I'm sure you can add it into the module itself.
A user selects either 'Private Mode' (Value of 1) or 'Public Mode' (Value of 2) from
an HTML form. When submitted, their $user->uid (User ID Number) is inserted into column
'uid' in table 'privacymode.' The selected value (either 1 or 2) is also inserted into
that table in column 'privacyid,' in the same row as their $user->uid of course.
The script in template.php selects the 'privacyid' where the $user->uid of the owner of the profile in which the user is trying to view and if the 'privacyid' is 2, it will show the user_profile.tpl.php (since it is public),
if it is 1, it will detect if the user who is trying to view is a friend, if they are a friend it will
display the profile. If the user isn't a friend, it will show private_profile.tpl.php. If the user has
not selected private nor public mode, by default, it will show private_profile.tpl.php.
Bascially you chose what you want to be shown on both profiles which makes it full customizable..this is very simple a basic PHP..all writen (with the exception of the form that choses either 1 or 2) in template.php function phptemplate_user_profile. I'm sure it can be added to all other templates to for further personalization.
Comments
Comment #1
fagohttp://drupal.org/node/93981