Skip to Content Skip to Menu

Search Results (Searched for: Triggers:)

  • krileon
19 Jun 2026 14:42
The separate fields are a backup for the name field. I do not recommend modifying the name field. At any rate if you want to do this you can do it with the below. As you've been warned about this already I'll leave it to you to decide risking your data.

Global
Triggers: onAfterUserRegistration, onAfterNewUser, onAfterUserUpdate, onAfterUpdateUser
Type: Field
User: Automatic
Access: Everybody
Action
Field: name
Operator: Set
Value: [formatname]

I would recommend exploring other ways to bring CBs name formatting to other extensions. Either with Joomla events in those extensions or possibly working with developers of those extensions to add Joomla events to allow for this or for them to have CB support built in.
  • krileon
04 May 2026 14:14 - 04 May 2026 14:15
We don't have condition logic available for renewals. Just new subscriptions and upgrades. Renewals have very few limitations.

Probably the easiest way is to just intercept the renewal attempt and redirect away with CB Auto Actions. The below should work.

Global
Triggers: onCPayAfterPlanRenewalSelected
Type: Redirect
User: Self
Access: Everybody
Conditions
Condition 1
Field: Custom > Value
Custom Value: [var1_id]
Operator: Equal To
Value: PLAN_ID_HERE
Condition 2
Field: SELECT_FIELD_HERE
Operator: Not Empty
Action
URL: [cb:url location="profile_edit" /]
Message: Please complete your profile before renewing.

Replace PLAN_ID_HERE with the plan you want this to apply to. Replace SELECT_FIELD_HERE by selecting the field you want to check for. This will work for both renewal and resubscribe attempts as both go through the same trigger and process. They should be sent to profile edit with the displayed message.
  • krileon
30 Apr 2026 17:13
Replied by krileon on topic Documentation for client-side validation API?
What you keep linking isn't just validation. It's an entire field type with a custom dropdown, styling, and other JavaScript unrelated to validation. You should ideally just be making a new field type plugin for either Joomla or CB that includes everything you need and then just use that field type. Some examples of field type plugins are CB Code Field and CB Query Field.

Below is a fully working example of injecting a new validation rule into CB, but that's just a validation rule. It just takes an inputs value and compares it returning true/false based off whatever conditions are required. That's what a validation rule is.

Global
Triggers: onAfterRegisterFormDisplay, onAfterUserProfileEditDisplay
Type: Code
User: Automatic
Access: Everybody
Action
Method: jQuery
Code:
Code:
$.validator.addMethod( 'isTea', function( value, element, params ) { return this.optional( element ) || ( value === 'Tea' ); }, $.validator.format( 'Please enter: Tea' ) ); $( 'input#username' ).attr( 'data-rule-istea', 'true' );

You can confirm this yourself by creating that auto action then editing the username field and it will error if the username isn't set to "Tea". That's all the validation is meant to do. You can even add is-valid here if you like by adding it to element if the value is valid.

