[rt-users] Patch to change RT's behaviour regarding the signature

Guadagnino Cristiano guadagnino.cristiano at creval.it
Mon Oct 19 06:06:50 EDT 2015


Hi all,
I was having some issues with the way RT works regarding user signatures.

First of all, RT will always put a "--" before your signature, so you 
are limited in the way your signature looks.
Second, RT will always put your signature at the top of an empty 
message, so I always have to put the cursor at the top, hit "Enter" to 
make space for my text, then put again the cursor at the top and start 
writing.
This is all quite tedious.

So I wrote a small patch to change the behaviour.

Here are the instructions (I'll post it on the wiki too) for RT 4.2.12:

1. copy /opt/rt4/share/html/Elements/MesageBox to 
/opt/rt4/local/html/Elements

2. modify /opt/rt4/local/html/Elements so that line 68 changes from:
>     $signature = "-- \n". $text;
to:
>     if ($text =~ m/^--$/m) {
>         $signature = "\n". $text;
>     } else {
>         $signature = "\n-- \n". $text;
>     }
3. clear your mason cache

4. restart your web server


Now, if you do not have "--" on a line by its own in your signature, RT 
will put it at the top of your signature BUT it will also leave a blank 
line before your signature.

If you already have a "--" on a line by its own in your signature, RT 
will leave it alone and will NOT put another one on top of your 
signature. Also RT will leave a blank line before your signature.

Hope this helps.

Bye
Cris


More information about the rt-users mailing list