Thanx for your efforts Mr, NAKAI,<br><br>If i understand what you are describing correctly, its not entirely what i wold like to do,<br><br>1. I make a post.<br>2. person A makes a comment in the above post (i get notified).
<br>3. person B makes a comment in the same post, this is where i wold like to have a notification to me (this is what is built in at the moment i think) and person A (i dont think this is implemented).<br>4. if more comments are added i would like to be notified as well as have notifying mails sent to the persons who already made comments in that post.
<br><br>/Niklas<br><br><br><div><span class="gmail_quote">On 12/18/06, <b class="gmail_sendername">Yusuke NAKAI</b> <<a href="mailto:nyusuke@nagosui.org">nyusuke@nagosui.org</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br><br>> I would really like to do it,<br>> but my programming skills is limited at a very low level for now<br><br>Me too!<br>But you're lucky to get chance to learning python, aren't you?<br><br><br>First of all, there is a typo in cbaddComment around line 40:
<br><br>--------------------------------------------------<br>#Send notify mail if need<br>if context.getSend_comment_notification():<br> try:<br> to_addr = context.getNotify_to()<br> from_addr = context.getNotify_to
() <- here<br>--------------------------------------------------<br><br>This should be:<br> from_addr = context.getNotify_from()<br> ^^^^^^<br><br><br>Well, let's customize.
<br>You can customize notification mail by assorting these objects and<br>setting them to 'to_addr' or 'from_addr'.<br><br> - context.getNotify_to()<br> -> e-mail address entered to 'Notify To' field on 'blog settings'
<br><br> - context.getNotity_from()<br> -> e-mail address entered to 'Notify From' field on 'blog settings'<br><br> - REQUEST.form['email']<br> -> e-mail address entered by comment form<br><br><br>Now assuming in your blog settings:
<br> - Notify From: <a href="mailto:spam@example.com">spam@example.com</a><br> - Notify To: <a href="mailto:egg@example.com">egg@example.com</a><br> - checked 'Require email'<br><br><br>Let's see some cases.<br><br>1.To
send notification mail<br> from <a href="mailto:spam@example.com">spam@example.com</a><br> to <a href="mailto:egg@example.com">egg@example.com</a>,<br> no customization is needed(default action).<br><br>2.To send notification mail
<br> from <a href="mailto:spam@example.com">spam@example.com</a><br> to person who post comment,<br> customization in cbaddComment will be like this:<br>--------------------------------------------------<br>#Send notify mail if need
<br>if context.getSend_comment_notification():<br> try:<br> to_addr = REQUEST.form['email']<br> from_addr = context.getNotify_from()<br>--------------------------------------------------<br><br>3.To send notification mail
<br> from person who post comment<br> to <a href="mailto:egg@example.com">egg@example.com</a>,<br> customization in cbaddComment will be like this:<br>--------------------------------------------------<br>#Send notify mail if need
<br>if context.getSend_comment_notification():<br> try:<br> to_addr = context.getNotify_to()<br> from_addr = REQUEST.form['email']<br>--------------------------------------------------<br><br><br>Note: If 'Require email' is 'not' checked in your blog setting, it seems
<br>to be better to do conditional branch where 'REQUEST.form['email']' appears.<br><br>For example, in case 3. on above,<br>--------------------------------------------------<br>#Send notify mail if need<br>if context.getSend_comment_notification
():<br> try:<br> to_addr = context.getNotify_to()<br> if REQUEST.form['email'] == "":<br> from_addr = '<a href="mailto:someone_posting_comment@example.com">someone_posting_comment@example.com
</a>'<br> else:<br> from_addr = REQUEST.form['email']<br>--------------------------------------------------<br><br><br>Unfortunately I'm not skilled at programming, so I'm not confident these<br>codes help you, and afraid if I misunderstood your intention. I hope for
<br>someone's following up.<br><br>Regards,<br><br>--<br>Yusuke NAKAI<br><br>mail: <a href="mailto:nyusuke@nagosui.org">nyusuke@nagosui.org</a><br>web : <a href="http://nagosui.org">http://nagosui.org</a><br>_______________________________________________
<br>COREblog-en mailing list<br><a href="mailto:COREblog-en@postaria.com">COREblog-en@postaria.com</a><br><a href="http://postaria.com/mailman/listinfo/coreblog-en">http://postaria.com/mailman/listinfo/coreblog-en</a><br>
Unsubscription writing to <a href="mailto:coreblog-en-leave@postaria.com">coreblog-en-leave@postaria.com</a><br></blockquote></div><br><br clear="all"><br>-- <br>With best regards / med vänlig hälsning<br><br>Niklas