Skip to Content.
Sympa Menu

en - Re: [sympa-users] Adding a delivery type - html_summary - patches for 4.0b2

Subject: The mailing list for listmasters using Sympa

List archive

Chronological Thread  
  • From: Chris Hastie <address@concealed>
  • To: address@concealed
  • Subject: Re: [sympa-users] Adding a delivery type - html_summary - patches for 4.0b2
  • Date: Tue, 10 Feb 2004 09:14:27 +0000

On Tue, 10 Feb 2004, Mark Valiukas <address@concealed> wrote
I finally got around to looking at the 4 code this morning.
This afternoon, here are diffs against List.pm and wwslib.pm
from 4.0b2 for this feature.

Thanks Mark, very useful for me trying to do something similar for plain text digests. A quick improvisation based on your code seems to suggest you need to make a few changes in Commands.pm too, in order to allow users to set their options to your html_summary reception mode with commands in mail. This is what I came up with for digestplain

--- /usr/local/sympa/bin/Commands.pm.orig Tue Feb 10 09:04:00 2004
+++ /usr/local/sympa/bin/Commands.pm Tue Feb 10 09:07:13 2004
@@ -1497,7 +1497,7 @@
my ($which, $mode) = ($1, $2);

## Unknown command (should be checked....)
- unless ($mode =~
/^(digest|nomail|normal|each|mail|conceal|noconceal|summary|notice|txt|html|urlize)$/i)
{
+ unless ($mode =~
/^(digest|digestplain|nomail|normal|each|mail|conceal|noconceal|summary|notice|txt|html|urlize)$/i)
{
push @msg::report, sprintf "Unknown command.\n";
return 'syntax_error';
}
@@ -1545,13 +1545,13 @@
}

## May set to DIGEST
- if ($mode =~ /^(digest|summary)/ and !$list->is_digest()){
+ if ($mode =~ /^(digest|digestplain|summary)/ and !$list->is_digest()){
push @msg::report, sprintf Msg(6, 45, "List %s has no digest mode.
Your configuration hasn't been modified.\n"), $which;
do_log('info', 'SET %s DIGEST from %s refused, no digest mode',
$which, $sender);
return 'not_allowed';
}

- if ($mode =~
/^(mail|nomail|digest|summary|notice|txt|html|urlize|not_me)/){
+ if ($mode =~
/^(mail|nomail|digest|digestplain|summary|notice|txt|html|urlize|not_me)/){
# Verify that the mode is allowed
if (! $list->is_available_reception_mode($mode)) {
push @msg::report, sprintf Msg(6, 90, "List %s allows only these
reception modes : %s\nYour configuration hasn't been modified.\n"), $which,
$list->available_reception_mode;


--
Chris Hastie



Archive powered by MHonArc 2.6.19+.

Top of Page