Announcement

Collapse
No announcement yet.

Posts count at bottom of forum doesn't seem right to me?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Kaitlyn2004
    replied
    Originally posted by Wayne Luke View Post
    You can view statistics in the Admin CP under Statistics and Logs.
    I see how it's inserting the stats into that table.... But they don't even seem to line up with the data!

    mysql> SELECT *, DATE_FORMAT(FROM_UNIXTIME(dateline), '%Y-%m-%d') AS date FROM vb3stats ORDER BY dateline DESC LIMIT 5;
    +------------+-------+---------+-------+--------+------------+
    | dateline | nuser | nthread | npost | ausers | date |
    +------------+-------+---------+-------+--------+------------+
    | 1331956800 | 195 | 259 | 3721 | 16235 | 2012-03-17 |
    | 1331870400 | 350 | 388 | 5298 | 19082 | 2012-03-16 |
    | 1331784000 | 240 | 339 | 5496 | 19505 | 2012-03-15 |
    | 1331697600 | 415 | 311 | 5400 | 19840 | 2012-03-14 |
    | 1331611200 | 625 | 336 | 6145 | 20996 | 2012-03-13 |
    +------------+-------+---------+-------+--------+------------+
    5 rows in set (0.00 sec)


    mysql> SELECT DATE_FORMAT(FROM_UNIXTIME(dateline), '%Y-%m-%d'), COUNT(threadid) AS total FROM vb3thread WHERE dateline > UNIX_TIMESTAMP() - 86400*5 GROUP BY
    -> DATE_FORMAT(FROM_UNIXTIME(dateline), '%Y-%m-%d');
    +--------------------------------------------------+-------+
    | DATE_FORMAT(FROM_UNIXTIME(dateline), '%Y-%m-%d') | total |
    +--------------------------------------------------+-------+
    | 2012-03-13 | 230 |
    | 2012-03-14 | 299 |
    | 2012-03-15 | 329 |
    | 2012-03-16 | 369 |
    | 2012-03-17 | 256 |
    | 2012-03-18 | 71 |
    +--------------------------------------------------+-------+
    6 rows in set (0.02 sec)

    I will double check but we basically do not DELETE threads - we move them to a non-accessible forum.

    Leave a comment:


  • Wayne Luke
    replied
    You can view statistics in the Admin CP under Statistics and Logs.

    Leave a comment:


  • Kaitlyn2004
    replied
    Thanks I'll try that formula and see how it goes. I'm trying to build out a report of activity/growth by day...

    Leave a comment:


  • Wayne Luke
    replied
    It is a little more complicated than that because soft deleted posts aren't counted but would still be in the thread and post table.

    So it would be something:

    (number of posts - soft deleted posts - moderated posts) - (number of threads - soft deleted threads - moderated threads)

    The numbers are displayed on the FORUM PAGE in the forum list though. Not really a number that is designed to be 100% accurate 100% of the time though. Just close enough to give an idea of forum activity.

    Leave a comment:


  • Kaitlyn2004
    replied
    Ah thanks for the clarification. Looking at the code it looks like that - but isn't that the same as
    SELECT COUNT(*) FROM vb3post
    then subtract
    SELECT COUNT(*) FROM vb3thread
    ? Because that doesn't match either

    Leave a comment:


  • Wayne Luke
    replied
    It actually pulls the value by adding up the replycount value for each forum in the forumcache. replycount is number of posts per forum - number of threads per forum. The first post in a thread is not a reply.

    Leave a comment:


  • Posts count at bottom of forum doesn't seem right to me?

    At the bottom of the forum home it shows a # for posts. I just re-ran update counters -> update form information


    I then go into the DB and SELECT COUNT(*) FROM vb3post WHERE visible = 1;


    The difference is about 8k. Any ideas for the difference?
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Working...
X