Drupal: Rimuovere l'inclusione automatica della firma di un utente nel form del commento

Come amministratore di <a href="http://www.drupalitalia.org/forum">Drupalitalia.org</a>, mi piace modificare il sito e aggiungere nuove funzionalità, in modo che sia sempre un <em>work in progress</em>. E' il caso dell'aggiunta del modulo <a href="http://drupal.org/project/flatforum">flatforum</a>, che aiuta a far sembrare il forum di Drupal più normale, e non un Bulletin-Board-System.

Tra le novità interessanti che ho inserito è l'inserimento dinamico delle firme, grazie a phpTemplate. Purtroppo Drupal inserisce automaticamente nel form di commento, la firma alla fine del textfield, cosa che assolutamente non serve in un sistema di firme automatico. Cosa dobbiamo andare a modificare allora? Purtroppo l'unica soluzione è modificare comment.module in attesa della <a href="http://drupal.org/node/130366">versione 6.x</a>.

Ecco cosa dobbiamo commentare.

<?php
$form['comment_filter']['comment'] = array('#type' => 'textarea', '#title' => t('Comment'), '#rows' => 15, '#default_value' => $edit['comment']/* ? $edit['comment'] : $user->signature*/, '#required' => TRUE);
?>

Buon forum su <a href="http://www.drupalitalia.org" title="www.drupalitalia.org">www.drupalitalia.org</a> ;)

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.

Recent comments

Social Me

DA Member

Drupal Association Badge