Page 5 of 5

Re: Statistics on Index

Posted: 03 Aug 2010, 20:43
by napus
Anyone knows what is going on ??

Code: Select all

[phpBB Debug] PHP Notice: in file /index.php on line 45: Division by zero
[phpBB Debug] PHP Notice: in file /index.php on line 51: Division by zero
[phpBB Debug] PHP Notice: in file /index.php on line 53: Division by zero
[phpBB Debug] PHP Notice: in file /index.php on line 59: Division by zero
[phpBB Debug] PHP Notice: in file /index.php on line 65: Division by zero

Code: Select all

$posts_per_topic = $total_posts / $total_topics;
    $l_posts_per_topic_s = ($posts_per_topic == 0) ? 'POSTS_PER_TOPIC_ZERO' : 'POSTS_PER_TOPIC_OTHER';
    $topics_per_day = $total_topics / $boarddays;
    $l_topics_per_day_s = ($topics_per_day == 0) ? 'TOPICS_PER_DAY_ZERO' : 'TOPICS_PER_DAY_OTHER';
    $topics_per_year = $topics_per_day * 365;
    $l_topics_per_year_s = ($topics_per_year == 0) ? 'TOPICS_PER_YEAR_ZERO' : 'TOPICS_PER_YEAR_OTHER';
    $topics_per_user = $total_topics / $total_users;
    $l_topics_per_user_s = ($topics_per_user == 0) ? 'TOPICS_PER_USER_ZERO' : 'TOPICS_PER_USER_OTHER';
    $files_per_day = $total_files / $boarddays;
    $l_files_per_day_s = ($files_per_day == 0) ? 'FILES_PER_DAY_ZERO' : 'FILES_PER_DAY_OTHER';
    $files_per_year = $files_per_day * 365;
    $l_files_per_year_s = ($files_per_year == 0) ? 'FILES_PER_YEAR_ZERO' : 'FILES_PER_YEAR_OTHER';
    $files_per_user = $total_files / $total_users;

Re: Statistics on Index

Posted: 03 Aug 2010, 21:20
by Stoker
Is it being installed on a completely new board, 0 days old?

EDIT: I have tried to reproduce it by resetting the board start date. No errors.
What has happened that could cause the error at your board? Have you just installed it?

Re: Statistics on Index

Posted: 31 Aug 2010, 19:51
by Wildthinks
Hey,

I have installed it once again and now I have a question about the start date...
Now it's like this: 29 Aug 2010, 00:29:31
But I would like to have it like this: 29 Aug 2010
I just don't know how to do this, I'm sorry :D
Could you please explain it?

Re: Statistics on Index

Posted: 01 Sep 2010, 17:14
by Stoker
The start date is using $user->format_date which means that it is displayed according to the users setting in UCP.
However, as board owner, it would be nice to be able to format the date different.

To do so, find this:

Code: Select all

$start_date     = $user->format_date($config['board_startdate']);
replace it with:

Code: Select all

$start_date  	= date("d M Y, H:i:s", $config['board_startdate'] );
Now you can change this part - d M Y, H:i:s - according to the php date function (google it)

Re: Statistics on Index

Posted: 01 Sep 2010, 17:44
by Wildthinks
Thank you, Stoker, it was very helpful!