[SOLVED] [#8831] Invite link

2 years 2 months ago - 2 years 2 months ago #327922 by activha
[SOLVED] [#8831] Invite link was created by activha
Hello
I'd like to use CB Invites to automatically add an affiliation link between a user and its invitees.
Can I simply add a string like &atid=[cb_field] to the [invite] link where cb_field is a query field finding the correct affiliate id for the CB user ?
Or do I have to alter some code some where to add it ?
I mean that it works for email invitations but not for a link creation

Thanks

Please Log in to join the conversation.

2 years 2 months ago #327927 by krileon
Replied by krileon on topic Invite link

Can I simply add a string like &atid=[cb_field] to the [invite] link where cb_field is a query field finding the correct affiliate id for the CB user ?

Yup, you can add to the URL by doing that. I've no idea if your affiliate tracking software will pick it up though.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

2 years 2 months ago #327929 by activha
Replied by activha on topic Invite link
Seems to work nicely with emails but not with invite link.
Is there any where I can add this code for invite links ?

Please Log in to join the conversation.

2 years 2 months ago #327936 by krileon
Replied by krileon on topic Invite link
Have added a feature ticket to add a trigger to the getLink function which returns the invite link for both email and link sharing.

forge.joomlapolis.com/issues/8831

Should have this available sometime today. You'll then be able to use CB Auto Actions to add whatever you need to the URL.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: activha

Please Log in to join the conversation.

2 years 2 months ago #327937 by krileon
Replied by krileon on topic Invite link
Ok, new CB Invites build release is now available. The following new triggers have been added.

When an invite link is clicked (useful for adding custom redirect behavior if you don't want to redirect to CB registration)
$_PLUGINS->trigger( 'invites_onInviteAccept', array( $row, $code, $user ) );
When an invite link is output
$_PLUGINS->trigger( 'invites_onInviteLink', array( $this, &$variables ) );

For your usage you'd use the below.

Global
Triggers: invites_onInviteLink
Type: Code
User: Automatic
Access: Everybody
Action
Method: PHP
Code:
$variables['var2']['NEW_VARIABLE_HERE'] = VARIABLE_VALUE_HERE;
Parameters
References: Variable 2

So for example based off the information you've provided you'd have the below code.
$variables['var2']['atid'] = '[cb_field]';

This will apply to the email and profile invite links dynamically so should be the only usage you'll need.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

2 years 2 months ago #327941 by activha
Replied by activha on topic Invite link
Seems to work fine but the cb_field seems to be encrypted also
I get atid = YToxOntzOjQ6ImF0aWQiO2k6Njt9 instead of atid = 57 for instance in my cookie storage

Mind to check ?

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.739 seconds

Facebook Twitter LinkedIn