Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+2 votes
476 views
in Q2A Core by
Quite interesting thing a user requested. As soon as you click on EDIT (your answer) and then the checkbox "convert my answer to a comment", the last answer post (if answers exist) is selected in the dropdown.

My user (and I agree with her) said it would be better to default-select the question in the dropdown, so the answer given becomes a comment to the question (instead of any other answer given).

Trying to hack the according question-post.php I could not find a way of how to change the "selected" option. It should be somewhere in $commentonoptions.

Anyone?

PS: Probably would make sense to change that in core.
Q2A version: 1.8.3

1 Answer

+1 vote
by

Ah, I think I found it: The 

'value' => @$commentonoptions[$lastbeforeid],

decides which is the one selected.

I commented the one out in:

if ($otheranswer['created'] > $lastbeforetime) {
				// $lastbeforeid = $otheranswer['postid'];
				$lastbeforetime = $otheranswer['created'];
			}

Now the question gets selected as default.

by
thak you.............!
...