Ciao,
quando cerco di visualizzare un profilo entrando da groupjivi mi viene restituito l'errore che riporto sotto.
Mi potete aiutare ad eliminarlo? In calce il codice del file incriminato.
Spero in una vostra risposta veloce...
Warning: getGroupjiveTab::include_once(C:\xampp\htdocs\TEST2/administrator/components/com_groupjive/gj_config.php) [function.getGroupjiveTab-include-once]: failed to open stream: No such file or directory in C:\xampp\htdocs\TEST2\components\com_comprofiler\plugin\user\plug_groupjivetab\groupjive.php on line 44
Warning: getGroupjiveTab::include_once() [function.include]: Failed opening 'C:\xampp\htdocs\TEST2/administrator/components/com_groupjive/gj_config.php' for inclusion (include_path='.;C:\xampp\php\pear\') in C:\xampp\htdocs\TEST2\components\com_comprofiler\plugin\user\plug_groupjivetab\groupjive.php on line 44
Warning: getGroupjiveTab::include_once(C:\xampp\htdocs\TEST2/components/com_groupjive/language/english/english.php) [function.getGroupjiveTab-include-once]: failed to open stream: No such file or directory in C:\xampp\htdocs\TEST2\components\com_comprofiler\plugin\user\plug_groupjivetab\groupjive.php on line 54
Warning: getGroupjiveTab::include_once() [function.include]: Failed opening 'C:\xampp\htdocs\TEST2/components/com_groupjive/language/english/english.php' for inclusion (include_path='.;C:\xampp\php\pear\') in C:\xampp\htdocs\TEST2\components\com_comprofiler\plugin\user\plug_groupjivetab\groupjive.php on line 54
<?php
/*************************************************************
* Joomla Community Builder Groupjive Plugin
* $Rev:: $: Revision of last commit
* $Author:: $: Author of last commit
* $Date:: $: Date of last commit
* $Id:: $: ID
* @package Community Builder
* @author Michael Perthel <micha@voodootools.de>
* @link
http://voodootools.de* @ Released under GNU/GPL License :
http://www.gnu.org/copyleft/gpl.html*************************************************************/
defined( '_VALID_MOS' ) or defined( '_JEXEC' ) or die( 'Direct Access to this location is not allowed.' );
class getGroupjiveTab extends cbTabHandler {
/**
* Constructor
*/
function getGroupjiveTab() {
$this->cbTabHandler();
}
/**
* Generates the HTML to display the user profile tab
* @param object tab reflecting the tab database entry
* @param object mosUser reflecting the user being displayed
* @param int 1 for front-end, 2 for back-end
* @returns mixed : string HTML for tab content
*/
function getDisplayTab($tab,$user,$ui) {
global $_CB_database, $_CB_framework, $option, $gjConfig;
$jPath = $_CB_framework->getCfg( 'absolute_path' );
$jLiveSite = $_CB_framework->getCfg( 'live_site' );
$jLang = $_CB_framework->getCfg( 'lang' );
$gjp_path = $jPath.'/components/com_comprofiler/plugin/user/plug_groupjivetab';
include_once($jPath.'/administrator/components/com_groupjive/gj_config.php');
$sql = 'SELECT hideprivate FROM #__gj_options';
$_CB_database->setQuery($sql);
$hideprivate = $_CB_database->loadResult();
if (file_exists($jPath.'/components/com_groupjive/language/'.$jLang.'/'.$jLang.'.php')) {
include_once($jPath.'/components/com_groupjive/language/'.$jLang.'/'.$jLang.'.php');
}
else {
include_once($jPath.'/components/com_groupjive/language/english/english.php');
}
if (file_exists($gjp_path.'/language/'.$jLang.'.php')) {
include_once($gjp_path.'/language/'.$jLang.'.php');
}
else {
include_once($gjp_path.'/language/english.php');
}
$return="";
// get params
$params = $this->params;
$showcatimages = $params->get('gj_showcatimages', '1');
$showgroupimages = $params->get('gj_showgroupimages', '1');
$template = $params->get('gj_template', 'default.tmpl');
// check if default logo exists
if (file_exists($jPath. '/images/com_groupjive/tngroupjive_default.png')) {
$defaultlogo = 'tngroupjive_default.png';
}
else {
$defaultlogo = 'groupjive_mini.png';
}
// get groups from user
if (!intval($user->id)) {
die("Userid is not integer!");
}
$sSQL = 'SELECT id_group FROM #__gj_users '
. 'WHERE id_user = '.$user->id
. ' AND status = "active"'; // only groups where the user is active
$_CB_database->setQuery($sSQL);
$groupnums=$_CB_database->loadResultArray();
//sql error handling
if ($_CB_database->getErrorNum ()) {
echo $_CB_database->stderr();
return false;
}
// if there are no groups - return message
if(!$groupnums) {
return UE_GROUPJIVE_NOGROUPSFOUND;
}
// default CB image for specific language
$thumbnail="/components/com_comprofiler/plugin/language/"
. $jLang."/images/tnnophoto.jpg";
// check if default image exists in specific language
if (file_exists($jPath.$thumbnail)) {
$defaultCbImage = $jLiveSite.$thumbnail;
} else {
$defaultCbImage = $jLiveSite
. "/components/com_comprofiler/plugin/"
. "language/default_language/images/"
. "tnnophoto.jpg";
}
// if there are any groups return them
$sSQLgroupNums = implode(", ", $groupnums);
// get groups details
$nameSql = 'f.username';
if ($gjConfig['real_names']) {
$nameSql = "f.name";
}
$sSQL = 'SELECT a.id, a.name, a.descr, c.id as catid, c.catname, '
. 'c.cat_image, a.logo, a.type, '
. $nameSql.' as creator, a.user_id, d.avatar, COUNT(a.user_id) as membercount, '
. 'e.id_user FROM #__gj_groups AS a '
. 'INNER JOIN #__gj_users AS b ON a.id = b.id_group '
. 'INNER JOIN #__gj_grcategory AS c ON a.category = c.id '
. 'INNER JOIN #__comprofiler AS d ON a.user_id = d.id '
. 'INNER JOIN #__users AS f ON a.user_id = f.id '
. 'LEFT JOIN #__gj_users AS e '
. 'ON a.id = e.id_group AND e.id_user = '.$_CB_framework->myId().' '
. 'GROUP BY a.id, a.name, a.descr, c.id, c.catname, '
. 'a.creator, a.user_id, d.avatar '
. 'HAVING a.id IN ('. $sSQLgroupNums .')'
. ' ORDER BY catname, name;';
$_CB_database->setQuery($sSQL);
$groups=$_CB_database->loadObjectList();
//sql error handling
if ($_CB_database->getErrorNum ()) {
echo $_CB_database->stderr();
return false;
}
// prepare template
if (file_exists($jPath.'/includes/patTemplate/patTemplate.php')) {
require_once( $jPath.'/includes/patTemplate/patTemplate.php' );
}
if (file_exists($jPath.'/plugins/system/legacy/patfactory.php')) {
require_once( $jPath.'/plugins/system/legacy/patfactory.php' );
}
$tmpl =& patFactory::createTemplate( $option, true, false );
$tmpl->setRoot( dirname( __FILE__ ) . '/templates' );
$tmpl->readTemplatesFromInput($template);
if ($gjConfig['real_names']) {
$tmpl->addVar( 'cb_plugin_groupjive', 'USERNAME', $user->name);
}
else {
$tmpl->addVar( 'cb_plugin_groupjive', 'USERNAME', $user->username);
}
// count the groups
switch(count($groups)) {
case 0 : $tmpl->addVar( 'cb_plugin_groupjive', 'COUNT_GROUPS', UE_GROUPJIVE_NOGROUP );
break;
case 1 : $tmpl->addVar( 'cb_plugin_groupjive', 'COUNT_GROUPS',
count($groups).' '.UE_GROUPJIVE_ONEGROUP );
break;
default : $tmpl->addVar( 'cb_plugin_groupjive', 'COUNT_GROUPS',
count($groups).' '.UE_GROUPJIVE_GROUPS );
break;
}
// get current language for nophoto
if(!is_dir($jPath."/components/com_comprofiler/plugin/language/".$jLang."/images")) {
$jLang="default_language";
}
// prepare the data
$tmplrowdata = array();
for ($j=0;$j<count($groups);$j++) {
$tmplrow = get_object_vars($groups[$j]);
// check if gallery image or custom image or nophoto
if (substr($tmplrow['avatar'], 0, 7) == 'gallery') {
$thumbnail = "/images/comprofiler/".$tmplrow['avatar'];
} else if ($tmplrow['avatar'] != '') {
$thumbnail = "/images/comprofiler/tn".$tmplrow['avatar'];
} else {
$thumbnail = $defaultCbImage;
}
// check if thumbnails exists
if (file_exists($jPath.$thumbnail)) {
// image exists
$image=$jLiveSite.$thumbnail;
} else {
$image = $defaultCbImage;
}
// check if category image exists
if (!file_exists($jPath
. '/images/com_groupjive/tn'
. $tmplrow['cat_image'])) {
$tmplrow['cat_image'] = '<img src="'.$jLiveSite
.'/images/com_groupjive/'.$defaultlogo
. '" style="border:none;" alt="'
. $tmplrow['catname'].'" />';
} else {
$tmplrow['cat_image'] = '<img src="'.$jLiveSite
.'/images/com_groupjive/tn'
. $tmplrow['cat_image'].'" style="border:none;" alt="'
. $tmplrow['catname'].'" />';
}
if ($showcatimages==1){
$tmplrow['categorylink'] = '<a href="'.cbSef('index.php?option='
. 'com_groupjive&action=gj.core.categories.showcategory&catid='
. $tmplrow['catid']).'">'
. $tmplrow['cat_image']
. '
'.$tmplrow['catname'].'[/url]';
} else {
$tmplrow['categorylink'] = '<a href="'.cbSef('index.php?option='
. 'com_groupjive&action=gj.core.categories.showcategory&catid='
. $tmplrow['catid']).'">'
. $tmplrow['catname'].'[/url]';
}
// check if group image exists
if (!file_exists($jPath
. '/images/com_groupjive/tn'
. $tmplrow['logo'])) {
$tmplrow['logo'] = '<img src="'.$jLiveSite
. '/images/com_groupjive/'.$defaultlogo
. '" style="border:none;" alt="'
. $tmplrow['name'].'"/>';
} else {
$tmplrow['logo'] = '<img src="'.$jLiveSite
. '/images/com_groupjive/tn'
. $tmplrow['logo'].'" style="border:none;" alt="'
. $tmplrow['name'].'"/>';
}
// Comprofiler image
$tmplrow['creatorimage'] = $image;
// check if visitor is still a member of the group
if ($tmplrow['id_user'] == $_CB_framework->myId()) {
$tmplrow['actionlink'] = UE_GROUPJIVE_ALREADY_MEMBER;
} else {
$tmplrow['actionlink'] = '<a href="'.cbSef('index.php?option='
. 'com_groupjive&action=gj.core.groups.sign&groupid='
. $tmplrow['id']).'">'.UE_GROUPJIVE_JOINGROUP.$tmplrow['id_user']
. '[/url]';
}
// link to visit the group
$tmplrow['visitlink'] = '<a href="'.cbSef('index.php?option='
. 'com_groupjive&action=gj.core.groups.showgroup&groupid='
. $tmplrow['id']).'">'.UE_GROUPJIVE_VIEWGROUP.'[/url]';
if ($showgroupimages==1){
$tmplrow['grouplink'] = '<a href="'.cbSef('index.php?'
. 'option=com_groupjive&'
. 'action=gj.core.groups.showgroup&groupid='
. $tmplrow['id']).'">'.$tmplrow['logo']
. '
'.$tmplrow['name'].'[/url]';
}
else {
$tmplrow['grouplink'] = '<a href="'.cbSef('index.php?'
. 'option=com_groupjive&'
. 'action=gj.core.groups.showgroup&groupid='
. $tmplrow['id']).'">'.$tmplrow['name']
. '[/url]';
}
// check type
if($tmplrow['type']==1) {
$tmplrow['type'] = GJ_OPEN;
}
elseif($tmplrow['type']==2) {
$tmplrow['type'] = GJ_APREQUIRED;
}
elseif($tmplrow['type']==3) {
$tmplrow['type'] = GJ_PRIVATE;
if ($tmplrow['id_user'] != $_CB_framework->myId()) {
$tmplrow['actionlink'] = ' ';
$tmplrow['visitlink'] = ' ';
$tmplrow['grouplink'] = $tmplrow['name'];
}
}
$tmplrow['cbFieldTip'] = cbFieldTip($ui, $tmplrow['descr'], $tmplrow['name']);
if (!($hideprivate && $tmplrow['type'] == GJ_PRIVATE && $tmplrow['id_user'] != $_CB_framework->myId())) {
array_push($tmplrowdata, $tmplrow);
}
}
$tmpl->addRows( 'groups_list', $tmplrowdata);
// credits - please respect GPL - 2c
// see:
http://www.phpnuke.org/modules.php?name=News&file=article&sid=4947 // you can get a version without credits by signing a dot membership
// please contact micha@voodootools.de
// DOT membership download = no visible copyright notice
// 5337dedb19e62080412bc7e5c9376f9d
$credits = '<p align="center"><small>CB Groupjivetab Copyright © 2007 by <a href="
http://www.voodootools.de" target="_blank">voodootools.de[/url].
This is free software, and you may redistribute it under the <a href="
http://www.gnu.org/licenses/gpl.html" target="_blank">GPL[/url].
CB Groupjivetab comes with absolutely no warranty; for details, see the <a href="
http://www.gnu.org/licenses/gpl.html" target="_blank">license[/url].</small></p>';
return $tmpl->getParsedTemplate( 'cb_plugin_groupjive' ).$credits;
}
function loadTemplateList($name,$value,$control_name) {
$templates = array();
$templateBaseDir = dirname(__FILE__). '/templates' ;
if ($handle = opendir($templateBaseDir)) {
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != ".." && is_dir(dirname(__FILE__).'/templates/'.$file)==false) {
$templates[] = moscomprofilerHTML::makeOption($file, $file);
}
}
closedir($handle);
}
return moscomprofilerHTML::selectList( $templates, $control_name .'['. $name .'][]', 'size="1"', 'value', 'text', $value, true );
}
} // end class getGroupjiveTab.
?>