Skip to Content Skip to Menu

Third party component as extra CB groupjive tab?

2 years 7 months ago #329122 by pjfroelofs
Is it possible to show a third party component, into the tab of CB groupjive?
So every group has its own ‘time line’ ?

This is the extension we are talking about:
www.nordmograph.com/extensions/index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=117&virtuemart_category_id=1&Itemid=58



Please advice,
Regards,
Patrick

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
2 years 7 months ago #329124 by krileon
If it's a Joomla module then that's easily accomplished using Joomla's built in loadmodule behavior in a Custom HTML field with content plugins enabled (see parameter under parameters tab). If its rendering is done entirely through a component view you'd need to explore using something like Components Anywhere to try and render it using a shortcode (similar to loadmodule) in a Custom HTML module. If they have their own shortcode then that would also work same as loadmodule does.


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.

Please Log in or Create an account to join the conversation.

2 years 6 months ago - 2 years 6 months ago #329426 by pjfroelofs
Replied by pjfroelofs on topic Third party component as extra CB groupjive tab?
Thanks for your swift reply.

I'm sorry I did not make myself clear.
Want I would like to realise:

In a typical groupjive group, like in this image:


We would like to have a new TAB named eg 'New' (next to ...Deelnemers - Uitnodigingen - New)
And in this tab a module is shown.

This means we have to manually add a different module to each Groupjive Groups.
And what that module shows (different for every group) is for example:



Please advise,
regard,
Patrick
Last edit: 2 years 6 months ago by pjfroelofs.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
2 years 6 months ago #329432 by krileon
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:
Code:
Hello my new tab!
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!';


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.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum