Project

General

Profile

Bug #3586 » 3586.patch

krileon, 09 July 2012 14:35

View differences:

components/com_comprofiler/plugin/user/plug_cbsimpleboardtab/cb.simpleboardtab.model.php
$userDetails = $this->getUserSettings( $user, $forum, $supportsDbRanks );
if ( ( isset( $userDetails->posts ) ) && $userDetails->posts != 0 ) {
if ( class_exists( 'KunenaTemplate' ) ) {
$kunenaTemplate = KunenaTemplate::getInstance();
} else {
$kunenaTemplate = null;
}
if ( $forum->config['showranking'] ) {
$uIsAdm = isModerator( $user->id );
$uIsMod = $userDetails->moderator;
......
$pathImage = $pathImage . $this->params->get( 'TemplateRank', '/template/default/images' );
$userRank = $userDetails->getRank();
$rText = $userRank->rank_title;
$rImg = $pathImage . '/ranks/' . $userRank->rank_image;
if ( $kunenaTemplate ) {
$rImg = $_CB_framework->getCfg( 'live_site' ) . '/' . $kunenaTemplate->getRankPath( $userRank->rank_image );
} else {
$rImg = null;
}
} else {
$rText = null;
$rImg = null;
......
if ( ( $userDetails->rank == 0 ) && $uIsMod ) {
$rText = CBTxt::T( 'Moderator' );
$rImg = $pathImage . '/ranks/rankmod.gif';
if ( $kunenaTemplate ) {
$rImg = $_CB_framework->getCfg( 'live_site' ) . '/' . $kunenaTemplate->getRankPath( 'rankmod.gif' );
} else {
$rImg = $pathImage . '/ranks/rankmod.gif';
}
}
if ( ( $userDetails->rank == 0 ) && $uIsAdm ) {
$rText = CBTxt::T( 'Administrator' );
$rImg = $pathImage . '/ranks/rankadmin.gif';
if ( $kunenaTemplate ) {
$rImg = $_CB_framework->getCfg( 'live_site' ) . '/' . $kunenaTemplate->getRankPath( 'rankadmin.gif' );
} else {
$rImg = $pathImage . '/ranks/rankadmin.gif';
}
}
if ( $forum->config['rankimages'] && $rImg ) {
(1-1/2)