Drupal Questions & Answers

Ask and answer Drupal related questions! No question too simple or complex!
dbirider's picture
Asked by on Wed 10th Dec 2008
Quick reply or go advanced feature

I always thought a cool feature is to offer both a quick reply link that expands a generic reply form and to offer a link to use a more advanced reply form.

I started playing around a bit and I realized that this shouldn’t be to hard. I used the following snippet in my template file to expand and collapse the comment form:

function phptemplate_comment_form($form) {
   return '<fieldset class=" collapsible collapsed"><legend>Quick Reply</legend>' . drupal_render($form) . '</fieldset>';

The issues I need help with is:

  • What would be the snippet to only display this feature on node pages, not on comment/edit or comment/reply?
  • How would I print a link that leads to the reply page? I’d preferably like the version that displays ‘Login or register to post comments ‘ to users who aren’t logged in.

By the way, I’m using bueditor as the advanced editor, which lets you control where you want it to show up.

Commenting on this Drupal Question is closed.