Hi,
The PHP code below (in a CB Content module using
regularlabs.com/sourcerer
, to add custom PHP code) is displaying the GJ logo of a given group-id (in this example 133) fine on every CB and GJ pages.
Code:
{source}
<?php
global $_CB_framework, $_PLUGINS;
$group = new \CB\Plugin\GroupJive\Table\GroupTable();
$group_id = '133';
$group->load( $group_id );
$logo = $group->logo( $thumbnail = true, $html = true, $linked = true, $classes = null );
echo $logo;
?>
{/source}
But it is not giving any output on my home-page.
So I read
www.joomlapolis.com/documentation/279-community-builder/tutorials/18357-including-cb-api-for-usage-outside-of-cb
and add those 5 extra lines of code on top, which results in this module PHP code:
Code:
{source}
<?php
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' );
outputCbTemplate();
global $_CB_framework, $_PLUGINS;
$group = new \CB\Plugin\GroupJive\Table\GroupTable();
$group_id = '133';
$group->load( $group_id );
$logo = $group->logo( $thumbnail = true, $html = true, $linked = true, $classes = null );
echo $logo;
?>
{/source}
But still there is no group logo or any other data displayed when using this module (with PHP-code) on the home-page.
Any idea how to show a GJ Group logo (of a given Group-id) on a CB website home-page?
Regards, Noa