Announcement

Collapse
No announcement yet.

Posts per Week

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

  • Posts per Week

    Hi

    Is there any way I can see which user made the most posts in a given date range? i am planning on giving domain names away every week to the highest posters, and need to know this information.

    I have checked in the admincp under stats but it doesn't seem to show this info, only the number of posts. (not who posted)

    Kind Regards,

    Craig

  • #2
    Check this thread...

    http://www.vbulletin.com/forum/showthread.php?t=111997
    Lats...

    Comment


    • #3
      This query should work:

      Code:
      SELECT COUNT(postid) AS count, user.username
      FROM post
      LEFT JOIN user ON (user.userid = post.userid)
      WHERE dateline > UNIX_TIMESTAMP('2004-01-01') AND dateline < UNIX_TIMESTAMP('2005-01-01')
      GROUP BY post.username
      ORDER BY count
      DESC
      Change the dates appropriately. This will return a list of usernames and post counts for the time period specified.

      You can run this query in your:

      Admin CP -> Import & Maintenance -> Execute SQL Query

      You must have permission to execute queries in your includes/config.php file:

      // ****** USERS WITH QUERY RUNNING PERMISSIONS ******
      // The users specified here will be allowed to run queries from the control panel.
      // See the above entries for more information on the format.
      // Please note that the ability to run queries is quite powerful. You may wish
      // to remove all user IDs from this list for security reasons.
      $canrunqueries = '';

      Comment


      • #4
        What would I need to add to this sql statement to exclude certain forum ids? I want to do what the original poster is doing, except posts in certain forums don't count toward the prizes.

        Thanks!

        Rachael
        Rachael

        Expressive Parents.com

        Comment


        • #5
          Code:
          SELECT COUNT(postid) AS count, user.username
          FROM post
          LEFT JOIN user ON (user.userid = post.userid)
          LEFT JOIN thread ON (thread.threadid = post.threadid)
          WHERE post.dateline > UNIX_TIMESTAMP('2004-01-01') AND post.dateline < UNIX_TIMESTAMP('2005-01-01')
          AND forumid NOT IN (X,Y,Z)
          GROUP BY post.username
          ORDER BY count
          DESC
          I added the blue code. X,Y,Z is a comma-separated list of excluded forumids.

          Comment


          • #6
            Thank you! You have no idea how much easier you just made my day!
            Rachael

            Expressive Parents.com

            Comment


            • #7
              Could this be moved to suggestions? A more full featured admin search would be nice.

              Comment

              widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
              Working...
              X