Conditions for Auto Action

5 years 10 months ago - 5 years 10 months ago #304741 by wbuk
Conditions for Auto Action was created by wbuk
Quick question. We are trying to redirect users away from certain Groupjive categories using Auto Action but unsure about the value used for conditions. How do we specify which category displayed that is being triggered? Example below using Category with ID 2. Tried [var1_id], [var2_id], but it doesn't seem to work.

Global
Trigger: gj_onBeforeDisplayCategory
Type: Redirect
Access: Everybody

Conditions
Value: ???
Operator: Equal To
Value: 2


Is there documentation that lists what value to put as conditions for all the different triggers? One of the older thread points to the post "Using CB Triggers" ( link ), however we struggle to make any sense on how that is used to determine the condition values.

Web Buster UK Ltd

Please Log in to join the conversation.

5 years 10 months ago #304750 by krileon
Replied by krileon on topic Conditions for Auto Action
The variables for that trigger are as follows.

$_PLUGINS->trigger( 'gj_onBeforeDisplayCategory', array( &$return, &$rows, &$category, &$counters, $user ) );

var1 is the return output (typically used to add extra HTML to the page), var2 is the groups in the category, var3 is the category object it self, var4 is used to add to the counter output in the canvas header, var5 is the current user object viewing the category (not exactly needed anymore). So if you want to condition against the category id you'd use [var3_id].

That trigger is listed on our triggers documentation page below. Use your browsers built in search functionality to search for a trigger, which shows the variables available to it.

www.joomlapolis.com/documentation/18358-using-cb-triggers


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: wbuk

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.192 seconds

Facebook Twitter LinkedIn