global $_CB_framework, $mainframe;
if ( defined( 'JPATH_ADMINISTRATOR' ) ) {
// Joomla! 1.5 ou supérieur
if ( ! file_exists( JPATH_ADMINISTRATOR .
'/components/com_comprofiler/plugin.foundation.php' ) ) {
echo 'CB non installé!';
return;
}
include_once( JPATH_ADMINISTRATOR .
'/components/com_comprofiler/plugin.foundation.php' );
} else {
// Joomla! 1.0 ou Mambo CMS
if ( ! file_exists( $mainframe->getCfg( 'absolute_path' ) .
'/administrator/components/com_comprofiler/plugin.foundation.php' ) ) {
echo 'CB non installé!';
return;
}
include_once( $mainframe->getCfg( 'absolute_path' ) .
'/administrator/components/com_comprofiler/plugin.foundation.php' );
}
cbimport( 'cb.database' ); // import manipulations de la base de données
cbimport( 'language.front' ); // Gestion des langues CB
cbimport( 'cb.imgtoolbox' ); // Fonction de ImageToolbox de CB
cbimport( 'cb.html' ); // Classe et fonctions de rendu HTML
cbimport( 'cb.plugins' ); // accès aux plugins CB
Please Log in to join the conversation.
Please Log in to join the conversation.
Fatal error: Class 'CBuser' not found in D:\Sites\www\xxxxxxxxxx\templates\seb_one\index.php on line 294
$cbUser =& CBuser::getInstance( $user->id );
if ( ! $cbUser ) {
$cbUser =& CBuser::getInstance( null );
}
function getField( $fieldName, $defaultValue = null, $output = 'html', $formatting = 'none', $reason = 'profile', $list_compare_types = 0 ){
$avatar = $cbUser->getField( 'avatar', null, 'html', 'none', 'list' );}
'<div>'.$avatar.'</div>'
Please Log in to join the conversation.
Please Log in to join the conversation.
<?php
/**
* @version SEBLOD 2.x Core
* @package SEBLOD (App Builder & CCK) // SEBLOD nano (Form Builder)
* @url http://www.seblod.com
* @editor Octopoos - www.octopoos.com
* @copyright Copyright (C) 2012 SEBLOD. All Rights Reserved.
* @license GNU General Public License version 2 or later; see _LICENSE.php
**/
// No Direct Access
defined( '_JEXEC' ) or die;
// -- Initialize
require_once dirname(__FILE__).DS.'config.php';
$cck = CCK_Rendering::getInstance( $this->template );
if ( $cck->initialize() === false ) { return; }
$class_table = trim( $cck->getStyleParam( 'class_table', 'category zebra' ) );
$class_table = $class_table ? ' class="'.$class_table.'"' : '';
$class_row0 = trim( $cck->getStyleParam( 'class_table_tr_even', 'cat-list-row%i' ) );
$class_row0 = $class_row0 ? ' class="'.str_replace( '%i', '0', $class_row0 ).'"' : '';
$class_row1 = trim( $cck->getStyleParam( 'class_table_tr_odd', 'cat-list-row%i' ) );
$class_row1 = $class_row1 ? ' class="'.str_replace( '%i', '1', $class_row1 ).'"' : '';
$doc = JFactory::getDocument();
$doc->addStyleSheet( JURI::root( true ).'/templates/'.$cck->template. '/css/'.'base.css' );
// -- CB API
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.database' );
cbimport( 'language.front' );
cbimport( 'cb.imgtoolbox' );
cbimport( 'cb.html' );
cbimport( 'cb.plugins' );
// -- Render
?>
<div id="<?php echo $cck->id; ?>" class="cck-f100 cck-pad-<?php echo $cck->getStyleParam( 'position_margin', 8 ); ?>">
<div>
<?php
$css = array();
$items = $cck->getItems();
$positions = $cck->getPositions();
if ( count( $items ) ) { ?>
<table<?php echo $class_table; ?>>
<thead>
<tr>
<?php
foreach ( $positions as $name=>$position ) {
$class = $position->css;
$css[$name] = $class ? ' class="'.$class.'"' : '';
$legend = ( $position->legend ) ? $position->legend : ( ( $position->legend2 ) ? $position->legend2 : $name );
$width = $cck->w( $name );
$width = ( $width ) ? ' width="'.$width.'"' : '';
echo '<th'.$width.'>'.$legend.'</th>';
}
?>
</tr>
</thead>
<tbody>
<?php
$i = 0;
foreach ( $items as $item ) {
?>
<tr <?php echo ${'class_row'.($i % 2)}; ?>>
<td><div class="avatar_formatname">
<?php
$cbUser =& CBuser::getInstance( $user->id );
if ( ! $cbUser ) {
$cbUser =& CBuser::getInstance( null );
}
function getField( $fieldName, $defaultValue = null, $output = 'html', $formatting = 'none', $reason = 'profile', $list_compare_types = 0 ){}
$avatar = $cbUser->getField( 'avatar', null, 'html', 'none', 'list');
$formatname = $cbUser->getField( 'formatname', null, 'html', 'none', 'list');
echo '<div class="avatar_table">'.$avatar.'</div><div class="clr"></div><div class="formatname_table">'.$formatname.'</div>';
/**
* Formatter:
* Returns a field in specified format
*
* @param string $fieldName Name of field to render
* @param mixed $defaultValue Value if field is not in reach of viewer user or innexistant
* @param string $output 'html', 'xml', 'json', 'php', 'csvheader', 'csv', 'rss', 'fieldslist', 'htmledit'
* @param string $formatting 'tr', 'td', 'div', 'span', 'none', 'table'??
* @param string $reason 'profile' for user profile view, 'edit' for user profile edit, 'register' for registration, 'search' for searches, 'list' for lists
* @param int $list_compare_types IF reason == 'search' : 0 : simple 'is' search, 1 : advanced search with modes, 2 : simple 'any' search
* @return mixed
*/
?>
</div></td>
<?php
foreach ( $positions as $name=>$position ) {
$fieldnames = $cck->getFields( $name, '', false );
echo '<td'.$css[$name].'>';
foreach ( $fieldnames as $fieldname ) {
$html = $item->renderField( $fieldname );
if ( $html != '' ) {
echo '<div style="clear:left;">'. $html .'</div>'; //todo: markup
}
}
echo '</td>';
}
?>
</tr>
<?php $i++; } ?>
</tbody>
</table>
<?php } ?>
</div>
</div>
<?php
// -- Finalize
$cck->finalize();
?>
Please Log in to join the conversation.
Please Log in to join the conversation.