Try this out. It is a bit crude but could prove useful.
Background:
This script was used with Selena Sols Form Processor public domain
script which is available from http://selena.mcp.com/Scripts/. Using the
"feedback form" I collected applications to become a member of a mailing
list. I tweaked the response subroutine to write out all of the applicant
data to a file in a PENDING directory. The datafile was written as a perl
program so that I could run it from the command line or "require" it from
another script.
You could use this as the framework for building a posting approval web
interface.
For instance, if you are the moderator it it likely that postings are
going to be sent to you. With procmail processing, you could copy each
posting to its own file in a PENDING area and use the script to display
each file for you. Have the script resend approved posts to the proper
address.
Hopefully this should get you started. YMMV, script provided as is,
etc,etc...
On Wed, 29 Apr 1998, Steven Clift wrote:
> Greetings Majordomo-Users, ListMom, and MHonarc,
>
>
> My ISP is building a majordomo based "online event" system for me with
> Majordomo, Majorcool, and MHonArc. So far so good, except that I need
> one last piece a web-based mechanism to approve moderated posts.
>
> I'd like to be able to review the posts waiting in the message que and
> choose to approve, delete, or edit (maybe not a priority now) them all
> via the web. This way I can distribute the moderation among some
> helpers and easily check in when I am frequently on the road.
>
> Does anyone have a solution or some code available?
>
>
> Also, can someone recap how to approve moderated bounces via
> e-mail in such a way that the original author appears to have sent the
> message. I know how to "force" approve a message with the additional
> Subject: header under the approve command, but that won't do for my
> online events (see: http://www.iaginteractive.com/emfa ). I recall
> being set up once to be able with Pine approve post to a
> moderated list with a "pipe" command - what do I need to ask for in
> order to get that set up as well?
>
> Thanks,
>
> Steven Clift
>
> P.S. My web designer is also working with the MHonArc rc file to
> bring our sites look and feel into the archive. Does anyone have
> some sample rc files they could send us? We are particularly
> interest in versions that don't use tables and have taken
> accessibility issues into full consideration (they look good in Lynx
> etc.). Our online event is on Universal Access to the Internet so we
> need to be accessible to all those online.
>
>
> -------------------------------------------------------
> Steven Clift - Public Strategies for the Online World
> 3454 Fremont Ave S T: +1.612.822.8667
> Mpls, MN 55408 USA E: clift@publicus.net
> Consulting and Home Page - http://www.publicus.net
> Democracies Online - http://www.e-democracy.org/do
> E-Mail for All - http://www.iaginteractive.com/emfa
> -------------------------------------------------------
>
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~%
% Anthony anthonyw@albany.net %
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~%
% "Tetris, an art of maximizing how well things fit together. I am a %
% student of that art. I want to explore and create things that coalesce" %
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~%
#!/usr/local/bin/perl
$| =1;
use CGI;
$query = new CGI;
print $query->header;
$remote_host = $query->remote_addr();
if ( substr ($remote_host,0,12) ne "111.222.333.") {
print "I do not trust you if you run from $remote_host";
exit ; }
print $query->start_html(-title=>'List Approval Script',
-BGCOLOR=>'#FFFFFF');
print "<H1> Applications Pending Approval </H1>";
# If called without any arguments generate list, otherwise process form.
if ($query->param eq "" ) {
&GetPendingFiles($query);
} else {
&ProcessApprovals($query);
}
print $query->end_html;
sub GetPendingFiles {
my($query) = @_;
local($Url);
local ($filename,$name) ;
local ($dir) = "./Path/to/Pending/files/";
$script_name = $query->script_name();
print qq~
<FORM METHOD="post" ACTION="$script_name">
<TABLE WIDTH="100%" BORDER="1" CELLSPACING="0"CELLPADDING="0">
<tr>
<td align=center>Approve ?</td>
<td align=center>Applicant</td>
</tr>~;
opendir(DIR, $dir);
@dirlist = readdir(DIR);
closedir(DIR);
open(TEMPLIST, ">./Temp/filelist.tmp");
foreach $name (@dirlist)
{
if ($name =~ /\.myextension/)
{
print TEMPLIST "./Data/Pending/$name\n";
$Url = "<a href =\"";
$Url .= "$name" ;
$Url .= "\">";
$Url .= "$name" ;
$Url .= "</a>";
print "<tr><td align = center>";
print qq~
<tr><td align = center>
<input type= checkbox name= "approve" value="$name"></td>
<td> $Url</td></tr>
~;
}
}
close(TEMPLIST);
print "</table>\n<p>\n";
print $query->submit("Process");
print $query->endform;
}
sub ProcessApprovals {
my($query) = @_;
my(@values,$key);
local($scriptfile);
local(@filelisting);
@values = $query->param('collect');
foreach $key (@values){
$scriptfile = "./Path/to/Pending/files";
$scriptfile .= "$key";
require "$scriptfile";
}
open(TEMPLIST, "./Temp/filelist.tmp");
@filelist = <TEMPLIST>;
close(TEMPLIST);
foreach $file (@filelist){
chop($file);
unlink ("$file");
}
unlink ("./Temp/filelist.tmp");
&email_admin;
}
sub email_admin {
local($my_from_address,$to_email,$the_subject,$msg_output);
$to_email ="myaddress\@mydomain.com";
open (GETtheTIME, "-|") || exec "/usr/bin/date", $this_date;
close GETtheTIME;
$my_from_address ="administrator\@mydomain.com";
$the_subject ="The Officoal Mailing List as of $this_date";
open(LISTDB, "./Data/Approved/mailinglist.dis");
while (<LISTDB>) {
$msg_body .= $_;
}
close(LISTDB);
require "./Library/mail-lib.pl";
&send_mail($my_from_address,
$to_email,
$the_subject, $msg_body);
&send_mail($my_from_address,
"administrator\@mydomain.com",
$the_subject, $msg_body);
}
|
|