Closed (fixed)
Project:
Question/Answer
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
1 Feb 2011 at 07:51 UTC
Updated:
27 Sep 2012 at 21:01 UTC
Jump to comment: Most recent file
Comments
Comment #1
locomo commentedIntegration with Node Comment (http://drupal.org/node/966180) might be another way to approach this?
Comment #2
jcisio commentedJust add a note that I've created another module to force to two levels of comments. Adding this feature could be simple, however I just don't need it now and I don't have time to work on it.
Comment #3
ec commentedHi, I will roll a patch for this for the 6.x as soon as the other patches get in or are definitively postponed. My proposal is adding a new settings to let the admin decides whether he/she wants the top level comments only or not. And then it checks if the
$comment->pid == 0. It also takes into account the use of the duration feature.Best,
EricC
Comment #4
jcisio commentedThis is definitely a good feature. I'd like to see it in 7.x branch first, then backport. However, there is no problem if we get it in 6.x first. The proposal on a option in the settings page looks good.
Why do we need to check the duration in this patch?
Comment #5
ec commentedWell, when we use the duration, the system will automatically choose the best answer among all the comments if none has been selected by a human being. Hence, if the admin decides that only top level comments can be selected by a human being I suppose that the automatic system should have the same behaviour. So we need to filter the top level comments before computing the votes.
Comment #6
jcisio commentedAh yes, I understand it now. Thanks.
Comment #7
jcisio commentedHi ec,
Have you progressed on this? Do you mind uploading your work (or work on progress)? I'd like to get it in then roll out 1.7 versions.
Comment #8
ec commentedYes ;-) here is my patch for this new feature. As previously said, there is a new setting and for consistency I take care of what happened with the automatic selection of a best answer when a duration is in place. let me know. Best.
Comment #9
jcisio commented- We'd prefer 1/0 to yes/no for variable value.
- I don't see why we need 'required' => false.
- I think we need to patch question_answer_action_access() instead of hook_link(), it'd be easier and cleaner. We don't have to check "question_answer_action_access('deselect', $object, $node) && $object->pid == 0" because even the option is active, it could happen that a non-toplevel comment was selected when that option is not active, and now it could not be deselected.
Comment #10
ec commentedHi,
Thanks for your comments!
- We'd prefer 1/0 to yes/no for variable value.ok done.Well for me this is an optional feature hence it shouldn't be required. We just need a default value compatible with the settings of the previous version.
- I think we need to patch question_answer_action_access() instead of hook_link(), it'd be easier and cleaner.yes good catch.- We don't have to check "question_answer_action_access('deselect', $object, $node) && $object->pid == 0" because even the option is active, it could happen that a non-toplevel comment was selected when that option is not active, and now it could not be deselected.ok done.Find attached my new patch to adress these issues.
Best,
Comment #11
ec commentedComment #12
jcisio commentedFixed a few wording (even I'm not an English native speaker ;)), coding standard, inverse the condition in the duration formatter (I think you made it wrong). Committed http://drupalcode.org/project/question_answer.git/commit/e9b544a.
Let's test and port to D7 so that we could release both 6.x-1.7 and 7.x-1.7.
Comment #13
jcisio commentedhttp://drupalcode.org/project/question_answer.git/commit/f20f350 for D7.
If you have time, please test for both. I think I'll roll out new release this weekend (two years after the last stable releases).