After loading CB API you need to load the needed plugin group. Once that's loaded you can load a plugin by its id or element, but since id isn't static you need to do this by element. Below is an example of this usage.
Code:
if ( ( ! file_exists( JPATH_SITE . '/libraries/CBLib/CBLib/Core/CBLib.php' ) ) || ( ! 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' );
cbimport( 'cb.html' );
cbimport( 'language.front' );
$_PLUGINS->loadPluginGroup( 'templates' );
$plugin = $_PLUGINS->getLoadedPlugin( 'templates', 'PLUGIN_ELEMENT_HERE' );
if ( ! $plugin) {
return;
}
$params = $_PLUGINS->getPluginParams( $plugin );
You can find the plugin element within CB > Plugin Management under the element column or by editing the plugin.