Signature.module is updated for drupal 4.7.


  1. Makes user signatures dynamical, that is, if user change his signature in his profile, after each of his/her posts will be the new signature!
  2. Usability benefits - 'cause each time a comment is posted, user don't have to pull down signature to the end of his/her comment.
  3. Comments can be styled another way than the post itself, and it's customizable from 'administer->settings->signature'.
  4. Shows signatures not only after comments, but also after nodes (the only limitation that some html tags will be stripped out).
  5. Allows define content types (and at once comments for them) where signatures should be seen and where not.
  6. New: If the module is enabled, but signatures are disabled for all content types, signature field isn't displayed at user profile settings (So, if you use comment.module but don't want you users to have a signature in their profiles, you need this module too).

New: No patching is required now!

Actually, this is a kind of a hack of the comment.module, and if you like it, please let us know (here). More people will use it, more possibility that the module will become nice, clean and separate from comment.module.

Tested with Drupal 4.7.0.
Download link: .


tobyspark’s picture

i would think this functionality should be part of core

Ignas’s picture

But there are some problems:
1. When there are pictures in the comment, signature appear near picture instead bottom. You shoud insert clear-both style, I think.
2. Input filters. Comment signature do not pass through default (any!) filter. Therefore links, images etc appears unformated (if appears). Node signature looks OK. (filter settings are the same for my nodes and comments)

ultraBoy’s picture

As for 1) : As for style, you can set it up what you want in administer/settings/signature. Please let us now if you'll fix that with "pictures" (avatars?)

As for 2) "Therefore links, images etc appears unformated" - you mean, you want links and filters to be filtered out? Yes, I'll try to do some configurable filtering settings.

PS: for 2) Now images are filtered out from comment signatures, please check once again.

Ignas’s picture
1. In node signature (dogs and link below line) appears near node image (landscape). I'm not sure that its the right place. Signature must have this own CSS file to configure I think. But this is feature request :) <br style="clear-both" /> before signature must help. But I'm not sure if this universal solution.
2. Take a look how the same signature looks in node and comment. In coment my default link and img_assist filters dont work. I cant find where to setup these filters for signature module.
3. Tried. No changes. I'm not sure what to do with images in signature. The best solution would be to specify max XY size in signature configuration or disable images at all. Or posibility for administrator to specify filter for signature? This could be nice solution.
There is no rush. I can fix it itself, but othere are some problems to fix someday in this module. Usefull module.
Edit patch works. Thanks :)

Ignas’s picture

One more seriuos problem: can't edit comment - it appears empty in edit window. Node edits fine. Use D4.7 and TinyMCE

ultraBoy’s picture

You're right. *shocked*

ultraBoy’s picture

I'm sorry about that. Just now I've fixed it. Please download the file again.

5pu’s picture



sjfarrar’s picture

Just creating a new site with drupal 4.7/tinymce and have been getting rather frustrated with the awful default 'put signatures into the text entry box for comments' system. This looks like it should do the job, will be trying it out today.

Thanks Again!

sjfarrar’s picture

Well... installed it on my site, and it seems to be working... mostly. The signature isn't showing up (in the edit box) when they go to post new forum topics or add comments. And user signatures are displaying on their posts.

However, it isn't using the format set in admin/settings/signature, presumably because of my next problem.

Whenever I go to view a forum (all test forums atm, site isn't live - fortunately :P) I get a bunch of the following error:

warning: sprintf() [function.sprintf]: Too few arguments in C:\Documents and Settings\CMSDemo\Desktop\webhome\Apache\drupal\modules\signature.module on line 119.

Seems to be n+1 of the error where n is the number of posts in the thread.

I'm using drupal 4.7/php5/mysql4, any other info which might be of help, just ask. Any ideas?

ultraBoy’s picture

Could you please write which format you set in admin/settings/signature ?
It's a longtail.

sjfarrar’s picture

Sure thing (and thanks for responding so quickly :D)

<hr width="75%" />
<br />%s

That's exactly what I have in the box, and upon typing that in here.. it occured to me that the quotes "" could be causing issues, so I went back and escaped them, like so:

<hr width=\"75%\" />
<br />%s

Which definitely helped something on my site (much of my forum formatting worked like it should - just started using the flatforum module) :P But unfortunately I still get the same sprintf() errors like before.

Hopefully that helps.

ultraBoy’s picture

<hr width=\"75%%\" />
<br />%s

P.S. I think this helps, but all these escapings are not nice. I'll change the code so no escaping will be necessary.

It's a longtail.

sjfarrar’s picture

Awesome stuff, that got rid of the errors. Makes sense to me now that the % might have been causing issues, didn't think of it before.

Now I have another strange issue with getting the signature generated by signature.module and the one generated by Drupal, which I think could be linked to the issue documented here: I will try out that fix and see how I go.

Thanks heaps for your help, and hopefully if you update the module with the fix for escaping, no-one else will have this problem in future :)

