MyBB Community Forums

Full Version: Merging threads from a spreadsheet
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
Hi guys,
First up, a few weeks ago I posted a similar thread in 1.6 support (http://community.mybb.com/thread-93209.html) but had no replies; through searching I have found a lot more info and also seen that this may be a better spot to ask, I have no one else ;-) Appologies if I can't do this, and please remove the thread.

OK. I have a spreadsheet with a couple of thousand rows, each that I am wanting to make into a new thread. I can easily format the spreadsheet to match that of the "_posts" SQL table (Pid, tid, replyto, fid, subject, icon, uid, username, dateline, message, ipaddress, longipaddress, includesig, smileieoff, edituid, edittime, visible, posthash).

I am wondering that if I do format my spreadsheet this way, would I be able to import it into _posts using phpMyAdmin? If this might work, would auto generated fields populate themselves? Would I need to add a value into 'posthash'? And also, would I need to add references to other tables aswell?

ANY assistance would be very much appreciated, even if there is an alternative BB that may offer this function (and then import back).

Much thanks
Rich
You should be able to do this exactly as you've said. However, how do you plan on generating the post hashes?

Step 1: Format your spreadsheet (You'll actually need two matching spreadsheets, one thats threads and formatted as such, one thats posts [the first post of the thread] and formatted as such)
Step 2: Close MyBB
Step 3: Backup your thread and post tables from MyBB
Step 4: Import your spreadsheets using the proper selections in phpMyAdmin
Step 5: Test
Step 6: If needed, restore backups, make changes to spreadsheets, and return to step 1.
Hi Dylan
Thanks so much mate, glad I'm on the right track. I'll get the spreadsheets sorted and give it a shot.

The posthashes!? Is there a way I can generate these? Or are they usually done when each new post/thread is generated? If I leave them blank will they self generate? Or could I create my own posthashes using the username and a random number? I will test a few times

Thanks again
Rich
You'll be fine if you leave them blank. I just wanted to be sure you thought the entire process through before you started. Sometimes I do that, just ask a question that makes you think... even if the answer is irrelevant.
Ahh, I like that. I've learnt a whole lot more about posthashes now! Thanks again for your help, I'll let you know how it goes

Regards
Rich
Hi Dylan,
My tests so far have all been working really really well. I am able to format the look of the 'message' (bold, color etc) but am having trouble putting in paragraph marks.

Do you know of what code I can use to end a line, and start on the next?

Much thanks again
Rich

Try:
\n
will do, thanks mate
If it doesn't work, obviously let me know Smile
Hi Dylan
It didn't seem to work, I tried /n with and without [] but no joy. I've tried multiple other exports and imports trying to figure out how to include the paragraph / line breaks. If I have a thread formatted correctly, export it into various formats, it will show the formatted style in both Excel and OpenOffice (but only when you select that cell). I've tried copying the entire message cell and importing with a different Subject and it works, but then if I try to copy the paragraph or line break, it just copies a 'space'. If I try to format the spreadsheet cell with an 'enter', it simply moves on to the next cell.

I'm a little baffled but will keep trying :-) If you have have any other ideas I'd love to hear and I'll give them a shot

Thanks again
Rich

- - - - - - -

I've just worked out that you can enter a paragraph mark in excel by alt-enter (pc) or opt-comm-enter (mac). Will give this a shot. cheers

- - - - - - -

Woohoo, it did work. Thanks so much for your help Dylan. Really appreciate it!


Pages: 1 2 3