All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Goirand <thomas@goirand.fr>
To: mlmmj@mlmmj.org
Subject: Re: Web based moderation system for MLMMJ
Date: Sun, 08 Feb 2009 12:54:12 +0000	[thread overview]
Message-ID: <498ED5F4.5010905@goirand.fr> (raw)
In-Reply-To: <498C406B.9070200@goirand.fr>

[-- Attachment #1: Type: text/plain, Size: 3239 bytes --]

Christian Laursen wrote:
> Mads Martin Joergensen wrote:
> 
>> ... and when the webinterface clicks moderate you do the same as if the
>> moderator replied to the mail. Just send a mail to the reply-to address
>> from your webserver. You know how to construct the correct reply-to when
>> you have access to the moderation/ directory.
>>
>> And if you send the mail, then you don't have to do anything else, since
>> that's not needed with mail moderation either.
> 
> I would recommend this approach too. From an administration point of
> view, the only thing neccesary would then be for the web server user to
> have read access to the moderation directory.

There we go! I spent my Sunday afternoon on it, and the result is attached.

Here are some explanations.

* dependencies *

This app needs:
- php with gettext() support (for translations). Nearly all (if not all)
Unix distributions have php with gettext support.
- The Mail_mime PEAR package (php-mail-mime in Debian)

* setup *

- Unpack the tar.gz
- Run "make i18n" to generate the gettext binaries out of the sources
- Edit the 5 variables on top of mlmmj-moderation.php to set the
moderation folder, list name, domain, delimiter and the address used to
send the moderation validation messages. You will need gettext installed
on your system...
- Eventually rename mlmmj-moderation.php and edit mlmmj.css to your taste
- Add a .htaccess / .htpasswd to protect the moderation folder from others
- make it so this app have read/write access to the moderation folder.
Write access is needed because the app does some unlink() calls to
delete the messages.
- If using debian, you might need to dpkg-reconfigure locales and add
fr_FR.UTF-8, if you want to see my French translation (there might be
some other distributions needing the same kind of thing, I don't know...).

* known issues *

- Because this web app is sending an email to validate messages to be
moderated, once you have hit "validate", validated messages will still
(most of the times) show in the interface, as the folder is (most of the
times) read before MLMMJ has time to send the moderated messages and
remove them from the moderation folder.

A workaround would be to NOT display messages that are moderated on the
URL bar, but it's not a good way to go, as if the server is very busy,
the next refresh of the page (the one after the validation) can still
show some messages already validated. We see here that the method to
send emails doesn't seem to be very good... Would it be possible for me
to rename the moderated messages???

- Because it's the first version, I have not yet used POST, but some GET
in order to see things on the URL bar. So, of course, we are here
hitting the limitation of the URL size (if there are really a lot of
messages to moderate). This can be changed later simply by adding
method="POST" in the form, as I use $_REQUEST (and not the stupid $_POST
/ $_GET that everybody uses...). I might do this on the next version,
but for now, it's more easy for debug purposes to keep it this way.

I hope you guys will like my work. Comments and critics are welcome, I'd
be happy to add some improvements.

Regards,

Thomas Goirand

P.S: A nice name for this app would be cool. Ideas?

[-- Attachment #2: mlmmj-moderation-web-interface_0.1.tar.gz --]
[-- Type: application/gzip, Size: 5655 bytes --]

  parent reply	other threads:[~2009-02-08 12:54 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-06 13:51 Web based moderation system for MLMMJ Thomas Goirand
2009-02-07  8:30 ` Mads Martin Joergensen
2009-02-07  9:17 ` Thomas Goirand
2009-02-07 10:46 ` Mads Martin Joergensen
2009-02-07 13:10 ` Thomas Goirand
2009-02-07 13:34 ` Mads Martin Joergensen
2009-02-07 13:43 ` Christian Laursen
2009-02-08 12:54 ` Thomas Goirand [this message]
2009-03-01  6:54 ` Thomas Goirand
2009-03-01 23:53 ` James Scott
2009-03-02  6:27 ` Thomas Goirand
2009-03-04 20:20 ` Morten K. Poulsen
2009-03-04 20:37 ` Morten K. Poulsen
2009-03-04 23:38 ` Thomas Goirand
2009-03-06 16:43 ` Morten K. Poulsen
2009-03-06 19:36 ` Thomas Goirand
2009-03-06 20:40 ` Morten K. Poulsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=498ED5F4.5010905@goirand.fr \
    --to=thomas@goirand.fr \
    --cc=mlmmj@mlmmj.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.