All imported pms are unread & have same importpmid

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • denby
    Member
    • Nov 2004
    • 44

    All imported pms are unread & have same importpmid

    Hey Jerry

    I'm wanting all the imported pms to have the same read status in vB as they had in phpbb (the simple version: read or not read) but they are all marked unread after importing. I thought I'd write some SQL to update the read status by matching the original pm id in phpbb with the importpmid but then I found all the records in the vb pm table have the same importpmid: 1

    I know it's only a minor irritation in the grand scheme of things but all our users have a limit of 100 pms for each mailbox (Inbox, Sentbox, Savebox), a total of 300 maximum and we have more than 30,000 users (with more than 170,000 pms). After the migration I'm going to be swamped by questions/complaints etc and if I don't have to hear about all their unread pms, it'd help.

    Could you please amend the impex code in /systems/phpbb2/011.php so that:
    1. the read status is set correctly
    2. the importpmid is set equivalent to the original pm_id in phpbb2
    Thanks very much.
    "All the world's a stage .. coach." - John Wayne
  • Jerry
    Senior Member
    • Dec 2002
    • 9137
    • 1.1.x

    #2
    1. I can do if you can tell me what the status' are in the phpBB database.

    2. Can't be done as you can't force ID's into a auto_inc field.
    I wrote ImpEx.

    Blog | Me

    Comment

    • denby
      Member
      • Nov 2004
      • 44

      #3
      1. PM status codes
      The system in phpBB is a tad complicated. There are actually 4 mailboxes for pms in phpBB:
      Inbox - pms received
      Sentbox - pms sent and read by the receiver
      Outbox - pms sent but unread by the receiver
      Savebox - preserved pms

      As per the question/answer at http://www.phpbb.com/phpBB/viewtopic.php?t=376250
      the field privmsgs_type has 5 possible values:
      0 read by the receiver
      1 in outbox of sender and receiver didn't visit his inbox yet with this new pm
      2 message in the sent box of the receiver which is created when the receiver read the newly received pm for the first time (at the same time, the original entry in the table receives the type 0 for the receiver)
      3 the message is moved to the receiver's inbox
      4 the message is moved to the sender's save box
      5 not marked as new in the main menu of the receiver (but still unread in the inbox)
      Which basically means that:
      "received-and-read" pms have a privmsgs_type value of 0 (zero),
      "received-and-UNread" pms have a privmsgs_type value of 3 or 5.

      2. importpmid
      I'm a bit confused about your answer. Perhaps I was a bit unclear with my question.

      Aren't the "importid" fields supposed to hold the original id values from the source forum? For example, in the user table I now have a field called "importuserid" which indeed does hold the user_id values from my phpBB users table: it is not filled with a flag value (such as 1).

      Therefore I'd have expected that the importpmid field in vB table pm to hold the pm_id values from my phpBB db. Have I got it wrong?
      "All the world's a stage .. coach." - John Wayne

      Comment

      • Jerry
        Senior Member
        • Dec 2002
        • 9137
        • 1.1.x

        #4
        1.

        Ok, I'll have a look at that first thing in the morning (I'm PST)


        2.

        Yes, that I can do, pm.importpmid is fine, I thought you meant pm.pmid.
        I wrote ImpEx.

        Blog | Me

        Comment

        • denby
          Member
          • Nov 2004
          • 44

          #5
          Thanks Jerry.
          "All the world's a stage .. coach." - John Wayne

          Comment

          • denby
            Member
            • Nov 2004
            • 44

            #6
            I'd just thought I should check if you'd had any time to work on this. I was planning to do my final import in 5 days time.

            Thanks for all you do.
            "All the world's a stage .. coach." - John Wayne

            Comment

            • denby
              Member
              • Nov 2004
              • 44

              #7
              Jerry, I'm doing my final import in about 14 hours. If you have a fix for this problem please LMK. Thanks.
              "All the world's a stage .. coach." - John Wayne

              Comment

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