2007-10-19, 07:25 PM
2007-10-19, 07:32 PM
What 'stats' do you want to add ?
2007-10-19, 08:50 PM
i've integrated mybb into tbdev (php peer-to-peer) and i want to add stats like uploaded / downloaded / ratio for ex the sql from the tbdev goes like this
Any help would be appreciated
$stats = sql_query("SELECT * FROM users where enabled='yes' and status='confirmed' and id=" . $CURUSER["id"] . "") or sqlerr(__FILE__, __LINE__);
$arr2 = mysql_fetch_assoc($stats);
$uploaded = mksize($arr2["uploaded"]);
$downloaded = mksize($arr2["downloaded"]);
$ratio = $arr2['uploaded'] / $arr2['downloaded'];
$ratio = number_format($ratio, 3);
$color = get_ratio_color($ratio);
if ($color)
$ratio = "<font color=$color>$ratio</font>";
}
else
if ($arr2["uploaded"] > 0)
$ratio = "Inf.";
else
$ratio = "---";
and ratio colorfunction get_ratio_color($ratio)
{
if ($ratio < 0.1) return "#ff0000";
if ($ratio < 0.2) return "#ee0000";
if ($ratio < 0.3) return "#dd0000";
if ($ratio < 0.4) return "#cc0000";
if ($ratio < 0.5) return "#bb0000";
if ($ratio < 0.6) return "#aa0000";
if ($ratio < 0.7) return "#990000";
if ($ratio < 0.8) return "#880000";
if ($ratio < 0.9) return "#770000";
if ($ratio < 1) return "#660000";
return "";
}
i don't know where to add them in mybb..and how to print them.. Any help would be appreciated
2007-10-20, 11:06 PM
so...no idea?
2007-10-21, 01:45 AM
Quote:i've integrated mybb into tbdev (php peer-to-peer)
I would like to know how you did this? At least to what degree. Would you be willing to share the work? I have this on my list of things to code. That's if no one does it before me and releases it.
Did you do full user integration?
And to answer your question...your best solution is to create a plugin and avoid core file changes. I would be willing to help if you have some good coding done for the integration.
2007-10-21, 10:54 AM
well, when u login in the tracker youre logged into the forum (same at logout), when u change your pass in the tracker, it's changed in the forum too (same with username/e-mail/class), when u singup ure automatically signed up to the forum
(the mod isn't made by me, i ripped it from a source) if u want the files just pm me with a msn/icq/yahoo id and maybe you can help in creating such plugin for those stats
(the mod isn't made by me, i ripped it from a source) if u want the files just pm me with a msn/icq/yahoo id and maybe you can help in creating such plugin for those stats