Tento di creare un nuovo field e mi esce questo errore
Fatal error: Cannot redeclare class CBfield_forumstats in /web/htdocs/nome sito/home/components/com_comprofiler/plugin/user/plug_cbsimpleboardtab/cb.simpleboardtab.php on line 65
uso cb 1.2
J! 1.5.9
e il plugin è di kunena credo
ecco le prime 65 righe di codice del file incriminato, l'ultima la 65° è la parentesi graffa chiusa :|
qualcuno sa aiutarmi?
<?php
/**
* Forum Tab Class for handling the CB tab api
* @version $Id: cb.simpleboardtab.php 415 2006-09-08 16:59:59Z beat $
* @package Community Builder
* @subpackage plug_cbsimpleboardtab.php
* @author JoomlaJoe and Beat (Nick A. fixed Fireboard support)
* @copyright (C) JoomlaJoe and Beat, www.joomlapolis.com
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU/GPL version 2
* Thanks to LucaZone, www.lucazone.net for Fireboard adaptation suggestions
*/
// ensure this file is being included by a parent file
if ( ! ( defined( '_VALID_CB' ) || defined( '_JEXEC' ) || defined( '_VALID_MOS' ) ) ) { die( 'Direct Access to this location is not allowed.' ); }
$_PLUGINS->registerUserFieldTypes( array( 'forumstats' => 'CBfield_forumstats' ) );
$_PLUGINS->registerUserFieldParams();
class CBfield_forumstats extends cbFieldHandler {
/**
* Accessor:
* Returns a field in specified format
*
* @param moscomprofilerFields $field
* @param moscomprofilerUser $user
* @param string $output 'html', 'xml', 'json', 'php', 'csvheader', 'csv', 'rss', 'fieldslist', 'htmledit'
* @param string $reason 'profile' for user profile view, 'edit' for profile edit, 'register' for registration, 'search' for searches, 'list' for user-lists
* @param int $list_compare_types IF reason == 'search' : 0 : simple 'is' search, 1 : advanced search with modes, 2 : simple 'any' search
* @return mixed
*/
function getField( &$field, &$user, $output, $reason, $list_compare_types ) {
static $stats = array();
$value = null;
if ( is_object( $user ) && $user->id ) {
if ( ! isset( $stats[$user->id] ) ) {
// $forumTab=&$this->getInstanceOfPluginClass( 'getForumTab' );
// $stats[$user->id]=$forumTab->getExtraFields( $user );
global $_PLUGINS;
$params=array( &$user );
$stats[$user->id]=$_PLUGINS->call( $this->getPluginId(), 'getExtraFields', 'getForumTab', $params );
}
if ( isset( $stats[$user->id][$field->name]['value'] ) ) {
$value=$stats[$user->id][$field->name]['value'];
} else {
$value='---';
}
}
switch ( $output ) {
case 'html':
case 'rss':
return $this->_formatFieldOutput( $field->name, $value, $output, false );
break;
case 'htmledit':
/* Not possible for now:
if ( $reason == 'search' ) {
return $this->_fieldSearchModeHtml( $field, $user, $this->_fieldEditToHtml( $field, $user, $reason, 'input', $field->type, $value, '' ), 'text' );
} else {
return $this->_fieldEditToHtml( $field, $user, $reason, 'input', $field->type, $value, '' );
}
*/
return null;
break;
default:
return $this->_formatFieldOutput( $field->name, $value, $output, false );
break;
}
}
}