Since Bullet Energy Forum 1.3 was released, there are script structures were changed since version 1.2, in some API include may no longer work the way it was working in 1.2, for example displaying the forum statistics in user profile and popup windows etc..this tutorial will show you the easy way to display the forum statistics in userinfo.tpl of your theme. This hack only apply to Bullet Energy 1.3 in DLE 9.x including 9.8, please use our support forum for previous versions.
dlestarter
Since Bullet Energy Forum 1.3 was released, there are script structures were changed since version 1.2, in some API include may no longer work the way it was working in 1.2, for example displaying the forum statistics in user profile and popup windows etc..this tutorial will show you the easy way to display the forum statistics in userinfo.tpl of your theme. This hack only apply to Bullet Energy 1.3 in DLE 9.x including 9.8, please use our support forum for previous versions.
Open /engine/modules/profile.php and /engine/ajax/profile.php
Find:
if( $row['fullname'] ) {
Add BEFORE:
// BE Forum 1.3 statistics
$row['forum_inseption'] = unserialize($row['forum_inseption']) ;
$tpl->set('{countTopic}', $row['forum_topic_count']) ;
if($row['forum_topic_count'] > 0) {
$tpl->set('[linckTopic]', "<a href=\"" . $config['http_home_url'] . "user/" . urlencode( $row['name'] ) . "/topic/" . "\">") ;
$tpl->set('[/linckTopic]', '</a>') ;
$tpl->set('[not-Topic]', "") ;
$tpl->set('[/not-Topic]', "") ;
} else {
$tpl->set('[linckTopic]', '') ;
$tpl->set('[/linckTopic]', '') ;
$tpl->set_block("'\\[not-Topic\\](.*?)\\[/not-Topic\\]'si", "") ;
}
$tpl->set('{countMessage}', $row['forum_post_count']) ;
if($row['forum_post_count'] > 0) {
$tpl->set('[linckPost]', "<a href=\"" . $config['http_home_url'] . "user/" . urlencode( $row['name'] ) . "/message/" . "\">") ;
$tpl->set('[/linckPost]', '</a>') ;
$tpl->set('[not-Post]', "") ;
$tpl->set('[/not-Post]', "") ;
} else {
$tpl->set('[linckPost]', '') ;
$tpl->set('[/linckPost]', '') ;
$tpl->set_block("'\\[not-Post\\](.*?)\\[/not-Post\\]'si", "") ;
}
// BE Forum 1.3 statistics
Open templates/YOUR THEME/profile_popup.tpl and templates/YOUR THEME/userinfo.tpl
Add This tag to both tpl files:
Forum Posts: {countTopic} [ [linckTopic]View all topics[/linckTopic] ]
Forum Replies: {countMessage} [ [linckPost]View all replies[/linckPost] ]