Hallo @all
Hoffe mir kann einer Helfen
für mein punktesys was ich gefunden habe, bekommen user fur einen neuen threat 1 punkt. wie kann ich das für pu umwandeln, damit für jeden neuen highscore 1 punkt vergeben wird
hier mal der code für firebord
if($option == "com_fireboard"){
if ($my->gid < 1) {
return 0;
}
$func = mosGetParam($_REQUEST, 'func', '');
$parentid = mosGetParam($_REQUEST, 'parentid', '');
$id = mosGetParam($_REQUEST, 'id', '');
$action = mosGetParam($_REQUEST, 'action', '');
if($func == "post" && $parentid == 0 && $id == 0 && $action == "post"){
//get point equivalent
$points = getConfPoints("forum");
$rows = getUser($my->id);
$var = 0;
$total = 0;
if(count($rows)){
$row=$rows[0];
$var = $row->var_boni;
$total = $row->total_boni;
}
$var += $points;
$total += $points;
if(count($rows)){
$sql = "update `#__boni_tb` set `var_boni` = '$var', `total_boni` = '$total' where `user_id` = '$my->id'";
} else {
$sql = "insert into `#__boni_tb` values ('$my->id', '$var', '$total')";
}
$database->setQuery($sql);
$database->query();
//log points
logPoints($my->id, $points, "Created a forum thread");


LinkBack URL
About LinkBacks
Zitieren
Lesezeichen