Closed (duplicate)
Project:
CCK Field Privacy
Version:
5.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
19 Feb 2008 at 23:51 UTC
Updated:
30 Sep 2008 at 04:12 UTC
I'm developing my user profile pages based on the "user relationships" module. Since I'm not using Buddylist, how can I turn off that requirement? Is there any easy way to modify the privacy page settings so that we can choose which module we'd like to use?
Comments
Comment #1
obsidiandesign commentedThat's the ultimate goal; however, I'd like to get a first 'stable' release out that works through Buddylist, then extend it in a new version to include Buddylist2, User Relationships, and others, on a 'admin choice' basis. If anyone is willing to help contribute the code for working with the other modules, please let me know.
Comment #2
yoyoman commentedTo switch to "user_relationships" I just changed the dependencies line of the cck_field_privacy.info file
dependencies = content user_relationships jquery_impromptu
Is there anything else I need to do or be careful about?
Comment #3
obsidiandesign commentedyoyoman,
That does remove the requirement (in terms of the server, at least) of Buddylist being installed. However, the module is hard-coded to read off of Buddylist's tables (see cck_field_privacy.module, lines 75-86). If you work around those lines, it can be switched over to read from user_relationships' table.
Comment #4
yoyoman commentedyah, I saw those lines. I noticed two. Here are my pseudo equivalents, using the user_relationships module ...
// $buddies = buddylist_get_buddies($node->uid, 'uid');
$relationships = user_relationships_load(array('requester_id' => $user->uid, 'requestee_id' => $node->uid, 'approved' => TRUE));
// if (array_key_exists($user->uid, $buddies)) { continue; }
if (sizeof($relationships)) {
The user_relationships_load() function grabs whatever relationships exist be/w the two users. I used the sizeof() to see if a relationship exists. The user relationships module has one-way relationships, so I haven't tested everything to make sure if what I've got works as the user relationships module was designed.
Comment #5
Walt Esquivel commentedSubscribing. I, too, am developing my user profile pages based on the "user relationships" module so I'm very interested in this conversation. Keep up the great work!
Comment #6
obsidiandesign commentedI'm going to begin adding support for additional user reference modules as part of the 5.x-2.x branch. Are there any other specific modules people are looking to hook into? user_relationships.module will be first, obviously. At the moment, nothing in the 2.x release is coded, but I've set things up so I can start to work on them.
Comment #7
sterwa commentedbuddylist2, please :)
Comment #8
gausarts commentedbuddylist2, subscribe. Thanks
Comment #9
Obrittian commentedbuddylist2, subscribe. THX
Comment #10
obsidiandesign commentedSorry for the slow progress - a question for the masses: Does anyone have more than one of the following installed:
The only reason I ask is because of the need to either create an admin page to select when sites have more than one of the three installed, or go on the assumption that people only use one at a time. Any thoughts? I don't want to create an unnecessary admin screen if I don't have to.
Bryan
Comment #11
ethanre commentedSubscribing - I'm using User Relationships only. Most people will have either Buddylist2 or UR.
Comment #12
icecreamyou commentedThe modules are replacements for each other. There's no reason for anyone to have more than one installed at once.
And I'm a UR kinda guy. ;)
Comment #13
4drian commentedWhile not really a 5.x issue, support for Friendlist (http://drupal.org/project/friendlist) would be great. The dev (mercmobily) seems to be an ubercoder who sits at his computer for days on end without food or sleep so with a bit of a nudge you might be able to interest him in helping out with the D6 version. He's built his module from the ground up in a remarkable amount of time and seems very keen to expand and improve it all the time. No idea how good the quality is but it seems to tick the right boxes with me.
Comment #14
bensemmel commented+ 1 for me
just postet at the friendslist issue queue the same request, sorry for haven't searched this queue before...
Ben
Comment #15
gausarts commentedSorry, if you don't mind I'd like to unsubscribe from buddylist2 integration. Thanks
Comment #16
gausarts commentedAh, I didn't see the integration with friendlist is already requested here #13. I am awfully sorry for duplicating the issue, http://drupal.org/node/314170. But I suppose it needs to have a clear request title anyway. Thanks
Comment #17
mercmobily commentedHi,
Sorry to jump in, but I just can't resist...
>While not really a 5.x issue, support for Friendlist (http://drupal.org/project/friendlist) would be great. The dev
>(mercmobily)
>seems to be an ubercoder who sits at his computer for days on end without food or sleep
I also have a life, eh :-D
I only do this when it's absolutely necessary -- and it was necessary to complete FriendList and Activity Log...
>so with a bit of a nudge you might be able to interest him in helping out with the D6 version. He's built his
>module from the ground up in a remarkable amount of time and seems very keen to expand and improve
>it all the time.
That is correct. The integration portion of FriendList is already finished.
> No idea how good the quality is but it seems to tick the right boxes with me.
Friendlist's code quality is _immaculate_. Each function is very well documented. The external documentation is also very good -- thanks to Marius, FriendList's great comaintainer.
The code is available to anybody -- just go have a look.
Bye,
Merc.
Comment #18
4drian commentedAnd I believe you.
Comment #19
mercmobily commentedHi,
To the maintainer: I think this issue #314170: Plugin architecture for field access permissions + Integration with Friendlist makes this one a duplicate. I provided some code to implement a general plugin architecture, so this issue now should be irrelevant.
However, this is your queue -- I will leave you the choice.
Merc.
Comment #20
obsidiandesign commentedI agree with Merc in #19 - the ideas proposed over at #314170: Plugin architecture for field access permissions + Integration with Friendlist supersede this request, as it totally changes how CCK Field Privacy works (but for the better) and makes everything much more pluggable with different relationship modules. Marking this 'duplicate' simply because there's not an 'obsolete' tag I could use. Follow/subscribe to #314170: Plugin architecture for field access permissions + Integration with Friendlist for updates on testing & other plugins.
Bryan