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> &lt;<a href="mailto:nyusuke@nagosui.org">nyusuke@nagosui.org</a>&gt; 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>&gt; I would really like to do it,<br>&gt; 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>&nbsp;&nbsp;&nbsp;&nbsp; try:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; to_addr&nbsp;&nbsp; = context.getNotify_to()<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from_addr = context.getNotify_to
() &lt;- here<br>--------------------------------------------------<br><br>This should be:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from_addr = context.getNotify_from()<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ^^^^^^<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>&nbsp;&nbsp;- context.getNotify_to()<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&gt; e-mail address entered to 'Notify To' field on 'blog settings'
<br><br>&nbsp;&nbsp;- context.getNotity_from()<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&gt; e-mail address entered to 'Notify From' field on 'blog settings'<br><br>&nbsp;&nbsp;- REQUEST.form['email']<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&gt; e-mail address entered by comment form<br><br><br>Now assuming in your blog settings:
<br>&nbsp;&nbsp;- Notify From: <a href="mailto:spam@example.com">spam@example.com</a><br>&nbsp;&nbsp;- Notify To: <a href="mailto:egg@example.com">egg@example.com</a><br>&nbsp;&nbsp;- checked 'Require email'<br><br><br>Let's see some cases.<br><br>1.To
 send notification mail<br>&nbsp;&nbsp;from <a href="mailto:spam@example.com">spam@example.com</a><br>&nbsp;&nbsp;to <a href="mailto:egg@example.com">egg@example.com</a>,<br>&nbsp;&nbsp;no customization is needed(default action).<br><br>2.To send notification mail
<br>&nbsp;&nbsp;from <a href="mailto:spam@example.com">spam@example.com</a><br>&nbsp;&nbsp;to person who post comment,<br>&nbsp;&nbsp;customization in cbaddComment will be like this:<br>--------------------------------------------------<br>#Send notify mail if need
<br>if context.getSend_comment_notification():<br>&nbsp;&nbsp;&nbsp;&nbsp; try:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; to_addr&nbsp;&nbsp; = REQUEST.form['email']<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from_addr = context.getNotify_from()<br>--------------------------------------------------<br><br>3.To send notification mail
<br>&nbsp;&nbsp;from person who post comment<br>&nbsp;&nbsp;to <a href="mailto:egg@example.com">egg@example.com</a>,<br>&nbsp;&nbsp;customization in cbaddComment will be like this:<br>--------------------------------------------------<br>#Send notify mail if need
<br>if context.getSend_comment_notification():<br>&nbsp;&nbsp;&nbsp;&nbsp; try:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; to_addr&nbsp;&nbsp; = context.getNotify_to()<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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>&nbsp;&nbsp;&nbsp;&nbsp; try:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; to_addr = context.getNotify_to()<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if REQUEST.form['email'] == &quot;&quot;:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from_addr = '<a href="mailto:someone_posting_comment@example.com">someone_posting_comment@example.com
</a>'<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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