Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
In User Relationships, there seems to be a possibility to have one way relationships where you "Become (X)'s friend". Is it possible to have a one way relationship where the relationship is "them to you" rather than "you to them"? I would like, for example to be able to "Add (X) as your manager". When I add in the one way role of "Manager", however, it always displays as "become (X)'s manager". Is there a way to reverse this?
Comments
Comment #1
ajayg CreditAttribution: ajayg commentedYes there is a way to reverse this. However to show the reverse way currently seems to be working with UR blocks modules. For some reason I am yet to be able to get it working with just views based on default relationship browser view
Comment #2
NathanM CreditAttribution: NathanM commentedDid you just do that by changing the language definitions, or what? Even changing in the modules would be a step up, for me.
Comment #3
ajayg CreditAttribution: ajayg commentedUR blocks module provides two blocks for each one way relationship. One for "you to them" and other "them to you". have you tried that? And you can change the string of "them to you" etc to whatever you want.
I believe there is one simple module allows to change a few strings. Or if you want more sophisticated approach, turn of locale module and use A) either a new language or b) create your own language and "translate" whatever string you want.
Comment #4
NathanM CreditAttribution: NathanM commentedThis isn't quite what I was talking about. If you show the "them to you" user block, it only shows they user if "they" added "you" to the block. There should be an option to reverse this kind of relationship. Instead of having them add me and saying that they are my fan, I should be able to add them, saying that they are my follower, and if they approve of the relationship, then they would get shown in the "them to you" block. Does this make sense?
Comment #5
Sansui CreditAttribution: Sansui commentedI think I'm trying to do something similar, Nathan.
I have a scenario where I want a one way relationship for Coaches to Members, and I want the members to be able to request someone become their coach.
Currently the relationship action shows "Becomes x's coach", but I want it to be "Add x as your coach".
Did you figure out how to do this?
Comment #6
Sansui CreditAttribution: Sansui commentedSo far seems like only way I can make this happen is by adding a Coachee relationship which the user can request, and then imply Coach (another one way relationship) as strict/reverse.
This adds an extra relationship that is going to have to be hidden all over the place somehow, (coachee), as well as what seems like an unnecessary relationship layer.
If there's a way to simply reverse the request for a relationship (request them to become your coach, rather than request you to become their caoch), this module would be nothing short of perfection for all my relationship needs :o
Comment #7
NathanM CreditAttribution: NathanM commentedI haven't figured out how to do that yet, unfortunately.
Comment #8
mrf CreditAttribution: mrf commentedWe have a large patch in the queue to help solve a major issue with one-way relationships. Please review if you have a chance so we can move forward with some of these related issues.
#651502: clarify reciprocal & one-way relationships
Comment #9
mrf CreditAttribution: mrf commentedI am postponing any 6.x feature requests that don't have a current applicable patch to help sort the large list of open features.
Please feel free to set to 'needs review' once a patch is included.