Subject: The mailing list for listmasters using Sympa
List archive
Re: [sympa-users] Message header/footer inheritance and variables?
- From: Mark Sallee <address@concealed>
- To: Adam Bernstein <address@concealed>
- Cc: address@concealed
- Subject: Re: [sympa-users] Message header/footer inheritance and variables?
- Date: Wed, 12 Nov 2008 12:11:35 -0700
Adam,
I've attempted to add these changes to admin.pm, but it isn't working.
Do you have any more documentation or tips on how to populate the
variables in the footer? The main variable I want for the footer is
[%listname%].
I have also submitted this to the Feature Requests for Sympa:
https://sourcesup.cru.fr/tracker/index.php?func=detail&aid=4632&group_id=23&atid=170
Thank you.
Mark Sallee, Systems Administrator
Adam Bernstein wrote:
> Roger B.A. Klorese wrote:
>> Is it possible to define a message footer for an entire robot, and
>> parameterize its content with replacement for the listname?
>
> Not in stock Sympa, but I did this in an easy mod of my own to
> admin.pm, just requires adding one include line at the top and then a
> block of standard template parsing in the list creation module, with
> the diff against version 5.3.4 given below. Then just create your
> default message_footer.tt2 in the etc/mail.tt2 directory.
>
> I think I submitted this patch a long time ago, but it was rejected as
> not being in line with Sympa design. But I could be confused about that.
>
> ab
>
>
> *** admin.pm Thu Jan 24 22:19:32 2008
> --- admin-mod.pm Tue Apr 15 14:09:40 2008
> ***************
> *** 43,48 ****
> --- 43,52 ----
>
> require "/home/sympa/bin/tools.pl";
>
> + #---begin customization:
> + # Needed for creation of default footer template in create_list_old():
> + require "/home/sympa/bin/tt2.pl";
> + #---end
>
> =pod
>
> ***************
> *** 218,224 ****
> foreach my $o (@{$param->{'owner'}}){
> &do_log('err',$o->{'email'});
> }
> ! return undef;
> }
>
>
> --- 222,228 ----
> foreach my $o (@{$param->{'owner'}}){
> &do_log('err',$o->{'email'});
> }
> ! return undef;
> }
>
>
> ***************
> *** 311,316 ****
> --- 315,345 ----
> print INFO $param->{'description'};
> }
> close INFO;
> + #---begin customization:
> + # Create default message footer:
> + unless (open FOOTER, '>:utf8', "$list_dir/message.footer") {
> + &do_log('err','Impossible to create %s/footer :
> %s',$list_dir,$!);
> + }
> +
> + $param->{'robot'} = $robot;
> +
> + my $parsed_output;
> + my $lang = &Language::GetLang();
> + my $tt2_include_path = [$list_dir.'/mail_tt2/'.$lang,
> + $list_dir.'/mail_tt2',
> + $Conf{'etc'}.'/'.$robot.'/mail_tt2/'.$lang,
> + $Conf{'etc'}.'/'.$robot.'/mail_tt2',
> + $Conf{'etc'}.'/mail_tt2/'.$lang,
> + $Conf{'etc'}.'/mail_tt2',
> + '/var/sympa/bin/etc'.'/mail_tt2/'.$lang,
> + '/var/sympa/bin/etc'.'/mail_tt2'];
> + &tt2::parse_tt2($param, 'message_footer.tt2', \$parsed_output,
> $tt2_include_path);
> +
> + Encode::from_to($parsed_output, 'utf8',
> $Conf{'filesystem_encoding'});
> + print FOOTER $parsed_output;
> +
> + close FOOTER;
> + #---end customization
>
> ## Create list object
> my $list;
>
>
-
Re: [sympa-users] Message header/footer inheritance and variables?,
Mark Sallee, 11/12/2008
- Re: [sympa-users] Message header/footer inheritance and variables?, Adam Bernstein, 11/12/2008
Archive powered by MHonArc 2.6.19+.