Inserting users names as signature of message
I hope this is on topic and hopefully not a question that has been hashed and rehashed but:
I need a way to append the full name box string of each user to the end of each message they post.
Is this something that is easily attainable?
Thank You,
Bruce Gregory, neophyte list administrator
Capt Bruce Gregory wrote:
I need a way to append the full name box string of each user to the end of each message they post.
You could modify the process() function Mailman/Handlers/Decorate.py to add the poster's name to the replacements. For example, near the beginning of this function we have
d = {}
if msgdata.get('personalize'):
You could make that
d = {}
for sender in msg.get_senders():
if mlist.isMember(sender):
d['poster_name'] = mlist.getMemberName(sender)
break
if msgdata.get('personalize'):
Then you could use %(poster_name)s as a replacement in msg_footer.
This will work for messages, but the individual messages in digests will still be "unsigned".
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Mark Sapiro wrote:
You could make that
d = {} for sender in msg.get_senders(): if mlist.isMember(sender): d['poster_name'] = mlist.getMemberName(sender) break if msgdata.get('personalize'):
Then you could use %(poster_name)s as a replacement in msg_footer.
Better still, make it
d = {'poster_name': ''} for sender in msg.get_senders(): if mlist.isMember(sender): d['poster_name'] = mlist.getMemberName(sender) break if msgdata.get('personalize'):
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (2)
-
Capt Bruce Gregory
-
Mark Sapiro