is there an easy way to change the %inviter from username to another profile field [such as real name if such field is created in the profile table]?
I would be happy to provide a stipend for this code.
thnx
| Comment | File | Size | Author |
|---|---|---|---|
| #16 | invite-token_1.patch | 10.33 KB | smk-ka |
| #15 | invite-token_0.patch | 9.74 KB | smk-ka |
| #13 | invite-token.patch | 8.73 KB | smk-ka |
| #7 | inviter_field_variable_patch_47_2.txt | 1.85 KB | knseibert |
| #6 | inviter_field_variable_patch_5_2.txt | 1.85 KB | knseibert |
Comments
Comment #1
knseibert commentedDone :)
Added an additional field to the settings page in case profile.module is enabled.
This drop down menu exists of username (default) and all profile fields that are of type 'textfield'. Figured that multiline textfields or combo boxes would'nt work as inviter variable.
I have written this patch for version 5, but i think it also should work for 4.7 as well.
Feedback appreciated.
Comment #2
knseibert commentedNo. It doesnt't work with 4.7. I'm working on it.
Comment #3
knseibert commentedNow it does. Patch for 4.7 attached.
Comment #4
p15650 commentedThat works perfectly in 4.7; didn't try 5.0
Thank you
Comment #5
smk-ka commentedPlease change 2 things:
'#extra' => $extra = 0,WHERE type = "textfield"toWHERE type = 'textfield'.Apart from these changes this patch looks good to me.
--
Stefan Kudwien
www.unleashedmind.com
Comment #6
knseibert commentedThanks for your feedback.
Version 5.0 attached.
Comment #7
knseibert commentedVersion 4.7
Comment #8
Tobias Maier commentedfirst of all, we dont use lines like
// Feature from http://drupal.org/node/120248in drupal.Think about how this would mess up he code if we add this on every place...
A better solution instead of integrating yet another system for placeholder substitution is to use the token api
http://drupal.org/project/token
Integrate this and remove all overlapping, old variables in the invite module
Comment #9
Tobias Maier commentedcategory
Comment #10
knseibert commentedThe comments were not meant to be published. Forgot to remove them.
Comment #11
smk-ka commented@knseibert: I started looking at making a switch to token.module, just let me know if you're not doing the same...
Comment #12
knseibert commentedNope. Not yet.
Comment #13
smk-ka commentedThis patch makes the switch to token.module.
Installation/Requirements:
--
Stefan Kudwien
www.unleashedmind.com
Comment #14
smk-ka commentedDue to Token module maintainers failing either to commit the necessary patches for profile support or to communicate what's stopping them from doing so, and thus effectively blocking all development in this direction, I'm really wondering how we should proceed here.
In the past hours I've evaluated whether I could add the modified functions to Invite module, but this would result in copying half of token.module, which I surely do not want.
I am currently thinking about writing my own token replacement handler to avoid any dependency on token.module altogether, but still allowing full access to user, profile and invite-specific values.
--
Stefan Kudwien
unleashed mind
Comment #15
smk-ka commentedRe-rolled token support. This also fixes escaping of entities in invite emails.
Comment #16
smk-ka commentedUpdated patch adds missing dependency information to .info file.
Comment #17
smk-ka commentedCommitted to DRUPAL-5. Remember to install token module first!
--
Stefan Kudwien
unleashed mind
Comment #18
(not verified) commented