Please Log in or Create an account to join the conversation.
How are you determining it's not working? That absolutely should be working. The activity object is in var1 and it absolutely as a public accessible asset property.But [var1_asset] does not work in an external single activity page called by the link above
PHP code actions provide $autoaction, $user, $variables, and $input. All can be used inside your include.If I want to simplify things in an auto action and use an external file with an include, what lines should I add to retrieve the substitutions in the external files ? do you have a dummy file or dummy plugin to start with ?
Please Log in or Create an account to join the conversation.
Are you mentioning CB Activity actions ?Will review adding support for $action so you've access to the action itself and could call $action->string function.
Please Log in or Create an account to join the conversation.
Ah sorry. var1 is an array of rows so yes var1_asset will not work. It can only be accesses as an array.I get the same result on the local dev server and on the online devel server.
You can access the auto action object with $autoaction, but you cannot access the $action yet. So you can just use $autoaction->id if you want the auto action id, but you can't access the ->string substitution function yet since that's a part of $action which is not available right now, but will be soon in a new release.Are you mentioning CB Activity actions ?
if no how can I access CB Activity action id registered for the activity ? will [var1_action->id] work ?
Please Log in or Create an account to join the conversation.
var1 is an array of rows so yes var1_asset will not work.
Is this the CB activity action that you mention ?you cannot access the $action yet
Please Log in or Create an account to join the conversation.
var1 is $rows. It's an array of activity. If you need behavior on each individual activity entry use onDisplayStreamActivity, which has the following variables available to it. As is you're acting on the display of a STREAM and not an ACTIVITY.Meaning you cannot condition the auto action on var1 ?
or substitute in the code ?
No. It's a variable that will be available to the Code action type. I'm not sure how else to explain this. When using a Code action type and Method is set to PHP you can use $autoaction, $user, $variables, and $input variables directly in your PHP code. None of those are the ACTION itself. I am going to add $action so you can run ACTION functions. Specifically ->string, which is the function for parsing the substitutions of an ACTION. I'm explaining this because you directly asked earlier how to use substitutions in an included file.Is this the CB activity action that you mention ?
Condition where? In your PHP? Use $autoaction->id.I try to condition the auto action on the CB activity action id
Please Log in or Create an account to join the conversation.