[...]
> Another issue:
>
>
Many, many people are interested in using one list's settings as a
> default for a new list - if you're interested in this feature, do
you
> think:
>
> * this should be an option when you
create a new list? For example,
> after you fill out the "Create a
New List" form fields dealing with
> the list name, list owner,
description of the list, etc should there
> be a new option that
says something like, "User an already existing
> list to set your
new list's default settings?"
>
> or,
>
> * would you
rather see this functionality as a new administration
> screen,
where you'll log into an already created list and have the
> option
to basically, "clone" the list you're on, and make a new list,
>
perhaps with a new list name, etc.
>
> I sort of like option #1,
although it would have to be clarified
> whether what you just
filled out on the, "Create a New List" form
> would be override by
the information you just filled out.
>
>
> Any comments on
how this should be done? I know this has been sort of
> a headache
for people who like to make a lot of lists,
>
> --
> Justin
Simoni
Hi Simoni,
I was one of those who wants to make a lot of lists
with the same configuration. I have
implemented this feature myself (when you create a new list) in version
2.10.1. See the screenshot below. It copies the hash LIST_SETUP_DEFAULTS
from an existing list (or the default list) to the new list. So it does not
overwrite the new name, owner address, description and other fields from
the new_list screen. The extra code involved is pretty staight forward. In
practice it works very nicely.
But of course it would also be nice to have this
feature available in the admin panel for existing lists. Getting the best of
both worlds!
Regards,
Frans
Added code to sub
new_list:
if($errors){
$ending =
'';
$err_word =
'was';
$ending = 's' if
$errors > 1;
$err_word = 'were' if $errors >
1;
}
#qqq
configuration_lists added:
my
$configuration_lists;
my @lists =
available_lists();
my %labels = ('default' => 'default
list');
$labels{$_} = $_ foreach
@lists;
$configuration_lists =
$q->popup_menu(
-values
=>
['default',@lists],
-labels =>
{%labels},
-default =>
'default',
-name
=>
'configuration_lists',
);
#qqq
end
print(the_html(-Part
=> "header",
-Title =>
"Create a New List",
));
[...]
flags_list_info
=>
$flags->{list_info},
info
=>
$info,
flags_privacy_policy
=> $flags->{privacy_policy},
#qqq
configuration_lists added:
configuration_lists =>
$configuration_lists,
#qqq end
flags_list_name_bad_characters
=> $flags->{list_name_bad_characters},
[...]
%new_info = (%new_info,
%LIST_SETUP_DEFAULTS);
#qqq added
configuration_lists
if($q->param('configuration_lists')
ne 'default'){
my $ls_conf =
DADA::MailingList::Settings->new(-List =>
$q->param('configuration_lists'));
$ls_conf =
$ls_conf->get;
foreach my $setup (keys
%LIST_SETUP_DEFAULTS) {
$new_info{"$setup"} =
$ls_conf->{$setup};
}
}
#qqq
end
require
DADA::MailingList;
my $ls = DADA::MailingList::Create(-name
=> $list);
$ls->save({%new_info});
Changed template
"new_list_screen.tmpl":
<p>
Please enter the physical
address associated with this mailing list:
<br />
<textarea name="physical_address" cols="50" rows="5" wrap="virtual"
maxlength="1024"><!-- tmpl_var name="physical_address"
escape="HTML"--></textarea>
</p>
<!-- qqq added
configuration_lists -->
<hr />
<h1>Use same
list configuration as:</h1>
<p>
<!-- tmpl_var
name="configuration_lists" -->
</p>
<!-- qqq end
-->
<hr />
<p
style="text-align:center">
<input type="submit"
class="processing" value=" Create Your Mailing
List " />
</p>
</form>
<!-- end new_list_screen.tmpl
-->
Post:
mailto:dadadev@PROTECTED
Unsubscribe:
http://mojo.skazat.com/cgi-bin/dada/mail.cgi/u/[list]/
List Information:
http://mojo.skazat.com/cgi-bin/dada/mail.cgi/list/[list]
Archive:
http://mojo.skazat.com/cgi-bin/dada/mail.cgi/archive/[list]