Announcement

Collapse
No announcement yet.

Updating thread counters--does it update the dateline value based on the first post?

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

  • Updating thread counters--does it update the dateline value based on the first post?

    Hi,

    When updating thread counters, is the dateline value in the thread table updated based on the value of dateline in the first post of the thread?

    If this is the intended behavior, it is not working. If this is not the intended behavior, what combination of sql queries could I run to sync these?

    Thanks,
    Paul

    Edit: The following happens with 2.2.7. I've not tested 2.2.8 yet.
    Last edited by Paul; Wed 25 Sep '02, 11:34am.

  • #2
    The query clearly does not touch the dateline field in the thread table. I'm guessing that this is either a design issue or a bug:

    From admin/misc.php:
    PHP Code:
        $DB_site->query("UPDATE thread SET lastpost=$lastpost,replycount=$numberposts,postusername='".addslashes($firstusername)."', postuserid='$firstuserid', lastposter='".addslashes($lastusername)."',attach=$attachsum WHERE threadid=$threadid"); 

    Comment


    • #3
      The dateline of the thread would be the same as the dateline of the first post since both indicate the time the thread was created. That value does not change so why would it be 'updated'?

      Comment


      • #4
        My problem originates from the importation of posts from another forum. In some cases, the dateline was not accurate. I was under the impression that the Update Thread Counters information was to be used for such cases. I would hope it's not something that needs to be used regularly or in other circumstances.

        Comment


        • #5
          If the import script is setting a different dateline for the firstpost of the thread and for the thread itself than it is an issue in the import script that needs to be fixed. There is no "real" reason to ever update dateline since they do not differ in a normal functioning vBulletin forum.

          The thread counters update serves the purpose of updating the lastpost field of a thread with the time of the last post and more importantly with the name of the last poster since these values won't be populated after an import.

          Comment


          • #6
            Re: Updating thread counters--does it update the dateline value based on the first post?

            Thanks, freddie... In that case....

            Originally posted by LoveShack
            If this is the intended behavior, it is not working. If this is not the intended behavior, what combination of sql queries could I run to sync these?

            Comment


            • #7
              The discrepencies I experienced in the dateline values were due to a miscalculation by the strtodate() function in php and a portion of text that wasn't being stripped prior to being passed through the function. The problem affected only a small number of threads and was quickly resolved by writing a php script to issue updates based off the old forum.

              The conversion script in question was one which I wrote for WebBBS conversions. I have updated the released version on vBulletin.org which should prevent any further issues like this.

              Thanks again,
              Paul

              Comment

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