I hit a hurdle with quoted posts. I had to run the post table through two different regular expressions on two separate passes, AND do a search/replace to clean up what was left over! Quotes are (or were) not native to bbPress, and it looks like Keith had a couple of different generations of plugins in there over the years. The format basically was like this (with varying whitespace):
HTML:
<blockquote> <cite>Username - 2 hours ago <a href="....backlink to original post">»</a></cite> Quoted text here. </blockquote>
One variation had "wrote" rather than the hyphen after the username. Other quotes were "broken" inadvertently from some of the forum members while replying to the post, and others for some reason or another looked almost the same but didn't convert, which is how I came to tweak the regex to clean those up.
I did all this before going over to XF from VB. We just decided to go with a simple [ quote ] tag with username, rather than try to link back to the original post. (To be honest in all the years I've used forums, I've never clicked a quote link to go back to the original post.)
I also flagged some posts incorrectly. The "visible" field in the post and thread tables are "0" for moderated, "1" for visible and "2" for soft-deleted. It was easy for me to flip all the zeros to twos, and that got us the soft-deleted posts.
There were also a lot of stray extended characters. One was the trademark symbol (which we use a lot of in his forum
), and others appeared to be open/closing quotes, and "fancy" apostrophes. I may also have found the last few HTML entities that got left in the posts.
Overall though, it looks good! I finished the import to XF this morning. One thing, though--I thought that a fresh import overwrote everything from a previous import, but it did not do this. I ended up with my test import still remaining, and the final import tacked on. I wondered why it asked me to merge users. No big deal though--the user merges worked perfectly, and since we had cleaned up and renamed a few things in vB, I could easily tell which category was the correct one. I deleted the others, rebuilt the caches, and it's all online and looking fine now!
Our final step is to copy the database over to Keith's server, along with the attachments, and we'll be all finished. After that, some minor tweaking in XF (user and forum permissions, some remaining post/thread cleanup, etc.) are all we need to do.
The
only issue I have is that the quote plugin used nested quotes. Once you get past five quotes, you end up with the post being in a vertical stack. The right side of the quote block has a wide margin. I need to find out where in the CSS this is set, and then figure out what I can add in extras.css to override it. I would like to nudge it a bit wider if I could.
Now that I'm more familiar with the cleanup scripts and now Impex works, I'm ready to tackle the next one. My next project is a combination of two forums: a WebBBS forum from 1997-2002, and phpBB2 from 2002 to present. So, if I can't import WebBBS into vB, I know I can import it into phpBB2, as I found a script that I had used on two other forums in the past. I'll leave that for a separate thread.
Finally, a handy regex tool I used for preg_replace:
http://regex.larsolavtorvik.com/
You can pretty much work out the basics here before testing in your own script. Very handy! I've always been weak in regular expressions, but I picked up a lot more this time around. (I actually used them more in Apache working with mod_rewrite, while writing scripts that had friendly URLs.)