As the title, i want to invite multiple friends by one click. Here is my patch, I hope you can add this feature to your module.

Thanks!
Jerenus

Comments

jerenus’s picture

alesr’s picture

Hi Jerenus,

The feature is welcome, of course.
Please fix two things:

- I cannot apply the patch.
I guess there are line endings problem or some other differences in your patch.
This is what I get when I try to apply.

$ patch -p1 < og_invite_people-invite_multiple_friends_at_the_same_time-1837536.patch

patching file og_invite_people.module
Hunk #3 FAILED at 135.
1 out of 4 hunks FAILED -- saving rejects to file og_invite_people.module.rej

- Change the description from:
'#description' => t('New user will be created and invited as a member to this group. One time login link is sent to invitee\'s email.(invite multiple friends at the same time, please separated by commas)')
to
'#description' => t('New user will be created and invited as a member to this group. One time login link is sent to invitee\'s email. (You can also invite multiple people at once. Simply enter their email addresses separated by commas.).')

Make those fixes and I'll commit the patch.
Thanks.

alesr’s picture

Status: Needs review » Needs work
jerenus’s picture

Status: Needs work » Needs review
StatusFileSize
new4.61 KB

Alesr,

Here is new patch. The reason of the first problem is that the old patch is depend on the old version of the module. I have re-created the patch.
Thank you like this feature.

Jerenus

alesr’s picture

Status: Needs review » Needs work

Jerenus,

The patch is almost ready. Make it more bullet-proof with adding trim() when exploding email addresses with commas.

Ex. If you put this in email text field: "test1@mail.com, test2@mail.com , test3@mail.com" it will not pass the validation because of whitespaces around commas.

+ Change the label of the text field to "User email(s)" too. It will make more sense now with multiple email option in text field.

jerenus’s picture

Status: Needs work » Needs review
StatusFileSize
new4.71 KB

Alesr,

Your suggestion is well. I have re-created new patch. It added your two suggestions.

Please check it again.

Thanks!
Jerenus

alesr’s picture

Status: Needs review » Fixed

Thanks Jerenus,

"Invite multiple friends at the same time" feature accepted and commited to dev.

jerenus’s picture

Alesr,

Thank you for your encouragement!!

Jerenus

alesr’s picture

You are welcome ;)

Status: Fixed » Closed (fixed)

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