Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.

Is there a way to convert a comment into a new question?

+6 votes
187 views
asked Jun 11, 2014 in Plugins by distante
I know there's a plugin to convert a comment into an answers, but What I want to do is convert a comment into a question (for those comment's that say "ohh and one more question it is possible to..."

Thanks!
Q2A version: 1.6.3
commented Jun 26, 2014 by bobbyscon
I don't know the specifics, but essentially you could take the code from the aforementioned plugin and alter it to convert the comment to a question. The Comment to Answer plugin queries the existing question ID in order to create the answer under the correct question (starts around line 130 in the q2apro-comment-to-answer-page.php file). You'd need the question ID portion to query the database for the last used question ID +1, but there's an inherent risk of doing this simultaneously with someone submitting a new question. I'd also like the plugin to convert answers to questions. Too often users forget the Q&A etiquette of when to post an answer vs a comment vs a new question.

2 Answers

+1 vote
answered Feb 13 by Ronlaw

It's not the ideal solution but I've been doing this since questions asked in comments are quite rare.

  1. Post a new question with your account
  2. Change the userid in qa_posts table to the one you want
    • userid can be found at qa_users
  3. Recalculate user points in control panel
You may want to use a plugin to do this if you need it more frequently. I don't think there is one.
+1 vote
answered Feb 14 by teju2friends
As I know, there is no plugin available. But there is a plugin to convert comment-to-answer !!!

https://github.com/q2apro/q2apro-comment-to-answer

You just need to modify SQL queries to match your requirement.

https://github.com/q2apro/q2apro-comment-to-answer/blob/master/q2apro-comment-to-answer-page.php

Be sure to test it on your local before applying to main site :)
...