Current time: 08-01-2014, 01:51 AM Hello There, Guest! (LoginRegister)


Jump to the post that solved this thread.
Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Merging threads from a spreadsheet
05-09-2011, 01:56 AM
Post: #1
Not Solved Merging threads from a spreadsheet
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
Find all posts by this user
Quote this message in a reply
05-09-2011, 02:17 AM
Post: #2
Not Solved RE: Merging threads from a spreadsheet
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.

CodeWeavers - CrossOver: Windows Compatibility on Macintosh and Linux
[Image: Advocate_125.png]
Doesn't like unsolicited PMs
Find all posts by this user
Quote this message in a reply
05-09-2011, 02:34 AM (This post was last modified: 05-09-2011 02:49 AM by richie_a.)
Post: #3
Not Solved RE: Merging threads from a spreadsheet
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
Find all posts by this user
Quote this message in a reply
05-09-2011, 03:56 AM
Post: #4
Not Solved RE: Merging threads from a spreadsheet
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.

CodeWeavers - CrossOver: Windows Compatibility on Macintosh and Linux
[Image: Advocate_125.png]
Doesn't like unsolicited PMs
Find all posts by this user
Quote this message in a reply
05-09-2011, 04:38 AM
Post: #5
Not Solved RE: Merging threads from a spreadsheet
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
Find all posts by this user
Quote this message in a reply
05-13-2011, 04:23 AM
Post: #6
Not Solved RE: Merging threads from a spreadsheet
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
Find all posts by this user
Quote this message in a reply
05-13-2011, 04:26 AM
Post: #7
Not Solved RE: Merging threads from a spreadsheet
Try:
\n

CodeWeavers - CrossOver: Windows Compatibility on Macintosh and Linux
[Image: Advocate_125.png]
Doesn't like unsolicited PMs
Find all posts by this user
Quote this message in a reply
05-13-2011, 04:52 AM
Post: #8
Not Solved RE: Merging threads from a spreadsheet
will do, thanks mate
Find all posts by this user
Quote this message in a reply
05-13-2011, 01:41 PM
Post: #9
Not Solved RE: Merging threads from a spreadsheet
If it doesn't work, obviously let me know Smile

CodeWeavers - CrossOver: Windows Compatibility on Macintosh and Linux
[Image: Advocate_125.png]
Doesn't like unsolicited PMs
Find all posts by this user
Quote this message in a reply
05-14-2011, 12:30 AM (This post was last modified: 05-14-2011 12:53 AM by richie_a.)
Post: #10
Not Solved RE: Merging threads from a spreadsheet
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!
Find all posts by this user
Quote this message in a reply
Jump to the post that solved this thread.
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)

Contact Us | MyBB | Return to Top | Return to Content | Lite (Archive) Mode | RSS Syndication