Article View: news.software.readers
Article #173284[DIALOG] Two scripts to avoid Subject cutting
From: Lem Novantotto
Date: Tue, 13 Sep 2005 16:55
Date: Tue, 13 Sep 2005 16:55
84 lines
4279 bytes
4279 bytes
Hi!
With Dialog, if you reply to an article which has a subject like
(Re:) New subject (was: Old subj...)
the old subject is automatically cut off from your header, so you get:
Re: New subject.
I don't like this behaviour: IMHO there's no reason to change the Subject
twice, instead of once. Who sets his newsreader to break threads when their
Subjects change, can understand my reasons.
What about this workaround in two scripts? Please note that they don't
affect the threads panel (which is filled with the Subjects before, on the
XOver event). Besides, since the Subject is a mandatory header in news
articles (ie there must be exactly one Subject header in every article), I
haven't taken into account the event of its absence.
I think they are pretty self explanatory: whenever an article is saved, the
string "(was:" in its Subject, if present, is changed in "§was:" (which
seems to me a string strange enough). Whenever an article is posted, the
string "§was:" in its Subject, if present, is changed back in "(was:".
So, here they are:
program OnBeforeSavingMessage;
procedure OnBeforeSavingMessage(var Message: TStringlist; Servername:
string; IsEmail: boolean);
var
i: integer;
p: Longint;
Soggetto: string;
begin
if not IsEmail then begin
i := 0;
while copy (message[i], 1, 9) <> 'Subject: ' do i := i + 1;
p := pos ('(was:', message[i]);
if p > 0 then begin
Soggetto := message[i];
delete (Soggetto, p, 1);
insert ('§', Soggetto, p);
message[i] := Soggetto;
end; //end if p
end; //end if not IsEmail
end;
begin
end.
program OnBeforeSendingMessage;
function OnBeforeSendingMessage(var Message : TStringlist;
Servername : string;
IsEmail : boolean
):boolean;
var
i: integer;
p: Longint;
Soggetto: string;
begin
result := true;
if not IsEmail then begin
i := 0;
while copy (message[i], 1, 9) <> 'Subject: ' do i := i + 1;
p := pos ('§was:', message[i]);
if p > 0 then begin
Soggetto := message[i];
delete (Soggetto, p, 1);
insert ('(', Soggetto, p);
message[i] := Soggetto;
end; //end if p
end; //end if not IsEmail
end;
begin
end.
Corrections? Improvements? Comments? Ideas? Thanks in advance.
--
Bye, Lem
Informazioni su it.*: http://www.news.nic.it
Archivio news: http://groups.google.it/advanced_search?hl=it
Linee guida della netiquette: http://www.faqs.org/rfcs/rfc1855.html
Technical Details
Message-ID:
<1d98039749e537f5abf70553094aca84%Lem@Lem98.here>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newscon06.news.prodigy.com!newscon02.news.prodigy.com!prodigy.net!nx01.iad01.newshosting.com!newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!feeder.enertel.nl!nntpfeed-01.ops.asmr-01.energis-idc.net!131.211.141.196.MISMATCH!humbolt.nl.linux.org!news.nl.linux.org!news.newsland.it!x-privat.org!not-for-mailShow Full Headers
Complete Article Headers
Message-ID: <1d98039749e537f5abf70553094aca84%Lem@Lem98.here>
Subject: [DIALOG] Two scripts to avoid Subject cutting
Date: Tue, 13 Sep 2005 18:55:30 +0200
From: Lem Novantotto <Lem98@Hotmail.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newscon06.news.prodigy.com!newscon02.news.prodigy.com!prodigy.net!nx01.iad01.newshosting.com!newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!feeder.enertel.nl!nntpfeed-01.ops.asmr-01.energis-idc.net!131.211.141.196.MISMATCH!humbolt.nl.linux.org!news.nl.linux.org!news.newsland.it!x-privat.org!not-for-mail
Newsgroups: news.software.readers
User-Agent: 40tude_Dialog/2.0.15.1it Hamster/2.0.7.0
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-15"
Content-Transfer-Encoding: 8bit
Reply-To: Lem98@people.it
X-Face: '*{O=FR{|; Ot1.X_@;
4{`a1]Or*9c9}*@9`.O#:ZJt!ou@,?9Y@oFg)l$:T8UGtiTUo\[D~|`e8w!VqLVb5e2SUNAyM+Rqr{oI8GjuRdyzk2US,(hLDWI-T%b7daZ?S"H"_pNqS;
vNn@`~kpl46q92wYog~vrV3G(ZA.@UEI!r:u<If;
oUw]-rW|qZ!l6>>TEFfWn}y''DU-(9m\^8HDf5#eK?G~gSPt%Bff; 57-vw;
z%qCc=}{{xiLm2m:OwdG-RTO}nL_]m6ZBk<~iH+bSd&Z+y{?m]@:H6K[sb<s0KiGa
NNTP-Posting-Host: $$_ewgnlelsg0.x-privat.org
Organization: X-Privat NNTP Server - http://www.x-privat.org
Lines: 84
X-Authenticated-User: $$pt9kqlq__085nc1qk
X-Complaints-To: abuse@x-privat.org