Download & Extend

Add comment/reply as ctools/panels task

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!

AttachmentSizeStatusTest resultOperations
0001-Adding-comment-reply-as-ctools-task.patch8.1 KBIdlePASSED: [[SimpleTest]]: [MySQL] 67 pass(es).View details

Comments

#1

Found a bug, new patch

AttachmentSizeStatusTest resultOperations
0001-Adding-comment-reply-as-ctools-task.patch8.1 KBIdlePASSED: [[SimpleTest]]: [MySQL] 67 pass(es).View details

#2

Fixing another issue :)

AttachmentSizeStatusTest resultOperations
0001-Adding-comment-reply-as-ctools-task.patch8.21 KBIdlePASSED: [[SimpleTest]]: [MySQL] 67 pass(es).View details

#3

Made some more changes.

AttachmentSizeStatusTest resultOperations
0001-Adding-comment-reply-as-ctools-task.patch16.98 KBIdlePASSED: [[SimpleTest]]: [MySQL] 67 pass(es).View details

#4

Status:active» needs review

Marking as needs review. We've tested it and it works.

#5

Cleaned up the patch a bit

AttachmentSizeStatusTest resultOperations
0001-Adding-comment-reply-as-ctools-task 1.patch8.17 KBIdleFAILED: [[SimpleTest]]: [MySQL] Fetch test patch: failed to retrieve [0001-Adding-comment-reply-as-ctools-task 1.patch] from [drupal.org].View details

#6

Status:needs review» needs work

The last submitted patch, 0001-Adding-comment-reply-as-ctools-task 1.patch, failed testing.

#7

Status:needs work» needs review

#5: 0001-Adding-comment-reply-as-ctools-task 1.patch queued for re-testing.

#8

Status:needs review» needs work

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));
+}
AttachmentSizeStatusTest resultOperations
comment_panels-1693352-10.patch7.63 KBIdlePASSED: [[SimpleTest]]: [MySQL] 67 pass(es).View details

#11

Status:needs work» needs review

#12

The patch works. We have been using it for a while now.

#13

Status:needs review» reviewed & tested by the community

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

Status:reviewed & tested by the community» fixed

Committed and pushed. Thanks for the patch!

#15

Woo!

#16

Status:fixed» needs review

'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.

AttachmentSizeStatusTest resultOperations
ctools_comment_panels-1693352-14.patch7.63 KBIdleFAILED: [[SimpleTest]]: [MySQL] Unable to apply patch ctools_comment_panels-1693352-14.patch. Unable to apply patch. See the log in the details link for more information.View details

#17

#18

Status:needs review» needs work

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

Status:needs work» fixed

@osopolar,

You should create a new issue for the above problem. This has already been merged and fixed.

#21

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

nobody click here