Parašė edgaras-v· 2011 Lie. 26 19:07:48
#6
Atsiraryk forum/viewthread.php ir susirask štai šią eilutę :
forum/viewtheard.php ir susirask
Kodas
add_to_title($locale['global_200'].$locale['400']);
Po šita eilute įmesk :
unction userreputation($user_id, $post_id="", $type="") {
global $db_prefix;
$result = dbquery("SELECT SUM(IF(type=1,1,-1)) as total FROM ".$db_prefix."reputation WHERE to_id = '$user_id' GROUP BY to_id");
if (dbrows($result) != 0) {
$data = dbarray($result);
$total = $data['total'];
$info = "<sup>[ <a href='reputation.php?uid=$user_id&pid=$post_id'><font color='".($total<0?"red":($total>0?"green":"black"))."'><b>".($total<=0?"":"+")."$total</b></font></a> ]</sup>";
} else {
$info = "<sup>[ <a href='reputation.php?uid=$user_id&pid=$post_id'><font color='black'><b>0</b></font></a> ]</sup>";
}
return $info;
}
Surandi:
echo "</span><br /><br />\n";
Po juo meti:
echo "<span class='small'>Reputacija :<font color='green'>".userreputation($data['user_id'], $data['post_id'])."</font></span><br /><br />\n";
Čia bandyk. Turi bent jau ant v7.01.05 veikt. Ant kitų versijų nebandžiau...