ultraBoy’s picture

But with my fix you'll need to jump back to one % sign.

2 signatures?? what is your drupal version? When do you have 2, after editing comments may be? Or just after adding a new comment?
It's a longtail.

sjfarrar’s picture

Yeah I guessed that I would need to do that. After all that however I've got rid of the width altogether, because it was being centered for some reason, so I decided to go back to a line all the way across (no need for the width tag at all).

Drupal 4.7.0, haven't upgraded yet. You can see here what's happening: I get it on every single forum post on the site. I even have really old posts where I get one, that I left the one in the edit box from the comment module, and the two dynamic ones now generated by the signature module and the comment module, that's really fun (fortunately this is all development testing stuff so I'll just purge them all once I'm ready to go live)

Haven't tried out their fix, but have made further comments on the thread I linked above:

ultraBoy’s picture

Did you patch comment.module or anything else? AFAIK comment.module doesn't generate dynamic signatures. Disable signature.module, will one or both sig's disappear?
It's a longtail.

sjfarrar’s picture

As far as I'm aware I haven't made any patches to comment.module. And regarding comment.module doing dynamic signatures, agreed, that's what I thought.

When I disable signature.module the signature from comment.module remains.

ultraBoy’s picture

Are you sure it's dynamic?

It's a longtail.

sjfarrar’s picture

Yep just tested to make sure...

Created new post, both sigs match.
Changed signature in account.
Looked at post again, both sigs match.

sjfarrar’s picture

Found a fix for the weird behaviour, have posted a description and results here:

Steel Rat’s picture

Hi Ultraboy,

Does this module place signatures in Forum posts as well as comments, and other content types? I don't have a problem with the current signature functionality, except for the fact that it doesn't include forum posts.

p.s. Why doesn't this mod show up in the 4.7 modules list?

Steel Rat
Drupal Site:

yngens’s picture

If you have quote modeule activated, when pressing to "quote" link you get your signature added beneath the quoted message and if you submit like that you will get diplicate signature.

The problem solved by changing line 146 in quote.module:

$form['comment_filter']['comment']['#default_value'] = '[quote='. $author .']'. $quote ."[/quote]\n". $form['comment_filter']['comment']['#default_value'];


$form['comment_filter']['comment']['#default_value'] = '[quote='. $author .']'. $quote ."[/quote]\n";

dahli.llama’s picture

