Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+16 votes
15.8k views
in Plugins by
edited by

Needed a time saver and did this plugin ... enjoy!

Question2Answer Plugin: Comment to Answer

Description

This is a plugin for Question2Answer that converts a comment to an answer, optionally moves the succeeding comments.

Installation

  1. Install Question2Answer if you haven't already.
  2. Get the source code for this plugin directly from github or from the q2apro plugin page.
  3. Extract the files.
  4. Optional: Change language strings in file q2apro-comment-to-answer-lang.php
  5. Upload the files to a subfolder called q2apro-comment-to-answer inside the qa-plugin folder of your Q2A installation.
  6. Navigate to your site, go to Admin -> Plugins. Check if the plugin "Comment to Answer" is listed.
  7. Navigate to yourq2asite.com/convertcomment. From there you can do the converting as admin.

How-To-Use

  1. Find ID of comment by clicking on the "commented" link, check URL part ?show= 58472
  2. Insert the ID into the input field on page yourq2asite.com/convertcomment
  3. Click the convert button, done!

Disclaimer

This is beta code. It is probably okay for production environments, but may not work exactly as expected. You bear the risk. Refunds will not be given!

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Copyright

All code herein is OpenSource. Feel free to build upon it and share with the world.

About q2a

Question2Answer is a free and open source PHP software for Q&A sites.

Final Note

If you use the plugin:
  • Consider joining the Question2Answer forum, answer some questions or write your own plugin!
  • You can use the code of this plugin to learn more about q2a-plugins. It is commented code.
  • Visit q2apro.com to get more free and premium plugins.

 

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

Q2A version: 1.6.2
by
Have you downloaded and used the latest version (last changes on 23 Feb 2014)?

If the comment disappeared it's probably because the parentid is set wrong. Check table qa_posts, find the comment (see postid), check its parentid. Search the post that has postid == parentid. The parentid should be from type "Q", a question.
by
Thank you ! problem solved :)
by
Is this plugin fully compatible with 1.71? Seems to work, but I'm not familiar with what is happening behind the scenes, or if this may cause problems with my database in future. Thank you!
by
See the comments in the source code: https://github.com/q2apro/q2apro-comment-to-answer/blob/master/q2apro-comment-to-answer-page.php Then you will know what it does.

2 Answers

+2 votes
by
Plugin with great utility  @Kai :-) However - can we have a small button next to each comment which lets the asker of the question or the commentator to change the comment into an answer? Just my thoughts
by
could you share the extend you made?
by
edited by
@Chris: If I try to implement this feature, would you buy this as a premium plugin (price about 9 €)? Greetings, Kai
by
@q2apro.com It's not for me but a non-profit organization. I will try to find out.
by
edited by
I try to implement it soon. But need to develop other things currently. If the implementation is faster than expected, I will release it for free as well.
0 votes
by
If I understand correctly, I have to go to a question, identify the comment by editing it, get the number ID, for example 3000, then manualy go to my homepage and add "/convertcomment?show=3000" hit enter and then I will be able to edit the comment.

Is that correct ?

For me that is not working.

 

This should be like the convert answer to comment option that appears when editing a comment.
by
"identify comment" -> just mouse over the "commented by" part, you see the id in the end of the URL.

Then you open the site yoursite.com/convertcomment there is an input field.
by
Thats the problem, in yoursite.com/convertcomment I have a blank page with nothing. Using Dude theme.
...