Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
in Q2A Core by
We have a way to bulk import into db as per this link: http://www.question2answer.org/qa/1222/what-is-the-best-way-for-me-to-upload-lot-of-questions-to-the-db

In beta 1.2, category is introduced. So how to change the above script to import questions with category?

Any hint will help! :)

3 Answers

0 votes
I don´t know how to do it with php but last year for another Q&A site under drupal i used the imakro extension for firefox.

It repeats the steps of writing and sending aform. Need an hour or two to learn, but there are examples and a help.

I uploaded this way 7000 questions from a .csv file.

Didn´t try it again but it should work:

Here You go:


Don´t forget to change the allowed quantity of questions and answer per hour in Q2A Admin Menue !

Think would just work for questions but not the answers !!!

Rgds monk333
0 votes
It's very similar to the code you used before, except now the function qa_question_create(...) takes an extra parameter at the end, which is the categoryid that you want (or null for none). You can find the categoryid for each category by examining the qa_categories table in your database.
asked Mar 8, 2011 in Q2A Core by anonymous import of category along with questions
0 votes
how to use it with version 1.6.2 thanks