User blog comment:Cristina7/Introducing Discussions, a New Platform For Engaging Your Community/@comment-6100947-20160909050435/@comment-452-20160909142314

"The question is, can it be done and to what degree..."

Yes, it can be done, the degree depends on whether you care about the page history accurately attributing the revisions.

If I was just doing this for myself, I would normally export it, and run it through a short PHP script to reformat it, but I think in this case I'll do it in javascript, and share the script with everyone.

With javascript, I've already written a script which retrieves the internal page name from the thread ID, I'll be expanding that to also retrieve all thread replies, and to reformat the entire thread into single forum post with signed comments.

I'll personally be importing that data as correctly attributed revisions, but I'll also provide a copy/paste version for people who don't care about that sort of thing.
 * Whether correctly attributing revisions via page history is technically/legally required is unknown, as Wikia refuses to answer the question as it constitutes "legal advice". To be safe, I'd use "This forum thread was previously located at Thread:1234" at a minimum.

(I have no ETA on this, I'll do it sometime in the next month and post it on the forum here as a blog post)

edit: I'm going to have to get clever to maintain history of comment edits, but I think I can handle it.

edit: Sorry for the lack of updates on this, I got the bulk of script done a month ago, and I've been finishing and polishing it as I've had time.


 * Edit history is maintained perfectly
 * Unfortunately, due to the fact that the act of importing is regarded as a "edit" in the page history, the forum index shows the thread as being edited on the day you import them.
 * This can be fixed after importing by deleting each forum thread and restoring all revisions except the import revision itself. - "look into doing this via the API" is on my to-do list.
 * Subject is extracted from metadata and used as a page name
 * I was originally stripping the subject/highlight/topics metadata, but that resulted in revisions where nothing changed but the timestamp, so I've left the metadata tags in the source so there's no confusion - this is not visible on the published page.
 * Due to the fact that admins may have "edited" comments to add topics or something, the signature for each post contains both the original user/time, and last edited user/time
 * Handling special characters was a minor roadblock, thankfully I created a script years ago to encode special characters.
 * As it's impossible to automatically tell whether a reply is a reply to the OP or the previous post, I've included the option for a single indent or incremental indents - people who care about properly indenting will need to edit each page manually.

BTW, my test data is 513 revisions in 158 posts across 40 threads. All are imported successfully. The great thing about errors in an import is that the page ends up blank, so you know pretty easily whether something messed up.

It is entirely possible, and indeed likely, that there could be errors on other wikis which are not present in my test data, so rather than give out my script and possibly mess things up, I'll just help anyone who wants to switch over their forum.

I'll provide an xml file for an admin to import, as well as a simple script to delete all Special:Forum pages before disabling it.