2008-03-18, 10:10 AM
You should put this topic back to General Support because im not making any mods for it(Cuz i can't) i only ask so that i can integrate forum with site completely
$ratio = number_format($arr["uploaded"] / $arr["downloaded"], 3);
$ratio = "<font color=" . get_ratio_color($ratio) . ">$ratio</font>";
print("$ratio");
if($post['userusername'])
{ // This post was made by a registered user
right after that add:$ratio = number_format($arr["uploaded"] / $arr["downloaded"], 3);
$ratio = "<font color=" . get_ratio_color($ratio) . ">$ratio</font>";
now open the template 'postbit_author_user' and addRatio: {$ratio}
Division by zero in *****
Also, will the sql file for 1.2.2 or 1.2.3 work for 1.2.12?dikidera Wrote:Now it works only that i getcheck your code where it's say the error occured, you need to verify that the divisor isn't zero.Division by zero in *****
dikidera Wrote:Also, will the sql file for 1.2.2 or 1.2.3 work for 1.2.12?I didn't get what you meant...
$ratio = number_format($torr_arr["uploaded"] / $torr_arr["downloaded"], 3);
My ratio is zero when calculated dikidera Wrote:This is were i get the erroryou can check that like this:My ratio is zero when calculated$ratio = number_format($torr_arr["uploaded"] / $torr_arr["downloaded"], 3);
if ($torr_arr["downloaded"] == 0) {
//put here the value you want for the ratio if the user haven't download yet, e.g.
$ratio = '-' ;
} else {
$ratio = number_format($torr_arr["uploaded"] / $torr_arr["downloaded"], 3);
}
------dikidera Wrote:P.SI don't know what you mean.... I don't think I'll know to answer that question, is it related to MyBB?
I mean that when installing the torrent tracker it includes a dumped or so mybb sql inside and i wonder is it compatible with 1212