1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.5 "Reimporting" thread titles from vBulletin

Discussion in 'Installation, Upgrade, and Import Support' started by sapph, Feb 2, 2016.

  1. sapph

    sapph Member

    Ok, so I had a vB4 forum with lots of long thread titles on it. When I imported they got truncated to 100 characters which I only realized afterwards.

    I've since increased the title length limit to 150 characters, and if possible I'd like to reimport those old thread titles into Xenforo. I did preserve content IDs when importing.

    I'm not sure what the easiest way to do this is. I was thinking just grabbing the thread IDs and titles from the vB copy and truncating the remaining titles at the new 150 character limit. Then insert those updated titles into the corresponding IDs in the XenForo database.

    Has anyone done something like this? I'm not sure of any pitfalls I might be facing with that approach.
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Some straight SQL should work for this.

    UPDATE xfdb.xf_thread AS xt
    SET xt.title = (
    	SELECT LEFT(vt.title, 150)
    	FROM vbdb.thread AS vt
    	WHERE vt.threadid = xt.thread_id
    Fill in the db names. And backup first.
    sapph likes this.
  3. sapph

    sapph Member

    I knew there would be a nicer solution than what I came up with. I appreciate the quick help, that's perfect, thank you.

Share This Page