Announcement

Collapse
No announcement yet.

How do I reset post counts to zero and retain posts?

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

  • How do I reset post counts to zero and retain posts?

    Hi,

    I'm using the VB3 importer to carry over my members and posts to a fresh install. Thing is I want to reset everybody's post count to zero as we are changing forcus slightly. I realise that posts will have the 'Guest' tag, which is fine, but is there a way to do this? Update Counters wouldn't seem to be the way to go as that'll update according to the posts won't it?

    Thanx!

  • #2
    Actually, if your particular import sets all imported posts to Guest then the Update Counters method should reset post counts to 0. Try it... if it doesn't work then you will need to run a query.

    Comment


    • #3
      Originally posted by Jake Bunce
      Actually, if your particular import sets all imported posts to Guest then the Update Counters method should reset post counts to 0. Try it... if it doesn't work then you will need to run a query.
      Aah! Didn't know the importer allowed you to set the imports as 'Guest'. Not downloaded it yet. Groovy!

      If the importer doesn't do it, I'll be back for that query.

      Thanx!

      Comment


      • #4
        I thought you said the importer set posts to Guest. I don't know if they do or not... it depends on the importer.

        Comment


        • #5
          Originally posted by Jake Bunce
          I thought you said the importer set posts to Guest. I don't know if they do or not... it depends on the importer.
          LOL! No, I meant that if post counts were set to 0, then the posts would likely be set as 'Guests' which I didn't mind. Just wanna get everyone back to zero.

          So it'll most likely need a query then - what would that be?

          Thanx!

          Comment


          • #6
            Run this query:

            UPDATE user SET posts = 0

            If you use table prefixes then you need to change user to include the prefix.

            You can run this query in your:

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

            Make sure your userid is entered into your includes/config.php file so you have permission to run queries:

            // ****** 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


            • #7
              Thanks!

              Comment


              • #8
                Hmm I'm having a problem with this. It's just staying at 0 even though new posts have been made. If I update counters with the post counts it gets back to the amount of posts in the database. I want it starting at 0 and then I assumed it would increase as posters posted again.

                Help! I'm due to go live tomorrow and they are gonna be mad enough at me for reseting the posts but they'll go ballistic if they get cheated out of further post credits. *gulp*

                Comment


                • #9
                  New posts should increment the user post counts. When you update user post counts it will always set the post counts to their true values according to the posts in the database.

                  Are your various forums set to count posts?

                  Admin CP -> Forums & Moderators -> Forum Manager -> Edit Forum -> Count Posts Made in this Forum Towards User Post Counts

                  Comment


                  • #10
                    I was just about to reply that they were indeed set to count posts. I checked 'em and yes. However I decided to 'save' the settings again even though that shoudn't have made any difference as they were already set. But it's worked! *scratches head*

                    Posts are now updating.

                    Comment

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