Skip to Content Skip to Menu

Introduction

The CB Auto Action plugin (as of version 3.4), which is part of the Professional and Developer membership, supports CBSubs GPL actions and also listens to CBSubs GPL and GroupJive events.

This might sound technical to many of us but it opens up hundreds of possibilities.

This use case presents two example auto-actions that make use of GroupJive event triggers to perform specific CBSubs GPL actions.

Use case description

A website is using CB GroupJive to empower its members to create their own common interest mini-communities. The website is also using CBSubs GPL to manage various subscription levels and provide extra privileges (e.g., access to specific Joomla content) to members based on their subscriptions.

It would be great to automatically subscribe a user to a specific CBSubs GPL plan when the users joins a specific GroupJive group and to delete the subscription when the user leaves the GroupJive group. This way the GroupJive group member will be able to enjoy the privileges allocated by CBSubs GPL to the plan subscribers.

These 2 auto-actions (one for joining the group and one for leaving) are illustrated in the following sections.

 

Auto action to give newly joined group member a subscription

The auto-action to give a specific CBSubs GPL plan subscription to a user that joins a specific GroupJive group has the following paramter settings:

  • Type: CB Paid Subscriptions 3.x
  • Trigger: gj_onAfterCreateUser (this is fired whenever a new groupjive group membership happens.
  • User: Manually | Variable 4 (this is used to grab the right user object for the user actually joining the group)
  • Conditional: [var2_id] Equal To 1 (this condition filters all new group membership events to keep only those that are related to our specific group - in our example the groupid is 1 - you can find the group id of your specific group by looking in the GroupJive backend Group panel summary table in the last colum)
  • CB Paid Subscriptions 3.x Action Plan: We have selected the ADV alias (you should see all your CBSubs alias listed here)
  • CB Paid Subscriptions 3.x Action Mode: We have selected Subscribe from the drop-down options

These settings are illustrated in the following screenshot:

 aa-cbsubs-gj-1

 

Auto action to remove subscription when member leaves a group

The auto-action to delete a specific CBSubs GPL plan subscription from a user that leaves a specific GroupJive group has the following paramter settings:

  • Type: CB Paid Subscriptions 3.x
  • Trigger: gj_onAfterDeleteUser (this is fired whenever a new groupjive group membership happens.
  • User: Manually | Variable 4 (this is used to grab the right user object for the user actually joining the group)
  • Conditional: [var2_id] Equal To 1 (this condition filters all new group membership events to keep only those that are related to our specific group - in our example the groupid is 1 - you can find the group id of your specific group by looking in the GroupJive backend Group panel summary table in the last colum)
  • CB Paid Subscriptions 3.x Action Plan: We have selected the ADV alias (you should see all your CBSubs alias listed here)
  • CB Paid Subscriptions 3.x Action Mode: We have selected Delete from the drop-down options

These settings are illustrated in the following screenshot:

 

aa-cbsubs-gj-2

 

Summary

The swiss-army knife CB Auto Actions plugin is used here to configure actions that automatically add or remove a CBSubs GPL subscription to/from a user when the user joins/leaves a specific GroupJive group. We hope this tutorial inspires you and helps you fine tune your specific membership community builder website.

The following elements were used to implement and test the use cases presented in this tutorial:

  • Joomla 2.5.8 (but everything should work just fine on Joomla 1.5.x and 3.0.x environments)
  • Community Builder 1.9
  • CB GroupJive 2.6.1
  • CBSubs GPL 3.0