Fix signatures (part 3 of 3): Allow turning off signatures site-wide

webchick - April 9, 2007 - 15:33
Project:Drupal
Version:6.x-dev
Component:user system
Category:feature request
Priority:normal
Assigned:webchick
Status:closed
Description

This is something that's been asked for since about Drupal 4.5. You can hook_form_alter this stuff out if you don't want it, but it makes more sense to make this consistent with user pictures. This way, if you don't like the (new) way that core does signatures, you can turn it off altogether and handle it with a contrib module.

So here is a simple patch which adds another "Enabled/Disabled" setting to the "User settings" page for signatures, and will show neither the textarea in the user profile, nor in the comment bodies.

AttachmentSize
disable-signatures.patch2.45 KB

#1

Dries - April 9, 2007 - 20:42

The default behavior should be 'off', IMO. When you create the admin account (user #1) you're asked to enter a signature -- by changing the default to off, this would not be the case.

(An alternative solution would be to introduce a signature permission. Not sure if that would be any better. Just floating the idea.)

#2

Dries - April 9, 2007 - 20:42

The default behavior should be 'off', IMO. When you create the admin account (user #1) you're asked to enter a signature -- by changing the default to off, this would not be the case.

(An alternative solution would be to introduce a signature permission. Not sure if that would be any better. Just floating the idea.)

#3

webchick - April 9, 2007 - 21:08

Hm. Really? Ok, I can do that. I figured you'd want it to maintain backwards compatibility (currently, signatures are always on by default).

Maybe what I'll do is make it disabled by default, and put an update in forum.module so that it does a variable_set() to make it 1.

#4

Dries - April 10, 2007 - 10:41
Status:needs review» fixed

I've updated the patch myself, and committed it to CVS HEAD. I didn't include the upgrade path, so people will have to manually enable the signatures after the upgrade. Feel free to provide a follow-up patch for that.

#5

m3avrck - April 10, 2007 - 15:06

Shouldn't the changelog make note of this? I think that would be a sufficient upgrade path :-)

#6

Anonymous - April 24, 2007 - 15:16
Status:fixed» closed
 
 

Drupal is a registered trademark of Dries Buytaert.