Ah, sorry. Misunderstood what you were asking. The only way to add a new tab to GJ is via API, but you can shortcut that by using CB Auto Actions. The below will render a new tab in CB GroupJive.
Global
Triggers: gj_onBeforeDisplayGroup
Type: Code
User: Self
Access: Everybody
Conditions
Field: Custom > Value
Custom Value: [var2_published]
Operator: Equal To
Value: 1
Action
Method: HTML
Code:
Output
Display: return
Layout:
Code:
return array( 'id' => 'MY_TAB_ID', 'title' => \CBLib\Language\CBTxt::T( 'MY_TAB_TITLE' ), 'content' => $content );
Method: PHP
As for the Code under Action it can basically be whatever you need. If you need PHP to call a 3rd party extensions API to render that extension then you'd do that there. If you wanted to substitute in a Joomla module then turn on "Content Plugins" under Parameters and use a loadmodule shortcode for example.
Replace MY_TAB_ID with a unique ID for your tab and replace MY_TAB_TITLE with whatever you want the tabs title to be.
If you need this unique for each group you'll need either 1 auto action per group or in your Code check for group when outputting whatever you need to output. You can get the group id using [var2_id] to either condition against as follows.
Field: Custom > Value
Custom Value: [var2_published]
Operator: Equal To
Value: GROUP_ID_HERE
Or within your code as follows.
Method: PHP
Code:
Code:
if ( $variables['var2']->id != 23 ) {
return '';
}
return 'group id of 23 being displayed!';