🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
8 messages
8 total messages Started by Jo'Asia Tue, 25 Mar 2003 20:18
[dialog] Signature wrapping
#122220
Author: Jo'Asia
Date: Tue, 25 Mar 2003 20:18
39 lines
2902 bytes
In general Dialog wraps lines in created posts. That is good. But
I can't use my signature because of wrapping as it's lines are 78
characters long and Dialog wont let me set the wrap limit past 76.

In beta 24 I simply set Dialog to add the signature in the moment
of actual posting and it didn't get wrapped.

But others didn't understand the signature setings and the possibility
of adding sig "invisibly" disappeared from beta 25.

And now I'm stuck. I added a request to exclude the part after sig
delimiter from the constraints of line wrapping, but Marcus says he
will not add it. He proposed another solution:

  - Create a new composition window by clicking on "New Post".
  - If there is text in the editor window, delete it.
  - Enter or Paste your signature into the editor window.
  - Select All (CTRL+A).
  - Use "Insert Wrap Override Character" (Shift+Ctrl+O)
  - Select All, copy to clipboard and paste that into the signature
    field in the signature settings dialog.

Well, it works. Sort of...

It works only for a single line. But my sig is created totally outside
newsreader (and that is a thing I will not change). So after I add the
Wrap Override Character in front of the %file:...% line it unwraps only
the first line of my signature and the rest is still mangled.

Do you have any other ideas?

Jo'Asia

-- 
   __.-=-.        Joanna Slupek  http://bujold.fantastyka.net/         .-=-.__
    --<()>       (Add one 'l' to 'hel' when replying by e-mail)        <()>--
   .__.'|     .....................................................     |'.__. 
            Change is inevitable, except from a vending machine.
Re: [dialog] Signature wrapping
#122221
Author: Fishter
Date: Tue, 25 Mar 2003 20:31
18 lines
1883 bytes
Hiya Jo'Asia
In news:b5qh2m.3vv6epj.1@sloth.hell.pl you wrote:

> In general Dialog wraps lines in created posts. That is good. But
> I can't use my signature because of wrapping as it's lines are 78
> characters long and Dialog wont let me set the wrap limit past 76.
<snip>
> Do you have any other ideas?

At the risk of being flamed, why not reduce your signature width by two 
characters per line?

-- 
Fishter
ntalk@fishter.org.uk - http://www.fishter.org.uk/
http://homepage.ntlworld.com/g.j.hilton/
Can I trade this job for what's behind door #1?
Re: [dialog] Signature wrapping
#122222
Author: Jo'Asia
Date: Tue, 25 Mar 2003 20:40
29 lines
2204 bytes
Fishter wrote in message <fldl91d9442k.dlg@fishter.org.uk>:

> Hiya Jo'Asia
> In news:b5qh2m.3vv6epj.1@sloth.hell.pl you wrote:

>> In general Dialog wraps lines in created posts. That is good. But
>> I can't use my signature because of wrapping as it's lines are 78
>> characters long and Dialog wont let me set the wrap limit past 76.

> <snip>

>> Do you have any other ideas?

> At the risk of being flamed, why not reduce your signature width by two 
> characters per line?

Because! ;)

Seriously speaking - some of the random quotes will not fit then and I
would hate to losing them...

Jo'Asia

-- 
   __.-=-.        Joanna Slupek  http://bujold.fantastyka.net/         .-=-.__
    --<()>       (Add one 'l' to 'hel' when replying by e-mail)        <()>--
   .__.'|     .....................................................     |'.__. 
           Nothing is fool-proof to a sufficiently talented fool.
Re: [dialog] Signature wrapping
#122224
Author: Marcus Mönnig
Date: Tue, 25 Mar 2003 21:18
50 lines
2626 bytes
Jo'Asia wrote in <b5qh2m.3vv6epj.1@sloth.hell.pl>:

> It works only for a single line. But my sig is created totally outside
> newsreader (and that is a thing I will not change). So after I add the
> Wrap Override Character in front of the %file:...% line it unwraps only
> the first line of my signature and the rest is still mangled.
> 
> Do you have any other ideas?

Use the script below. You'll need to change the signature inside Dialog 
from "%file:...%" to "MyUniqueIdentifier". In the script change 
"C:\mysignature.txt" to the correct file name of your signature file.


program OnBeforeSendingMessage;

function OnBeforeSendingMessage(var Message: TStringlist; Servername: string; IsEmail: boolean):boolean;
var i:integer;
    s:string;
    sl:TStringlist;
