Hi
How to get number of threads wrote from 24 hours?
THX
I think you'll find the similar (not exactly the same) method in today's top poster in stats.php
Could you help me to change that code. I'm not good in this
![Smile Smile](http://mybbhacks.zingaburga.com/images/smilies/smile.gif)
The number of threads created today can be found in the AdminCP home.
i have something like this, but it give me new threads from midnight
PHP Code:
$last_dateline = 0;
$start_dateline = TIME_NOW-(60*60*24*30);
$end_dateline = TIME_NOW;
$query = $db->simple_select("stats", "*", "dateline >= '".intval($start_dateline)."' AND dateline <= '".intval($end_dateline)."'", array('order_by' => 'dateline', 'order_dir' => 'asc'));
while($stat = $db->fetch_array($query))
{
if($last_dateline)
{
$stat['change_threads'] = ($stat['numthreads'] - $stats[$last_dateline]['numthreads']);
$threads_a_day = my_number_format($stat['change_threads']);
}
$stats[$stat['dateline']] = $stat;
$last_dateline = $stat['dateline'];
}
|
You need to select a count() from the threads table, not the stats table.
Also I think 60*60*24*30 gives you 1 month, not 1 day.
(10-09-2011 08:36 AM)ZiNgA BuRgA Wrote: [ -> ]The number of threads created today can be found in the AdminCP home.
Ugh... How stupid I am to not thinking about that page, Yumi
![Oops Oops](http://mybbhacks.zingaburga.com/images/smilies/oops.gif)
No-one ever looks at the ACP home, lol.
Could you help me to modify that code to get number of threads
(the same number when i click - misc.php?action=getdaily)
![Smile Smile](http://mybbhacks.zingaburga.com/images/smilies/smile.gif)
You can find the query in admin_folder/modules/home/index.php file.
Where do you want it to be displayed?