Answered: Is there a bulk import option for questions in the core functionality?

Post date: 2021-02-28 09:40:09
Views: 260


It is not really hard to do.

Basic steps:

  1. Parse your questions from CSV file, for example.
  2. Include these files in your script:
    • /qa-include/qa-base.php
    • qa-app-users.php
    • qa-app-posts.php
  3. Now you can use core function qa_post_create() to post questions.
Code example:
----------------
//Parse questions from your source and put data in array

//Include Q2A scripts:

require_once '/PATH/TO/qa-include/qa-base.php';
require_once QA_INCLUDE_DIR.'qa-app-users.php';
require_once QA_INCLUDE_DIR.'qa-app-posts.php';

//Publish questions:

qa_post_create($type, $parentid, $title, $content, $format, $categoryid, $tags, $userid);

----------------

You can find more info here - https://docs.question2answer.org/code/external/

Please click Here to read the full story.
 
Other Top and Latest Questions:
Wednesday's big stock stories: What’s likely to move the market in the next trading session
Knew I was autistic; realizing at 45 that I can't live independently
What are other books like these books?
Morgan Stanley likes these stocks heading into second-quarter earnings
New York becomes first U.S. state to impose AI data center ban
Bipartisan group of senators propose Social Security reform process ahead of funding shortfall
IBM stock craters 25%, the worst day on record, after company issues second-quarter earnings warning
Warren Buffett is accelerating his charitable donations with aim to give away Berkshire wealth by 2034
Johnson & Johnson has a chance to show it's more than just a rotation winner
Paramount still plans to close WBD merger by end of September despite lawsuit