[Views] hook comment form?

Events happening in the community are now at Drupal community events on www.drupal.org.
myvo's picture

Mình đã tạo ra 1 Views, và mình mong muốn ở header của Views đó, có 1 form comment để người dùng có thể comment trực tiếp vào. Tham số đầu vào của Views là 1 node id. Nhưng mình gặp rắc rối ở việc hook comment form. (form comment tương tự như khi mình xem một node, có form comment ngay bên dưới).

Mong nhận được sự giúp đỡ từ mọi người! Thank you!
V.My

Comments

Mình đã làm dc rùi... Thanks all

myvo's picture

Gắn dòng code này vào header của page Views:

<?php
  $nid
= arg(1);
  return
module_invoke('comment', 'form_box', (array('nid' => $nid)), t('Subject comment'));
?>

V.My

--
Mỹ VÕ

ai vậy nè ?

microstar's picture

sao lại thanks tui nhỉ ? tui có giúp gì đâu ????

Được rồi, cái này rất hay,

tran.thnga's picture

Được rồi, cái này rất hay, mình có thể tùy biến đc cho kiểu khác, module_invoke lợi hại thật