Discourse Signatures

(Jeff Atwood) #51

It is our rather strongly held belief as an organization that repeated signatures are not a good solution to … well, anything.

Also bear in mind that this plugin is very intentionally opt-in – only users who explicitly elect to see signatures (with the plugin installed) will see them.

(Kankuro) #52

I skimmed the replies and noticed that this was recently broken. Can anybody confirm that it’s working again?

(David Taylor) #53

It should work, are you having problems with it?

(Kankuro) #54

No, I just wanted to make sure it was (meant to be) working before I installed it. I’ll update here if it doesn’t work for me though, thanks!

1 Like
(dh) #55

Few questions

  1. For the advanced signature editor, it seems to have everything… EXCEPT image selection :stuck_out_tongue: since the simple one accepts an image link only and the main example was using a single pic, it’s a bit strange that this does not accept an image link. Bug?

  2. How to enable signatures to show for everyone by default (I’m about to turn on simple mode - was mostly curious about the advanced mode).

Thanks! Cool plugin.

(Rafael dos Santos Silva) #56

Upload is disabled there, as images would be cleaned up by the orphan images background job anyway. But you can just use markdown to add an image that lives in a post or anywhere in the internet (imgur, etc):

Using Edit a user setting for all Discourse users as a guide:

./launcher enter app
rails c
User.find_each {|u| u.custom_fields['see_signatures'] = true; u.save }

Should :crossed_fingers: work.

(dh) #57


Btw, the instructions that your signature is a URL may be missing from the dark theme:

(dh) #58

Bwahaha, already removed the feature. I’m a bit surprised there’s no resize – some guy instantly set his signature to a 1/2 page hero banner O_o

1 Like
(Daniela) #59

You can resize it with a bit of CSS, see Discourse Signatures

(Rafael dos Santos Silva) #60

Well, there is a reason this isn’t a core feature :stuck_out_tongue:

Admins will have to constantly evaluate signatures sizes and weight added to every page.

(Michael Ball) #61

Thanks for this! We have a lot of members in our community who like signatures.

One main question:

Is there an easy way to not show signatures in quotes? This seems, well…a bit excessive and I’m not aware of many situations where you want signatures in the quoted material, especially if you quote the same author in blocks.

Edit: I figured this out… It’s a limitation in the “Quote Text” mechanism. If you have the whole last paragraph of a signature-enabled post, it grabs the signature into the quoted body. (You can see it in the editor).

I’m also going to put my vote in for a site-wide default on option. I can totally see why plenty of people would want to have this off, but if you want to have signatures (as a community), then it seems weird to default them to off since most new users will ever have any idea that signatures are a thing, and then most people will never set them…

(Jeff Atwood) #62

That’s the idea! :wink:

(Michael Ball) #63

Yeah…I get it…but then why do this?

(Jeff Atwood) #64

We feel rather strongly as an organization that signatures must be 1) an optional plugin and 2) per user opt-in. Those who want it, can turn it on.

(Jay Pfaffman) #65

Another way to handle them is have them inserted when the post is rendered so that they aren’t in the post. That would keep the signatures from getting copied into quotes, I think. (?)

A plugin I wrote allows members of a certain group to have a signature, but if they are removed from the group the signatures no longer display. One could similarly make it so that members signatures show only for themselves. :slight_smile:

1 Like
(Edward Weiss) #66

Ruby newb here.

If I wanted the signature to display the contents of the user’s bio field, is there an easy way to do this?

Apologies in advance for my ignorance!

(Rafael dos Santos Silva) #67

That is totally doable with minimal changes.

(Edward Weiss) #68

I figured as much, but my knowledge of Ruby/Discourse is not so hot. How do I access the bio variable? (If there’s a tutorial or some other documentation to help with this that would be great!)

1 Like
(Rafael dos Santos Silva) #69

The user attribute in this case is bio_cooked.

First thing is getting that shipped together with every post.

Here in this block:

You will need to add that attribute instead of the custom signature to the serializer.

Then here:

You need to use this new bio_cooked instead of the signature.

After that is working, you can delete a lot of code that was there to handle the extra field for a custom signature.

(Charles Walter) #71

We had a large number of core users in our community who demanded signatures, and were content with the image solution. I think we found a good middle ground between serving our most loyal users while not interfering with the ux of the majority