News:

Wondering if this will always be free?  See why free is better.

Main Menu

Import posts from a file to an SMF thread?

Started by The Lurker, July 18, 2017, 09:15:19 PM

Previous topic - Next topic

The Lurker

Is it possible to "import" posts from a file (in whatever format) to an existing thread?
- No attachments, just text (and BBCode)
- Existing users (more than one)

Basically, I'd like to migrate a thread from a defunct forum (was saved in a text file).  There are too many posts to do it manually while preserving the order and original authors.

Thank you!


Kindred

Anything is possible, f you know how to code it.

I do not believe such a converter currently exists, however
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

shawnb61

If such a utility does not exist, I'd suggest ways to dump the whole thing in there, like as a PDF.

Or, as one giant post...  Such approaches might be easier. 
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

The Lurker

Dumping as a single post (or several, due to a 64K size limit) is possible, but ugly.

I'll probably have to do that if no better option is available.

Thanks.

vbgamer45

I wrote one many years ago attached. I think imported tab based files or had a csv option too
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

The Lurker

Thank you vbgamer45!

Unfortunately, I am not familiar with PHP.

Can you please elaborate on the script?
In particular, what is the format of the file?
Does it preserve whitespace (number of empty lines), etc.?

( I may have more questions, we can take it to PM if this is not the place to discuss )

Thank you!


ABCDiamond

Quote from: vbgamer45 on July 19, 2017, 09:23:29 AM
I wrote one many years ago attached. I think imported tab based files or had a csv option too
I am interested in this aswell.

I have a CSV file of posts from a Wordpress installation, and want to import them into a new SMF forum.

Not sure what the CSV file format needs to be like, (ie: what the headers would be) and what that 'importscript.php' file process is. 
I keep looking at this part of the script [$newtopicid =   createPost($msgOptions, $topicOptions, $posterOptions);] and trying to work out the CSV header names etc., would be for that.

Also, would USERS need to be created first, etc.

Advertisement: