@AcidRaZar, I don’t know if it will be any useful to you, but this is my updated script to import Question and Answer from my external Q&A database. Since my Q&A database is linear (same row contains a question and its answer column contains the answer) unlike Q2A database structure (which is question in one row, then answers in another multiple rows linked to parent question row; defined by type of row – either a question/answer/comment). So, you need to edit code at some relevant places, such as loop until you get all answers of a particular question. (edit according to Q2A database). It will hardly take 1 or 2 days to make your own (raw) import – script, hard-coded for your database only. Note – 1. Let Rahul comment on any missing answers-meta, as I don’t know about them. <?php // replace your connection settings $db = @mysql_connect('localhost', 'root', 'password') or die(mysql_error()); mysql_select_db('database_name', $db) or die(mysql_error()); $qry_qbank = mysql_query("SELECT * FROM table_name limit 100") or die(mysql_error()); require('wp-blog-header.php'); define('ANSPRESS_VOTE_META', '_ap_vote'); define('ANSPRESS_FAV_META', '_ap_favorite'); define('ANSPRESS_CLOSE_META', '_ap_close'); define('ANSPRESS_FLAG_META', '_ap_flag'); define('ANSPRESS_VIEW_META', '_views'); define('ANSPRESS_UPDATED_META', '_ap_updated'); define('ANSPRESS_ANS_META', '_ap_answers'); define('ANSPRESS_SELECTED_META', '_ap_selected'); define('ANSPRESS_BEST_META', '_ap_best_answer'); define('ANSPRESS_PARTI_META', '_ap_participants'); define('AP_FOLLOWERS_META', '_ap_followers'); define('AP_FOLLOWING_META', '_ap_following'); while($row = mysql_fetch_array( $qry_qbank )) { $qno = $row['id']; $question_title = $row['Question_Title']; $question_content = $row['Question_Content']; $answer_content = $row['Answer_Content'];; $category = array(12, 13, 15); $tags = array(21, 22, 23); $user_id = 1; $status = 'publish'; $question_array = array( 'post_title' => $question_title, 'post_author' => $user_id, 'post_content' => wp_kses($question_content, ap_form_allowed_tags()), 'post_type' => 'question', 'post_status' => $status ); $question_post_id = wp_insert_post($question_array); if […]
I have updated to version 1.4.2 but i cant remove the flag from dashboard.I can now close the flag popup window from frontend.An admin is capable to remove flag from any question/answer .Hope you will add this feature in the next version. The latest github version has this feature.
Yesterday added this feature, download from github and open post editor and you can delete it there.
TinyMCE editor is already there in AnsPress, but due to some security reasons we have disabled it. But we will enable it soon, after fixing some issue.
@Alex Sorry to reply here and not after your comment but I needed the possibility to show a picture. Shady’s answer is the right one. AnsPress automatically adds the “question title” in the html title… if you have anspress shortcode [ anspress ] written in your main AnsPress Page Title (and of course body).