HI

Thanks of the alternative, I just installed your module and find there is only option to select privacy for friends. but I Hope User Relationships is not only for Friends. how can I enable the privacy for all of the defined relationships?

Thanks
Vinoth

Comments

markus_petrux’s picture

Priority: Critical » Normal

I guess the mini-module shipped in this package that integrates CCK Private Fields with User Relationships needs a settings panel from where to choose which relationship types mean both users are *friends*.

I'm not using UR myself, and I just implemented this quickly. Any suggestion on where to look?

PS: The module still works, so this is not critical.

vinoth.3v’s picture

see, I have defined 5 relationships between users,

but it displays "Private - visible to you and your friends." only, other two are, public & Hidden,

Please let me know from where I can enable privacy for other relationships?

PS: I am getting "Error: $dialogContainer.dialog is not a function
Source File: sites/all/modules/cck_private_fields/js/privacy_status_dialog.js?G Line: 148
" too

markus_petrux’s picture

Do you think if the text "Private - visible to you and your friends." was changed would work for your use-case? ...or is it that you need to chosse which relationships mean friendship between users?

PS: It looks like jQuery UI is not present, or... please, open a separate issue for that.

RicardoJBarrios’s picture

+1

Same here.

I have different relation types, and I'm now using "UR-Field Permissions" because it let me select permissions to each relation.

vinoth.3v’s picture

HI

Please refer the issue #377950: Integration of CCK_field_privacy with user_relationship_module for the clear understanding.

"Private - visible to you and your friends."

We can let users to select all the defined relation types along with the private option.

Thanks & Regards
Vinoth

markus_petrux’s picture

Category: bug » feature

Well, I've been looking at UR API and I believe I see how this could be implemented. The following would affect cck_private_fields_user_relationships submodule:

1) Implement hook_form_alter() to extend the CCK Private Fields section in CCK field settings form to allow site administrators choose which relationship types can be used to grant access to view this field when Private option is selected.

2) When this new option is selected, then we use it to append a condition to the query performed against UR (using function user_relationships_load) to know how many relations exist between node owner and user trying to view the node.

PS: I'm changing the status of this issue into a feature request. The module works. It is just it does not allow you to choose relationships, which might be a problem only when you use more relationships that do not mean *friendship*, so this is not strictly a bug, but the need to extend the current functionality.

markus_petrux’s picture

Title: User Relationships is not only for Friends » User Relationships is not only for Friends / Add ability to select UR relationship types
Status: Active » Fixed

Well, I have committed this feature to CVS:

http://drupal.org/cvs?commit=259972

It works as described in #6. Please, let me know how it works. I have only browsed UR code and tried to guess how it works. I haven't tested the feature at all. lol

PS: If you already had the "User Relationships integration with CCK Private Fields" module installed, then please run update.php. The weight of the module needs to be changed so that this module executes after CCK Private Fields itself.

[EDIT] BTW, this feature should be available in the next development snapshot. Please, report any issues that you may find. Thanks.

vinoth.3v’s picture

HI

Thanks for the update. let me upgrade and let you know.

Thanks a lot.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

RicardoJBarrios’s picture

Only a question.

I've installed last dev, and when I edit a CCK field I can select the relationships types I want to select as "friend", but it doesn't let me choose one when I edit the field in the node.

Is this the correct behavior?

markus_petrux’s picture

Yes. The ability to choose a particular user relationship on node edit is not implemented.

RicardoJBarrios’s picture

Ok, tanks :)