The only additional validate options that I need are shown here (using my code that doesn't work in the jQuery environment):

You're overriding the initialization of the form validation that CB itself does. So you've lost all of the behavior CB Validate provides. We provide a dozen different jQuery events to hook into CB Validate for you to add whatever customized display logic you like. Example as follows.

Global
Triggers: onAfterRegisterFormDisplay, onAfterUserProfileEditDisplay
Type: Code
User: Automatic
Access: Everybody
Action
Method: jQuery
Code:
Code:
$( '.cbValidation' ).on( 'cbvalidate.highlight', ( e, cbvalidate, element ) => { $( element ).removeClass( 'is-valid' ); }).on( 'cbvalidate.unhighlight', ( e, cbvalidate, element ) => { $( element ).addClass( 'is-valid' ); });

The above will work for both registration and profile edit on frontend. This is a working example. So you should see is-valid added to any input that passes validation check. You can find those events and more in the below file.

/components/com_comprofiler/js/jquery/jquery.cbvalidate.js

They're all triggered on the root form element so you just need to bind to them from there.
  • krileon
23 Apr 2026 16:30
Selected options are pushed into the basket and the subscription parameters for easy extraction. So you'll be able to get their option selection from there to use in CB Auto Actions. Below is an example of this.

Plan Active
Global
Triggers: onCPayUserStateChange
User: Automatic
Access: Everybody
Conditions
Condition 1
Field: Custom > Value
Custom Value: [var3]
Operator: Equal To
Value: PLAN_ID_HERE
Condition 2
Field: Custom > Value
Custom Value: [var2]
Operator: Equal To
Value: A
Condition 3
Field: Custom > Value
Custom Value: [var9_integrations_planoptions_PLAN_OPTION_NAME_HERE]
Operator: Does Contain
Value: OPTION_VALUE_HERE

Plan Expired
Global
Triggers: onCPayUserStateChange
User: Automatic
Access: Everybody
Conditions
Condition 1
Field: Custom > Value
Custom Value: [var3]
Operator: Equal To
Value: PLAN_ID_HERE
Condition 2
Field: Custom > Value
Custom Value: [var2]
Operator: Not Equal To
Value: A
Condition 3
Field: Custom > Value
Custom Value: [var9_integrations_planoptions_PLAN_OPTION_NAME_HERE]
Operator: Equal To
Value: OPTION_VALUE_HERE

This will work with any action type. So if you want to add/remove usergroups you'd use a Usergroup action. var9 in this example is the subscription object. So it contains all the information for the subscription row in _cbsubs_subscriptions. CB Auto Actions should be allowed to go that deep on nested parameters, but if not will review patching in further object depth. It's also possible to do the conditional check using PHP if the substitution gives trouble so let me know if that doesn't work for you.

Replace PLAN_ID_HERE with the ID of the plan you want this to act on. Replace PLAN_OPTION_NAME_HERE with the "Name" of your option. Replace OPTION_VALUE_HERE with the value of one of the options values.
  • krileon
16 Apr 2026 17:19
Replied by krileon on topic Documentation for client-side validation API?
We use cbjQuery because we're using NoConflict. Joomla previously would be behind on jQuery version. So we had to implement newer jQuery version without breaking Joomla. Like I said we've been around for a very long time. As in Joomla 1.0 long time. A lot of these implementations are just technical debt we'll be clearing out with CB 3.0.

You shouldn't need to poll anything. Where are you trying to add your custom JavaScript? If it's from PHP all you need to do is be sure CB is loaded, which you can do with the below documentation and use cbValidator::addRule to inject your validation rule into the page.

www.joomlapolis.com/documentation/127-community-builder/279-tutorials/18357-including-cb-api-for-usage-outside-of-cb

CB Auto Actions won't really require any learning. It's a no-code or low-code tool depending on the auto action. Basically just a few parameters to adjust. The below for example will let you inject whatever jQuery you want into profile edit and registration pages.

Global
Triggers: onAfterUserProfileEditDisplay, onAfterRegisterFormDisplay
Type: Code
User: Automatic
Access: Everybody
Action
Method: jQuery
Code:
Code:
ADD_JQUERY_HERE

That's all there is to it. You can even use CB Content Module funny enough. It supports outputting custom jQuery on any page the module is rendered so if that'd be easier for you that can also work. Neither require any coding beyond whatever jQuery or JavaScript you supply.
  • krileon
10 Apr 2026 13:38
Replied by krileon on topic Auto delete of past events
Ok, the below auto action will delete all expired events. This should also delete their activity since it's doing so from their objects. It takes the end date of the event, or the start date if it doesn't have one, and adds 24 hours to it then checks if the current date is greater than that. If it is then it's considered expired.

Global
Triggers: None
Type: Code
User: Automatic
Access: Everybody
Action
Method: PHP
Code:
Code:
global $_CB_database; $query = "SELECT *" . " FROM " . $_CB_database->NameQuote( '#__groupjive_plugin_events' ) . " WHERE ( ( " . $_CB_database->NameQuote( 'end' ) . " = " . $_CB_database->Quote( '0000-00-00 00:00:00' ) . " OR " . $_CB_database->NameQuote( 'end' ) . " IS NULL ) AND DATE_ADD( " . $_CB_database->NameQuote( 'start' ) . ", INTERVAL 24 HOUR ) < NOW() )" . " OR ( ( " . $_CB_database->NameQuote( 'end' ) . " != " . $_CB_database->Quote( '0000-00-00 00:00:00' ) . " AND " . $_CB_database->NameQuote( 'end' ) . " IS NOT NULL ) AND DATE_ADD( " . $_CB_database->NameQuote( 'end' ) . ", INTERVAL 24 HOUR ) < NOW() )"; $_CB_database->setQuery( $query ); foreach ( $_CB_database->loadObjectList( null, '\CB\Plugin\GroupJiveEvents\Table\EventTable', [ $_CB_database ] ) as $event ) { $event->delete(); }

Now comes the part of how you want to run this. You can use a Joomla scheduled task to run it on regular intervals as CB Auto Actions includes a scheduled task for running auto actions or you can setup CRON to access the auto action directly. If you plan to use a Joomla scheduled task then please be sure to set "Allow Direct Access" to "No" under the Global tab otherwise leave it as "Yes" and schedule a wget CRON against the "Internal Action URL".

Also since this is a mass delete operation please be sure you make a backup and test carefully.
  • krileon
30 Mar 2026 14:15
We have no functionality to auto downgrade someone into a different plan on expiration. Generally you just let the user do that themselves if they choose to not renew. It's possible to automate this with CB Auto Actions though. You'd use the same plan expiration logic I provided earlier.

Plan Expired
Global
Triggers: onCPayUserStateChange
User: Automatic
Access: Everybody
Conditions
Condition 1
Field: Custom > Value
Custom Value: [var3]
Operator: Equal To
Value: PLAN_ID_HERE
Condition 2
Field: Custom > Value
Custom Value: [var2]
Operator: Not Equal To
Value: A

The above will work with any auto action type. So if you want to subscribe them into a new plan for example set the Type to CB Paid Subscriptions and configure the Action tab accordingly to your needs.
  • krileon
27 Mar 2026 16:28
That should be a pretty simple straight forward configuration. Do you have email confirmation and/or admin approval enabled? That'd change things a little bit since you'd probably want to wait for them to be confirmed and/or approved before forcing them to join. The below for example is without confirmation or admin approval.

Registered
Global
Triggers: onAfterUserRegistration
Type: CB GroupJive
User: Automatic
Access: Everybody
Action
Mode: Join Groups
Groups: SELECT_GROUPS_HERE

That's all there is to it. They'd be placed in whatever groups you selected after they register. If you have confirmation and want to wait for them to be confirmed you can use the below. Basically just a trigger change with a condition to ensure confirmation state is switching to confirmed

Confirmed
Global
Triggers: onAfterUserConfirm
Type: CB GroupJive
User: Automatic
Access: Everybody
Conditions
Field: Custom > Value
Custom Value: [var2]
Operator: Equal To
Value: 1
Action
Mode: Join Groups
Groups: SELECT_GROUPS_HERE

Now when they confirm their email they'll be placed in the groups instead of directly after registering. If you have moderator approval it's again just a relatively simply change. Is actually just a literal trigger change from the above.

Approved
Global
Triggers: onAfterUserApproval
Type: CB GroupJive
User: Automatic
Access: Everybody
Conditions
Field: Custom > Value
Custom Value: [var2]
Operator: Equal To
Value: 1
Action
Mode: Join Groups
Groups: SELECT_GROUPS_HERE

Now when you confirm their account they'll be placed in the selected groups. Note you only need to use one of the above. Don't use all 3. Which you use is entirely up to you and your configuration.

PS: We inaugurate our community site tonight, I added your name in the credits

I appreciate it, but no need to credit me personally. We're a team here so if you do want to credit us just credit Joomlapolis. 😊
  • krileon
18 Mar 2026 15:13
The below should work then. Since the option was pushed to a field that'll be the easiest way to condition against the selection.

Plan Active
Global
Triggers: onCPayUserStateChange
Type: Usergroups
User: Automatic
Access: Everybody
Conditions
Condition 1
Field: cb_category_access
Operator: Equal To
Value: OPTION_VALUE_HERE
Condition 2
Field: Custom > Value
Custom Value: [var3]
Operator: Equal To
Value: PLAN_ID_HERE
Condition 3
Field: Custom > Value
Custom Value: [var2]
Operator: Equal To
Value: A
Action
Mode: Add Usergroups
Groups: SELECT_USERGROUPS_HERE
Parameters
Reload User: Yes

Replace OPTION_VALUE_HERE with whatever your option value. Replace PLAN_ID_HERE with whatever the plan id is. For SELECT_USERGROUPS_HERE select whatever usergroups that option should give. You can also remove usergroups added by other options here as well.

You'll need 1 auto action per cb_category_access value so that you can uniquely add your usergroups per option value.

Plan Expired
Global
Triggers: onCPayUserStateChange
Type: Usergroups
User: Automatic
Access: Everybody
Conditions
Condition 1
Field: Custom > Value
Custom Value: [var3]
Operator: Equal To
Value: PLAN_ID_HERE
Condition 2
Field: Custom > Value
Custom Value: [var2]
Operator: Not Equal To
Value: A
Action
Mode: Remove Usergroups
Groups: SELECT_USERGROUPS_HERE

As like before set PLAN_ID_HERE to your plan id and then for SELECT_USERGROUPS_HERE select all the usergroups added by your options so that they get cleared if their plan expires. You don't need multiple of these for the different cb_category_access options. This single auto action should be responsible for clearing their usergroups.
  • krileon
09 Feb 2026 15:45
Replied by krileon on topic Solved/ email while creating a new group
CB GroupJive doesn't have that functionality so no it's not doable without implementing it yourself. It however can be implemented using CB Auto Actions. The below should work.

Global
Triggers: gj_onAfterCreateGroup
Type: Email
User: Automatic
Access: Everybody
Action
To: query
To Query:
Code:
SELECT `email` FROM `#__users` WHERE `block` = 0
Subject: EMAIL_SUBJECT_HERE
Body: EMAIL_MESSAGE_HERE

That should email every user when a group is created. I would recommend caution with this. It'd be easy to spam users with too many emails by doing this and could result in your email domain being blacklisted if too many people report you as spam.
  • krileon
05 Feb 2026 16:00
The below would mimic what the internal behavior is doing.

Global
Triggers: onAfterUserRegistration
Type: CB Activity
User: Automatic
Access: Everybody
Action
Mode: Activity
Method: Create
Stream: Profile Activity
Asset: profile.[user_id].registration
Load By: None

That asset would just result in the same title displayed as the internal activity, which is "joined the site". Note that is a language string so you could just override it for example. To avoid that you could create your own asset. Below for example would work fine.

Asset: profile.[user_id].registered
Title: My Title
Message: My Message
  • krileon
26 Jan 2026 14:41
Replied by krileon on topic Auto Actions - new article
Sure, that would rely on a Joomla content event. You can find more information about Joomla content events below.

manual.joomla.org/docs/next/building-extensions/plugins/plugin-events/content/

Specifically you'll be using onContentAfterSave and to use a Joomla event in CB Auto Actions you'll need to prefix it with joomla_ giving joomla_onContentAfterSave. Since these are filtered by context you'll need an article context with is com_content.article. Below is the details for the onContentAfterSave event and what variables it contains.

manual.joomla.org/docs/next/building-extensions/plugins/plugin-events/content/#oncontentaftersave

This can all be put together using the below example.

Global
Triggers: joomla_onContentAfterSave
Type: Email
User: Automatic
Access: Everybody
Conditions
Condition 1
Field: Custom > Value
Custom Value: [var1]
Operator: Equal To
Value: com_content.article
Condition 2
Field: Custom > Value
Custom Value: [var3]
Operator: Equal To
Value: 1
Condition 3
Field: Custom > Value
Custom Value: [var2_catid]
Operator: Equal To
Value: CATEGORY_ID_HERE

Replace CATEGORY_ID_HERE with the id of the category you want this applying to. You can use an "In" condition to supply a comma list of category ids as well if you need more than 1 category. It should only apply to newly created articles due to the var3 ($isNew) check. Next just configure the rest of the email however you like.
  • krileon
02 Jan 2026 18:33
Ok, latest CB Gallery build release now has the slashed eye indicator for published state implemented. I've implemented it throughout all views that have indicator icons including grid views for both albums and media. Even media modal windows will indicate unpublished next to the menu dropdown.

I am not (yet) familiar with autoaction plugin, so i will be happy if you can provide such example, thank you !

This might be quite complicated if you've no CB Auto Actions experience, but the configuration example is as follows for the auto action. Basically what we'll be doing is overriding the date handling for the CB Activity logging behavior for CB Gallery activity. Some of the below might be confusing if you've no CB Auto Actions experience so I'd recommend just installing it and exploring it first before putting together auto actions. This assumes you still want to go through with doing this. I don't particularly recommend it since it causes media to go outside the flow of things, but it's up to you.

Global
Triggers: activity_onBeforeActivityEntitySave
Type: Code
User: Automatic
Access: Everybody
Conditions
Field: Custom > Value
Custom Value: [cb:parse function="getAsset" class="var1" /]
Format Functions: Yes
Operator: Is REGEXP
REGEXP: /^gallery\./
Action
Method: PHP
Code:
Code:
$variables['var1']->setDate( \CBLib\Application\Application::Database()->getUtcDateTime() );
Parameters
Reference Variables: Variable 1

I've confirmed the above works to force the activity date to be the current datetime causing it to ignore the date of the gallery entry itself.
  • krileon
22 Dec 2025 15:19
By sending an email I meant use an Email action. That's what I used in my tests with success. Are you sure your gateway id is correct? You need to provide the number under the Id column and not under the # column.

It's possible to act on payment state change as well. That maybe more ideal since you're just needing to act on successful payments from paypal. Below is tested working as well.

Global
Triggers: onCPayAfterPaymentStatusChange
User: Automatic
Access: Everybody
Conditions
Condition 1
Field: Custom > Value
Custom Value: [var4]
Operator: Equal To
Value: Completed
Condition 2
Field: Custom > Value
Custom Value: [var2_gateway_account]
Operator: Equal To
Value: YOUR_PAYPAL_GATEWAY_ID_HERE

This is just acting on a payment basket being marked completed for a specific payment gateway. Below was used in both test examples.

Global
Type: Email
Action
Subject: Payment Test Email
Body: Success!
  • liaskas
20 Dec 2025 14:44 - 20 Dec 2025 15:00
I have spent the whole week testing without success, and finally i returned back to the very basic!
My goal is to fire a php code after cb subs payments return complete from paypal.

Auto Action
Global
Triggers: onCPayUserStateChange
Type: Code
User: Automatic
Access: Everybody

Conditions:
Condition 1
Custom Value: [var2]
Operator: Equal To
Value: A
Condition 2
Field: Custom > Code
Code:Code:return ( $variables->getCurrentBasket()->gateway_account ?? 0 );Operator: Equal To
Value: 5

Action:
Method: PHP
Code:
Code:
$mailer = \Joomla\CMS\Factory::getMailer(); $mailer->addRecipient('name@domain.com'); //(where info@domain.com is my e-mail) $mailer->setSubject('OSS PHP AUTO ACTION TEST'); $mailer->setBody('If you receive this email, PHP Auto Actions ARE executing.'); $mailer->Send();

The mail is not sent! Is the code wrong or the auto action is not firing? (tested with more that 10 real payments from clients)

What am i doing wrong?
 
Displaying 1 - 15 out of 36 results.
Powered by Kunena Forum