Hi! I'm managing some Mailman based lists and get "some" spam each day. Actually, > 95% of all emails kept for being revised is Spam, and it takes some time to navigate through all of them and click on their "discard" radio button. But changing the default from "defer" to "discard" isn't all that wise either, it may break other people's setup horribly. That is why I thought about having a small table ontop with the four chooses, which fire up a JScript to equally check the radio buttons for all mails in this admindb session. However, I'm not really a Python (nor a JavaScript) hacker, so I've only done that on the emitted HTML code. But maybe you get the idea and can integrate that into Mailman at some day or the other. It would save me quite some time a day:) I'll attach a patch (but only for the HTLM code, if you like the idea, you'll need to figure out where to place that into the .py scripts), the outline is like this: - Have a small JavaScript in the HTLM HEAD area that chooses the appropriate radio box. - Have an additional small FORM (w/o submit button or the like, only to have one more radio button list) to choose defer/accept/reject/discard. - Spend a name for the hugh FORM (containing all moderated emails) to be able to access it from inside the JavaScript. I'm not a JavaScript expert (in fact, I made this by trial and error, so for sure this can be done more elegant:) please don't blame for that... --- mail.html 2004-07-16 23:52:30.000000000 +0200 +++ mail2.html 2004-07-17 14:21:35.000000000 +0200 @@ -4,6 +4,38 @@ <LINK REL="SHORTCUT ICON" HREF="/pictures/mm-icon.png"> <META http-equiv="Content-Type" content="text/html; charset=us-ascii"> <TITLE>Linux Administrative Database</TITLE> +<script language="javascript"> +function StatusChange(offset) { + var extra_elements_start = 1; // In one table of emails, + // there's one input element + // before the table of + // emails: the "Submit" + // button. + var extra_elements_stop = 1; // Also, there's a "Submit" + // button at the end + var elements_per_mail = 13; // There are 13 input-like + // fields per mail. + var nth_element_within_mail = 1;// The what-to-do element + // within one email is the + // 1st element. + var number_of_chooses = 4; // leave, discard, accept, reject + var element_counter; + var element_number_within_email; + var e = document.emails.elements; + + for (element_counter = 0; element_counter < e.length ; element_counter++) { + if (element_counter <= (extra_elements_start - 1)) + continue; + if (element_counter >= (e.length - extra_elements_stop - 1)) + break; + element_number_within_email = (element_counter - extra_elements_start) % elements_per_mail; + if (element_number_within_email >= number_of_chooses) + continue; + if (((element_number_within_email - (nth_element_within_mail - 1)) % number_of_chooses) == offset) + e[element_counter].checked = 1; + } +} +</script> </HEAD> <BODY bgcolor="white"> <h2>Administrative requests for mailing list: <em>Linux</em></h2>This page contains a summary of the current set of administrative @@ -21,7 +53,27 @@ <p>You can also <a href="http://lug-owl.de/cgi-bin/mailman/admindb/linux?details=all">view the details</a> of all held postings. -<FORM action="http://lug-owl.de/cgi-bin/mailman/admindb/linux" method="POST" > +<FORM name="chooseall"> + <p>However, you can do moderation pre-discard all emails here + and accept some later on: + <table border> + <tr> + <th>Defer</th> + <th>Accept</th> + <th>Reject</th> + <th>Discard</th> + </tr> + <tr> + <td><INPUT name="chooseall" type="RADIO" value="0" onClick="StatusChange(0)"></td> + <td><INPUT name="chooseall" type="RADIO" value="1" onClick="StatusChange(1)"></td> + <td><INPUT name="chooseall" type="RADIO" value="2" onClick="StatusChange(2)"></td> + <td><INPUT name="chooseall" type="RADIO" value="3" onClick="StatusChange(3)"></td> + </tr> + </table> +</FORM> +<hr> + +<FORM name="emails" action="http://lug-owl.de/cgi-bin/mailman/admindb/linux" method="POST" > <center><INPUT name="submit" type="SUBMIT" value="Submit All Data" ></center> <table BORDER="0"> <tr> MfG, JBG -- Jan-Benedict Glaw jbglaw@lug-owl.de . +49-172-7608481 "Eine Freie Meinung in einem Freien Kopf | Gegen Zensur | Gegen Krieg fuer einen Freien Staat voll Freier Bürger" | im Internet! | im Irak! ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));