Skip to Content Skip to Menu

[SOLVED] Using cbgjClass::getNotification for group notifications to users

10 years 2 months ago - 10 years 2 months ago #248474 by asierraserna
Hello my friends!

I have been using cbgjClass::getNotification to send notifications to users and it is working perfectly :laugh: , but I have a problem to load the libraries to use it in a code I'm writing from zero.


I'm using this to load the Community Builder Foundation:
Code:
global $_CB_framework, $mainframe; if ( defined( 'JPATH_ADMINISTRATOR' ) ) { if ( ! file_exists( JPATH_ADMINISTRATOR . '/components/com_comprofiler/plugin.foundation.php' ) ) { echo 'CB not installed!'; return; } include_once( JPATH_ADMINISTRATOR . '/components/com_comprofiler/plugin.foundation.php' ); } else { if ( ! file_exists( $mainframe->getCfg( 'absolute_path' ) . '/administrator/components/com_comprofiler/plugin.foundation.php' ) ) { echo 'CB not installed!'; return; } include_once( $mainframe->getCfg( 'absolute_path' ) . '/administrator/components/com_comprofiler/plugin.foundation.php' ); } cbimport( 'cb.plugins' );

But I can't figure out how to include the GroupJive foundation.
How can I do it?

I'm receiving this error message when trying to use cbgjData:: or cbgjClass:: functions

Fatal error: Class 'cbgjData' not found in /home...

Please SOS!
Last edit: 10 years 2 months ago by krileon.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48479
  • Thanks: 8282
  • Karma: 1443
10 years 2 months ago #248499 by krileon
You need to load in GJs class file as well. See the GJ module included with the GJ plugin for an example of how to load in CB and GJ API externally. Example as follows.

Code:
global $_CB_framework, $mainframe; if ( defined( 'JPATH_ADMINISTRATOR' ) ) { if ( ! file_exists( JPATH_ADMINISTRATOR . '/components/com_comprofiler/plugin.foundation.php' ) ) { return; } require_once( JPATH_ADMINISTRATOR . '/components/com_comprofiler/plugin.foundation.php' ); } else { if ( ! file_exists( $mainframe->getCfg( 'absolute_path' ) . '/administrator/components/com_comprofiler/plugin.foundation.php' ) ) { return; } require_once( $mainframe->getCfg( 'absolute_path' ) . '/administrator/components/com_comprofiler/plugin.foundation.php' ); } cbimport( 'cb.html' ); if ( ! file_exists( $_CB_framework->getCfg( 'absolute_path' ) . '/components/com_comprofiler/plugin/user/plug_cbgroupjive/cbgroupjive.class.php' ) ) { return; } require_once( $_CB_framework->getCfg( 'absolute_path' ) . '/components/com_comprofiler/plugin/user/plug_cbgroupjive/cbgroupjive.class.php' );


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

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

10 years 2 months ago #248506 by asierraserna
Thanks a lot Kyle!!! as usual your answer helped a lot!

I will let you know if I face any other issue, but so far is going great.

Cheers!
The following user(s) said Thank You: krileon

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

Moderators: beatnantkrileon
Powered by Kunena Forum