begin
result:=true;
if (message.count<3000) then
   begin
   s:=message.text;
   i:=pos('MyUniqueIdentifier',s);
   if i>0 then
   	begin
	delete(s,i,length('MyUniqueIdentifier'));	
	sl:=Tstringlist.create;
	try
	sl.loadfromfile('C:\mysignature.txt');
	insert(sl.text,s,i);
	finally
	sl.free;	
	end;
   	message.text:=s;	
   	end;
   end;
end;

begin
end.

Marcus
-- 
No replies in private e-mail, please, unless explicitly requested_
Please log bug reports into Mantis: http://www.40tude.com/dialog/mantis/
Please share your scripts and tips: http://www.40tude.com/dialog/wiki/
Re: [dialog] Signature wrapping
#122227
Author: Jo'Asia
Date: Tue, 25 Mar 2003 22:06
54 lines
2598 bytes
Marcus M�nnig wrote in message:

> Use the script below. You'll need to change the signature inside Dialog 
> from "%file:...%" to "MyUniqueIdentifier". In the script change 
> "C:\mysignature.txt" to the correct file name of your signature file.

I think I understand that one. Almost.

> program OnBeforeSendingMessage;
> 
> function OnBeforeSendingMessage(var Message: TStringlist; Servername: string; IsEmail: boolean):boolean;
> var i:integer;
>     s:string;
>     sl:TStringlist;
> begin
> result:=true;

Except this:

> if (message.count<3000) then

Why the condition?

>    begin
>    s:=message.text;
>    i:=pos('MyUniqueIdentifier',s);
>    if i>0 then
>    	begin
> 	delete(s,i,length('MyUniqueIdentifier'));	
> 	sl:=Tstringlist.create;
> 	try
> 	sl.loadfromfile('C:\mysignature.txt');
> 	insert(sl.text,s,i);
> 	finally
> 	sl.free;	
> 	end;
>    	message.text:=s;	
>    	end;
>    end;
> end;
> 
> begin
> end.

Thank very much!

Jo'Asia

-- 
   __.-=-.        Joanna Slupek  http://bujold.fantastyka.net/         .-=-.__
    --<()>       (Add one 'l' to 'hel' when replying by e-mail)        <()>--
   .__.'|     .....................................................     |'.__. 
 With every PLONK the world becomes brighter                             (MMR)
Re: [dialog] Signature wrapping
#122228
Author: Jo'Asia
Date: Tue, 25 Mar 2003 22:17
18 lines
1800 bytes
Marcus M�nnig wrote in message <1r8rp5zkgjb9m.dlg@40tude.com>:

[cut]

The script works, thank you very much (again).

When I will adapt it to allow few variations I'll will come back
to testing dialog on living usenet instead of closed enviroment
of hamster ;)

Jo'Asia

-- 
   __.-=-.        Joanna Slupek  http://bujold.fantastyka.net/         .-=-.__
    --<()>       (Add one 'l' to 'hel' when replying by e-mail)        <()>--
   .__.'|     .....................................................     |'.__. 
 Il porcupino nil sodomy est                                (Lords and Ladies)
Re: [dialog] Signature wrapping
#122230
Author: Marcus Mönnig
Date: Tue, 25 Mar 2003 22:31
19 lines
1893 bytes
Jo'Asia wrote in <b5qndl.3vv7m3b.1@sloth.hell.pl>:

> I think I understand that one. Almost.
> Except this:
> 
>> if (message.count<3000) then
> 
> Why the condition?

The replacement is only done when the total number of lines for the post is 
smaller than 3000. It's basically for performance reasons, since you don't 
want to run the script on a 1MB attachment posting.

Marcus
-- 
No replies in private e-mail, please, unless explicitly requested_
Please log bug reports into Mantis: http://www.40tude.com/dialog/mantis/
Please share your scripts and tips: http://www.40tude.com/dialog/wiki/
Re: [dialog] Signature wrapping
#122232
Author: Jo'Asia
Date: Tue, 25 Mar 2003 22:42
25 lines
2226 bytes
Marcus M�nnig wrote in message <1mn82u82l4mlo$.dlg@40tude.com>:

> Jo'Asia wrote in <b5qndl.3vv7m3b.1@sloth.hell.pl>:

>> I think I understand that one. Almost.
>> Except this:

>>> if (message.count<3000) then

>> Why the condition?

> The replacement is only done when the total number of lines for the post is 
> smaller than 3000. It's basically for performance reasons, since you don't 
> want to run the script on a 1MB attachment posting.

Oh, it's lines, not characters. That is more that enough for me :).

Jo'Asia

-- 
   __.-=-.        Joanna Slupek  http://bujold.fantastyka.net/         .-=-.__
    --<()>       (Add one 'l' to 'hel' when replying by e-mail)        <()>--
   .__.'|     .....................................................     |'.__. 
 On Beta Colony, your vote counts, On Barrayar, your Count votes.  (Shalom S.)
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads