Posted by pwaterz on July 19, 2012 at 6:35pm
10 followers
| Project: | Chaos tool suite (ctools) |
| Version: | 7.x-1.x-dev |
| Component: | Page Manager |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
Here is a patch. Let me know what you think!
| Attachment | Size | Status | Test result | Operations |
|---|---|---|---|---|
| 0001-Adding-comment-reply-as-ctools-task.patch | 8.1 KB | Idle | PASSED: [[SimpleTest]]: [MySQL] 67 pass(es). | View details |
Comments
#1
Found a bug, new patch
#2
Fixing another issue :)
#3
Made some more changes.
#4
Marking as needs review. We've tested it and it works.
#5
Cleaned up the patch a bit
#6
The last submitted patch, 0001-Adding-comment-reply-as-ctools-task 1.patch, failed testing.
#7
#5: 0001-Adding-comment-reply-as-ctools-task 1.patch queued for re-testing.
#8
The last submitted patch, 0001-Adding-comment-reply-as-ctools-task 1.patch, failed testing.
#9
Any conclussion to this? Is the patch committed? Can we use it safely?
#10
Thanks for this patch! I've amended comment_reply_form.inc a little to avoid some warnings (checking $comment object) and also refer to $context[0] for the ..._admin_title:
+function ctools_comment_reply_form_content_type_render($subtype, $conf, $panel_args, $context) {+
+ $comment = ($context[1]->identifier == 'No context') ? NULL : clone($context[1]->data);
+ $block = new stdClass();
+ $block->module = 'comments';
+ if ($comment) $block->delta = $comment->cid;
+ $block->title = t('Add comment');
+ $node = $context[0]->data;
+
+ module_load_include('inc', 'comment', 'comment.pages');
+ $block->content = comment_reply($node, ($comment ? $comment->cid : NULL));
+
+ return $block;
+}
+
+function ctools_comment_reply_form_content_type_admin_title($subtype, $conf, $context) {
+ return t('"@s" comment form', array('@s' => $context[0]->identifier));
+}
#11
#12
The patch works. We have been using it for a while now.
#13
I can also confirm that this patch works as expected.
I have not gone line by line to ensure the code is right, just confirming functionality.
When the patch is applied--- ensure that there is a newline added to the end of the file. Drupal coding standards ftw.
#14
Committed and pushed. Thanks for the patch!
#15
Woo!
#16
'No context' is translateable. So it should be t('No context'):
<?php$comment = ($context[1]->identifier == t('No context')) ? NULL : clone($context[1]->data);
?>
I modified the patch.
#17
#5: 0001-Adding-comment-reply-as-ctools-task 1.patch queued for re-testing.
#18
Not sure if I should start a new issue of post here, but I have just updated to the latest Ctools dev to test this out. When I Add Content > Comment > Comment Reply Form, the output is the same as the standard comment form, with the node or comment you are replying to above the form itself. There should be an option to disable the node/comment view, so I can output just the form.
For example, I may want the form itself on the right, and the node/comment view on the left. The current panel is just lumping everything together. The current panel may be better called "Rendered Comment Reply Page" or something of that effect, and a new form-only panel added.
#19
What this does is allow you to convert the comment page to a panel. If you would like more layers of abstractions, I invite you to submit a patch with more ctools content types with it broken apart.
#20
@osopolar,
You should create a new issue for the above problem. This has already been merged and fixed.
#21
Automatically closed -- issue fixed for 2 weeks with no activity.