Hi,

I'm using drupal 6.1x with views2 and panel module. I have created a task handler to overwrite the user profile page to display specifics informations (with cck I have created some fields to build a custom user page and I also use the content profile module). I built some views to display the informations.
I tried to create a views to display the comment form but it seems to be not possible, that is why I tried to modify the template of my views to insert the comment form.

I'm not a developper and i found a piece a code which seems to be used to display the comment form :

if (function_exists('comment_render') && $node->comment) {
   print comment_render($node, $node->cid);
   $node->comment = NULL;
}

I put this code in my style template of the views but it doesn't work...
I made a test and if I test the 2 conditions, the function "function_exists('comment_render')" is found but the "$node->comment" seems to be empty???

I'm using panel to overwrite the user view and in my task handlers i have, in the "Argument 1" the "User being viewed". I tried to add a new argument but i can't.

If any body have an idea how to display the comment form in a views/panel ????
If I'm going on the content page of my node i have the comment form.

Thanks in advance for your help.

Comments

dalehgeist’s picture

Subscribing.

Here's what I'm trying to do: when users see a "blog entry" (this is just an arbitrary name, not related to the blogs module), they will see the "blog name" (an arbitrary content field belonging to the author's profile), author picture, author name, post date, the body of the blog, and all the standard components of the Comments module.

It seems possible to create a content type that displays all this (rather than a View), using nodereference to reference the author's profile, but this results in displaying the author's username multiple times. In order to fix that, I would need to use the Node Reference Views module. Seems like a convoluted method.

A third way, maybe, is using Panels. That's the next thing I'm going to try.

aminlatif’s picture

In D6, this is the way: first you must create a php filed in views and then add the following php code:
print drupal_get_form('comment_form', array('nid' => $node->nid), 'What ever title');

aminlatif’s picture

of course you must use your nodes id instead of "$node->nid".