'
. '
';
if ( $template->showStats ) {
if ( $template->showRank ) {
$html .= ''
. '| ' . CBTxt::T( 'Forum Ranking' ) . ' | '
. '' . $forum->userdetails->msg_userrank . ' ' . $forum->userdetails->msg_userrankimg . ' | '
. '
';
}
if ( $template->showPosts ) {
$html .= ''
. '| ' . CBTxt::T( 'Total Posts' ) . ' | '
. '' . $forum->userdetails->posts . ' | '
. '
';
}
}
if ( $template->showKarma ) {
$html .= ''
. '| ' . CBTxt::T( 'Karma' ) . ' | '
. '' . $forum->userdetails->karma . ' | '
. '
';
}
$html .= '';
return $html;
}
/**
* Generates HTML for posts in forum tab
*
* @param object $template
* @param object $forum
* @param object $model
* @return mixed
*/
function ShowPosts( $template, $forum, $model ) {
$html = null;
$oneOrTwo = 1;
if ( $template->posts ) {
if ( $template->showSearch ) {
$html .= '' . $template->searchForm . '
';
}
$html .= ''
. ''
. ''
. ''
. ''
. '';
foreach ( $template->posts AS $item ) {
$postURL = cbSef( 'index.php?option=' . $forum->component . $forum->itemid . '&func=view&catid=' . $item->catid . '&id=' . $item->id ) . '#' . $item->id;
$catURL = cbSef( 'index.php?option=' . $forum->component . $forum->itemid . '&func=' . ( $forum->component == 'com_kunena' ? 'showcat' : 'view' ) . '&catid=' . $item->catid );
$html .= ''
. '| ' . getFieldValue( 'date', date( 'Y-m-d, H:i:s', $item->time ) ) . ' | '
. '' . htmlspecialchars( stripslashes( $item->subject ) ) . ' | '
. '' . htmlspecialchars( stripslashes( $item->catname ) ) . ' | '
. '' . $item->threadhits . ' | '
. '
';
$oneOrTwo = ( $oneOrTwo == 1 ? 2 : 1 );
}
$html .= ''
. '
';
if ( $template->showPaging ) {
$html .= '
' . $template->paging . '
';
}
} else {
if ( $template->noResults ) {
$html .= '' . $template->searchForm . '
' . CBTxt::T( 'No matching forum posts found.' ) . '
';
} else {
$html .= '' . CBTxt::T( 'This user has no forum posts.' ) . '
';
}
}
return $html;
}
/**
* Generates HTML for subscriptions in forum tab
*
* @param object $template
* @param object $forum
* @param object $model
* @return mixed
*/
function ShowSubscriptions( $template, $forum, $model ) {
$html = null;
$oneOrTwo = 1;
if ( $template->subscriptions ) {
$html .= '
'
. ''
. ''
. ''
. ''
. '';
foreach ( $template->subscriptions as $item ) {
$unsubURL = cbSef( $template->unSubThreadURL . $item->thread );
$postURL = cbSef( 'index.php?option=' . $forum->component . $forum->itemid . '&func=view&catid='. $item->catid . '&id=' . $item->id );
$catURL = cbSef( 'index.php?option=' . $forum->component . $forum->itemid . '&func=' . ( $forum->component == 'com_kunena' ? 'showcat' : 'view' ) . '&catid='. $item->catid );
$html .= ''
. '| ' . getFieldValue( 'date', date( 'Y-m-d, H:i:s', $item->time ) ) . ' | '
. '' . htmlspecialchars( stripslashes( $item->subject ) ) . ' | '
. '' . htmlspecialchars( stripslashes( $item->catname ) ) . ' | '
. '' . CBTxt::T( 'Unsubscribe' ) . ' | '
. '
';
$oneOrTwo = ( $oneOrTwo == 1 ? 2 : 1 );
}
$html .= ''
. '
';
if ( $template->showPaging ) {
$html .= '
' . $template->paging . '
';
}
$html .= '
unSubAllURL . '\'; }" value="' . CBTxt::T( 'Unsubscribe All' ) . '" />
';
} else {
$html .= '
' . CBTxt::T( 'No subscriptions found for you.' ) . '
';
}
return $html;
}
/**
* Generates HTML for favorites in forum tab
*
* @param object $template
* @param object $forum
* @param object $model
* @return mixed
*/
function ShowFavorites( $template, $forum, $model ) {
$html = null;
$oneOrTwo = 1;
if ( $template->favorites ) {
$html .= '
'
. ''
. ''
. ''
. ''
. '';
foreach ( $template->favorites as $item ) {
$unsubURL = cbSef( $template->unFavThreadURL . $item->thread );
$postURL = cbSef( 'index.php?option=' . $forum->component . $forum->itemid . '&func=view&catid='. $item->catid . '&id=' . $item->id );
$catURL = cbSef( 'index.php?option=' . $forum->component . $forum->itemid . '&func=' . ( $forum->component == 'com_kunena' ? 'showcat' : 'view' ) . '&catid='. $item->catid );
$html .= ''
. '| ' . getFieldValue( 'date', date( 'Y-m-d, H:i:s', $item->time ) ) . ' | '
. '' . htmlspecialchars( stripslashes( $item->subject ) ) . ' | '
. '' . htmlspecialchars( stripslashes( $item->catname ) ) . ' | '
. '' . CBTxt::T( 'Remove' ) . ' | '
. '
';
$oneOrTwo = ( $oneOrTwo == 1 ? 2 : 1 );
}
$html .= ''
. '
';
if ( $template->showPaging ) {
$html .= '
' . $template->paging . '
';
}
$html .= '
unFavAllURL . '\'; }" value="' . CBTxt::T( 'Remove All' ) . '" />
';
} else {
$html .= '
' . CBTxt::T( 'No favorites found for you.' ) . '
';
}
return $html;
}
} //end of getForumTabTemplate
?>