Signature in not being removed using signature module with quote module when quoting posts/comments.
Here is my solution:
Replace:
<?php
//cleaning signature in comment/reply
if ($form_id == 'comment_form') {
global $user;
if ($form['comment_filter']['comment']['#default_value'] == $user->signature ) {
$form['comment_filter']['comment']['#default_value'] = '';
}
?>
With:
<?php
//cleaning signature in comment/reply/quote (if present)
if ($form_id == 'comment_form' && arg(1) != 'edit') { // do nothing if editing comment
global $user;
if(!empty($user->signature)) {
// signature must be in th end of the comment
$comment_lenght = strlen($form['comment_filter']['comment']['#default_value']);
$signature_lenght = strlen($user->signature);
// get the signature from the end of the comment
$signature = substr($form['comment_filter']['comment']['#default_value'], $comment_lenght-$signature_lenght, $comment_lenght);
if($signature == $user->signature) {
$form['comment_filter']['comment']['#default_value'] = substr($form['comment_filter']['comment']['#default_value'], 0, $comment_lenght-$signature_lenght);
}
}
}
?>
Tested on producion site :)
Comments
Comment #1
webchickClosing out all 6 year old issues at this point.