[Mailman-Users] Integration with PHP
Alberto Pereira
albertopereira at gmail.com
Thu Dec 18 16:51:27 CET 2008
Thanks.
Ended up by adding "<email>_mod=on" as a GET variable and it worked.
Another problem:
I'm trying to find a way to send weekly digests to specific users. I could
write a bunch of code to store the specified users, check the dates on
emails and send them once a week with a cron job, but is there a easier way
to do that?
thanks again,
Alberto
On Thu, Dec 18, 2008 at 2:09 AM, Mark Sapiro <mark at msapiro.net> wrote:
> Mark Sapiro wrote:
>
> >Alberto Pereira wrote:
> >>My question is what is the GET variable to change the moderation bit?
> >
> >The issue is that when admin.py processes the 'mod' setting, it doesn't
> >actually check to see if the setting is present in the CGI data, it
> >just sets the users moderation on if the box is checked and off
> >otherwise, even if it isn't present in the CGI data.
> >
> >You could 'fix' Mailman/Cgi/admin.py by changing
> >
> > moderate = not not cgidata.getvalue(quser+'_mod')
> > mlist.setMemberOption(user, mm_cfg.Moderate, moderate)
> >
> >to
> >
> > if cgidata.has_key(quser+'_mod'):
> > moderate = not not cgidata.getvalue(quser+'_mod')
> > mlist.setMemberOption(user, mm_cfg.Moderate, moderate)
> >
> >Otherwise, you need to get the user's moderate setting first and then
> >set it accordingly.
>
>
> I think the same issue exists with the user's real name. You may also
> want to change
>
> newname = cgidata.getvalue(quser+'_realname', '')
> newname = Utils.canonstr(newname, mlist.preferred_language)
> mlist.setMemberName(user, newname)
>
> to
>
> if cgidata.has_key(quser+'_realname'):
> newname = cgidata.getvalue(quser+'_realname')
> newname = Utils.canonstr(newname,
> mlist.preferred_language)
> mlist.setMemberName(user, newname)
>
> --
> Mark Sapiro <mark at msapiro.net> The highway is for gamblers,
> San Francisco Bay Area, California better use your sense - B. Dylan
>
>
More information about the Mailman-Users
mailing list