bring back X blah per day

This commit is contained in:
Shish 2009-07-30 03:47:43 +01:00
parent 33a7fde1a4
commit 4a4546c427

View file

@ -141,16 +141,17 @@ class UserPageTheme extends Themelet {
$i_image_count = Image::count_images(array("user_id={$duser->id}"));
$i_comment_count = Comment::count_comments_by_user($duser);
#$h_image_rate = sprintf("%3.1f", ($i_image_count / $i_days_old2));
#$h_comment_rate = sprintf("%3.1f", ($i_comment_count / $i_days_old2));
$i_days_old = ((time() - strtotime($duser->join_date)) / 86400) + 1;
$h_image_rate = sprintf("%.1f", ($i_image_count / $i_days_old));
$h_comment_rate = sprintf("%.1f", ($i_comment_count / $i_days_old));
$u_id = url_escape($duser->id);
$images_link = make_link("post/list/user_id=$u_id/1");
return "
Join date: $h_join_date
<br><a href='$images_link'>Images uploaded</a>: $i_image_count
<br>Comments made: $i_comment_count
<br><a href='$images_link'>Images uploaded</a>: $i_image_count, $h_image_rate per day
<br>Comments made: $i_comment_count, $h_comment_rate per day
";
}