Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
I didn't find any tickets requesting this, but it seems pretty reasonable to integrate with the tokens module rather than using static strings (@requestee_name, @requestee_link, etc...) when configuring the notification templates located at admin/user/relationships/settings
Comment | File | Size | Author |
---|---|---|---|
#5 | user_relationship_mailer.info_.442138.patch | 511 bytes | MisterSpeed |
#5 | user_relationship_mailer.module.442138.patch | 3.9 KB | MisterSpeed |
#5 | user_relationship_mailer_defaults.inc_.442138.patch | 8.89 KB | MisterSpeed |
#5 | user_relationship_mailer_token.zip | 1.32 KB | MisterSpeed |
Comments
Comment #1
alex.k CreditAttribution: alex.k commentedSure, a patch would be most welcome. Thanks.
Comment #2
Harry SlaughterYeah, I know I should be submitting a patch :) Unfortunately, it's not a high priority feature for me right now, and I don't have extra time right now, but I wanted to create a ticket for the feature to see if there's any general interest in this.
Comment #3
alex.k CreditAttribution: alex.k commentedComment #4
MisterSpeed CreditAttribution: MisterSpeed commentedComment #5
MisterSpeed CreditAttribution: MisterSpeed commentedI have submitted patches for using tokens instead of hardcoded string replacements
Three patch file for user_relationship_mailer module and zip file contains newly added inc file for the token replacements
Thanks [LS]
Comment #6
jaydub CreditAttribution: jaydub commentedI'd say that rather than force the use of tokens that the default implementation continue to be supported and IF Token is installed then tokens can be used for replacements as well.
Comment #7
alex.k CreditAttribution: alex.k commentedThe amount of code needed to keep both implementations would be too much... just think of the maintenance needed when changing any messaging code. So, we should stick to one or the other.
Actually, how much of a stretch is it to include token functionality as part of the move to Notifications/Messaging framework? This was identified in http://drupal.org/node/344366#comment-1456188. Then, we can keep user_relationship_mailer as is, and use the token goodness with Notifications.
Comment #8
rjbrown99 CreditAttribution: rjbrown99 commented+1 for token support.
Why? Because of the integration with the content profile module. If you have a CCK-based profile with fields for first name, last name, and others it would be a very standard and nice integration to be able to call upon them via the token module. The customized e-mails will look a lot better.
I'm going to test the patch with the latest release of code. Thanks for submitting it.
It sounds like the longer-term plan based on the above link is to create a sub-module to enable messaging/notifications/token integration. I'm all for that if it works - whatever gets tokens into this is good for me.
Comment #9
rjbrown99 CreditAttribution: rjbrown99 commentedOK, it's a year and a half later and I'm still maintaining my own fork of this patch :) Is anyone else interested in token support for UR? I'd like it for both informational messages and e-mail options for UR Mailer.
Comment #10
YK85 CreditAttribution: YK85 commented+1 subscribing
Comment #11
MisterSpeed CreditAttribution: MisterSpeed commentedWell, we can use the patch above and pass the strings through a method that replaces default tokens in the patch if Token is not installed, otherwise uses Token to do the hard work. It would be about as heavy as check_plain() in terms of processing costs, and would allow both variants to function from the same codebase.
Comment #12
YK85 CreditAttribution: YK85 commentedI was wondering if anyone has been able to further develop the integration of tokens into UR?
Thank you
Comment #13
rjbrown99 CreditAttribution: rjbrown99 commentedIt has been 3 years that I have been maintaining my own fork of this so I decided to fix it up and turn it into a real project. Here it is:
http://drupal.org/project/ur_mailer_token
This is the User Relationship mailer module, with additional support for tokens, the content_profile module, and Wysiwyg fields. I'd appreciate it if any of you who were interested in this originally and still have a need could help by testing it and creating bug/feature requests. Thanks!