Ok, i'm back on track i hope so,
This is the code:
[code:1]<?php
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
/**
* KARMA VOTE IN PROFILE
* @package Community Builder
* @author Lennart van der zwan - LENNOX - HOLLAND LENNOX@NIGHTCITY.NL
*/
class getKarmaTab extends cbTabHandler {
/**
* Constructor
*/
function getKarmaTab() {
$this->cbTabHandler();
}
function getDisplayTab($tab,$user,$ui) {
global $mosConfig_absolute_path, $database, $mosConfig_lang;
$gjp_path = $mosConfig_absolute_path.'/components/com_comprofiler/plugin/user/plug_lennoxkarma';
if (file_exists($gjp_path.'/language/'.$mosConfig_lang.'.php')) {
include_once($gjp_path.'/language/'.$mosConfig_lang.'.php');
} else {
include_once($gjp_path.'/language/english.php');
}
$return="";
$return="<a href=\"index.php?option=com_joomlaboard&Itemid=51&func=karma&do=increase&userid=$user->id\"><img src=\"images/bierplus.gif\"border=/0/><a href=\"index.php?option=com_joomlaboard&Itemid=51&func=karma&do=decrease&userid=$user->id\"><img src=\"images/biermin.gif\"border=/0/></a> ";
return $return;
}
} // end KARMA vote from profile( Author Lennox).
?>
[/code:1]
What i want is the total of karma displaying for the Karma icons. i think i must add this kind of code, hope someone can help me a little.
[code:1]$query = "SELECT karma
FROM #__sb_users
WHERE userid='".$user->id."'";
$database->setQuery($query);
$karma = $database->loadResult();
if($karma ==""«»)
{
$karma = _UE_FORUM_NO_KARMA;
}[/code:1]