Another fix that I just did for this exact problem (that'll teach me to look here first :p )

In function "function signature_form_alter($form_id, &$form)" of signature.module, change the following

    //Removed because it didn't work with Quote module
if ($form['comment_filter']['comment']['#default_value'] == $user->signature ) {
     $form['comment_filter']['comment']['#default_value'] = '';      


    // New Form replacement that works with Quote module.
    $form['comment_filter']['comment']['#default_value'] = str_replace($user->signature, "", $form['comment_filter']['comment']['#default_value']); 

That will just replace the signature portion in the text are. Anything else should be left alone.

Zach Harkey’s picture

Any reason this isn't an official module?

It took me 30 minutes of searching to track this down (and I even knew what I was looking for).

harkey design

: z

drurian’s picture

First, as has been noted before, if using with flatforum results in duplicate signatures. Can be dealt with by a CSS hack or maybe hacking flatforum (didn't check that out).

Second, if you disable signature for all content types and the texarea disappears from the user account settings it still shows up while posting comments. It seems that the module only hides the setting but doesn't delete any existing signatures from the users table so they show up anyway. - Drupal Video Tutorials

Psikik’s picture

Is there any way to get an option to disable signatures after nodes? I'd like them still on all of the comments. Any help would be greatly appreciated.

hedac’s picture

satos’s picture

Any fix for xtemplate ? Maybe i need to change something in signature.module?

ultraBoy’s picture

Sorry, no idea about xtemplate. It needs debugging. If it was kind of "serious" module, I would fix it to work with xtemplate, but it's just a quick and dirty solution; it won't be necessary when current problems with signatures will be resolved in the core.

Just like I like!

Toe’s picture

Has that been committed to core for 5.0? I remember webchick saying she wanted to work on that, but I never heard anything afterward.

ultraBoy’s picture

Seems like it is postponed. =(

Too bad, I don't have time for this. IMHO such patches require a lot of time, not only for coding and designing the best possible solutions, but also to argue your solution is the most correct.
Just like I like!

cyberk’s picture

hi, i need the ''-file or a newer version.
it seems link the link is broken...

somebody who has it? thanks a lot!

ultraBoy’s picture

New location of the module is .

Just like I like!

ericatkins’s picture

Website appears offline. Can anyone else host the .zip file?’s picture

A mirror would be nice idd!
Maybe you could try ?

ultraBoy’s picture

*empty comment :)*

fluxrider’s picture

Thanks to the author. This works brilliantly on 4.7.4. No issues at all to date. I'm using bbcode and quicktags for picture insertion , and only using this so far in forum posts and comments, and its working brilliantly displaying avatar and text all wrapped in the bbcode 'code' tags.

This really should be added to the modules page.
Well done.

edit- I should add that on my site I have totally disabled the use of html including filtered for all users and only allow bbcode. If filtered html is used , images are not displayed of course. I've replaced all use of html with bbcode including in the quicktags module. Very happy with this . Images , avatars and text all displayed in forum sigs . Woohoo.

remi’s picture

The download links are dead... :(


remi’s picture

Is there someone who can upload that module somewhere reliable? I'd really like to get that module, but I can't download it from anywhere.



Xabi’s picture

I think this feature is essential for the functionality of Drupal forums and comments. I would ask for an extra feature: exclude signatures from searches, because signatures are repeated useless content for searching. Yesterday I tried to search at for "snap" (thinking in the snap preview technology) and... see by yourself: I got a lot of messages without relation to my search, becasue there was an user using "snap" at his signature in a lot of posts.

We really need this for Drupal 5.0!

ultraBoy’s picture

If you use the module, signatures are not included in search index. They are automatically attached at display-time.

Xabi’s picture

One of the download links is working again. Just in case, I have mirrored the file here:


Anyone wants to try a 5.x version?

ultraBoy’s picture

Xabi, please edit your post and remove your mirrored link. The module will be available for dl from the old address for long time from now, so it's not needed to mirror it.

Just like I like!

Xabi’s picture

Ok but... why don't you release this as a module? This is a much needed feature for Drupal.

yngens’s picture

Do we have Drupal 5.0 version of Signature?


jonaswouters’s picture

I converted the module to drupal 5.0..
You can download it here: signature-5.0.tar.gz

AdrianB’s picture

Thanks, it works just fine. All I wanted was to remove the signature from the profile page and that's what I used this module to do. I did not test any other feature. I noticed that it didn't use t() for all text (like the description on line 48), but that's not a big issue.

It would be nice if it was released as a module on Until they rewrite the whole signature handling (for Drupal 6) I guess there's others out there who wants to get rid of the signature completely. (Personally I really can't stand signatures, they mess up the flow and doesn't add any real value, other than promotion value for the users.)

jonaswouters’s picture

There is a project page for it now. You can find it here.

AdrianB’s picture

Nice! No downloads yet, but I guess they are on their way.

jonaswouters’s picture

Indeed we need to wait for the next batch. Feel free to create an issue ;)

rkn-dupe’s picture

Thanks so much for this! Been hacking comment.module etc. to get rid of signature for me cos they are so pointless and there was no way to switch them off. This does the trick. great!