CB Email autoaction

1 year 7 months ago #330623 by activha
Replied by activha on topic CB Email autoaction
Too bad...
At least what kind of CB field can I use to store/delete the CB Activity ids made by a CB user so that I can retrieve this by standard CB substitutions and act on it with the PHP ?

Please Log in to join the conversation.

1 year 7 months ago - 1 year 7 months ago #330624 by krileon
Replied by krileon on topic CB Email autoaction
I don't know. You're trying to pass data strangely to AcyMailing. Unless you can create the AcyMailing email to be sent directly from CB Auto Actions where you can generate the message body it's going to be difficult trying to pull that information as AcyMailing has no idea any of this exists. So the process would be Button > Auto Action (this generates message body and gives it to AcyMailing) > AcyMailing in an ideal situation. Trying to have AcyMailing generate the message body from information it can't possibly have is basically impossible.


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.

1 year 7 months ago #330625 by activha
Replied by activha on topic CB Email autoaction

So the process would be Button > Auto Action (this generates message body and gives it to AcyMailing) > AcyMailing

Very good idea ! much better this way.
Knowing the the button will be pushed manually on a single activity page display, what kind of trigger should I use to get the proper variables ?
Is activity_onDisplayStreamActivity appropriate for this ?

Please Log in to join the conversation.

1 year 7 months ago #330627 by krileon
Replied by krileon on topic CB Email autoaction
You can't use a trigger for a button push. You need to set your button to just go directly to the auto action. Set the auto action to have Triggers set to None then allow direct access. Now you can use its URL in a link. Include in the link the activity id as &activity=ACTIVITY_ID then you can access it in auto actions with [get_activity]. Now you can use PHP to get the remaining information about the activity entry, database queries, or however you feel like accomplishing this.


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.

1 year 7 months ago #330628 by activha
Replied by activha on topic CB Email autoaction
OK got it.
Last question and I don't bother you any longer : 
Doing this way would force me to use DB queries to retrieve the activity info or is is somewhere in a variable ?

Please Log in to join the conversation.

1 year 7 months ago #330629 by krileon
Replied by krileon on topic CB Email autoaction
Below is an example of getting an activity object from an auto action URL.

URL
index.php?option=com_comprofiler&view=pluginclass&plugin=cbautoactions&action=action&actions=ACTION_ID_HERE&activity=ACTIVITY_ID_HERE

Button
<a href="index.php?option=com_comprofiler&view=pluginclass&plugin=cbautoactions&action=action&actions=ACTION_ID_HERE&activity=ACTIVITY_ID_HERE" class="btn btn-primary">Run Auto Action!</a>

Auto Action
Global
Triggers: None
Type: Code
Access: All Registered Users
Conditions
Field: Custom > Value
Custom Value: [cb:parse function="clean" method="int"][get_activity][/cb:parse]
Format Functions: Toggled
Operator: Greater Than
Value: 0
Action
Method: PHP
Code:
$activity = new \CB\Plugin\Activity\Table\ActivityTable();

$activity->load( (int) '[get_activity]' );

if ( ! $activity->getInt( 'id', 0 ) ) {
    return;
}

// Code to do whatever you like with $activity
Output
Display: Redirect
URL: URL_TO_REDIRECT_THEM_BACK_TO_HERE

You don't need the output if you decide to implement this via JavaScript and have it to this with an JS get to the auto action URL. Entirely up to you on implementation details, but that will give you the activity object to work with.


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.

Moderators: beatnantkrileon
Time to create page: 0.675 seconds

Facebook Twitter LinkedIn