当有人向文件添加评论时自定义电子邮件通知
我想自定义从 Plone 的默认评论操作发送的文本,尤其是当有人评论文件时发送的链接。当前的行为是链接本身启动文件。我希望看到的行为是让读者能够看到输入的评论。
我一直试图通过 ZMI 和 Zope 文件系统查找消息的模板脚本,但无法找到消息模板。
.... 默认消息示例 ....
有人在您的文件上添加了评论: 测试。
如果您是该文章的作者,我们建议您阅读评论, 并根据需要相应更新文档 - 然后删除评论。
如果需要进一步澄清,请回复评论以及负责人 发表评论将会收到这样的通知,并且可能会给您 更多细节。
要查看新评论,请访问: http://bestkey.middlewaygroup.com/products/Test.ppt
-- 站点管理员
I'd like to customize the text sent from the default Comment action of Plone, especially the link sent when someone comments on a file. Current behavior is that the link launches the file itself. The behavior I'd like to see is to take the reader to be able to see the comment entered.
I've been trying to find the template script for the message via both ZMI and the Zope file system but couldn't locate the message template.
.... Example of Default Message ....
Someone added a comment on your File:
Test.
If you are the author of this item, we recommend that you read the comment,
and update the documentation accordingly if required - then remove the comment.
If further clarification is needed, reply to the comment, and the person who
made the comment will get a notification like this, and will likely give you
more details.
To view the new comment, visit:
http://bestkey.middlewaygroup.com/products/Test.ppt
--
Site Administrator
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可能想看看 plone.app.discussion 这是新的评论系统适用于 Plone 4.1,也可作为 Plone 3.3 的附加产品。
使用 padiscussion,您可以注册一个自定义事件订阅者,该事件订阅者在添加新评论时会被触发:
您必须将“notify_user”函数放入“mycustomsubscriber.py”文件中,该文件可以包含发送自定义电子邮件的任意 Python 代码。
请参阅 http://svn。 plone.org/svn/plone/plone.app.discussion/trunk/plone/app/discussion/notifications.zcml 和 http://svn.plone.org例如 /svn/plone/plone.app.discussion/trunk/plone/app/discussion/comment.py 。
如果旧的 Plone 评论系统评论提供像 IComment 这样的接口,它应该类似地工作。虽然,我认为它没有提供这样的接口,但我不能100%确定。
You might want to have a look at plone.app.discussion which is the new commenting system for Plone 4.1 and also available as an add-on product for Plone 3.3.
With p.a.discussion you can register a custom event subscriber that is fired when a new comment is added:
You have to put a "notify_user" function inside a "mycustomsubscriber.py" file which can contain arbitrary Python code that sends a custom email.
See http://svn.plone.org/svn/plone/plone.app.discussion/trunk/plone/app/discussion/notifications.zcml and http://svn.plone.org/svn/plone/plone.app.discussion/trunk/plone/app/discussion/comment.py for examples.
If the old Plone commenting system comments provide an interface like IComment it should work similarly. Though, I think it does not provide such an interface, but I'm not 100% sure.
您正在寻找的模块是:
,您可以使用z3c.jbot。或者在 ZMI 中自定义:
(并且,您必须至少安装一个附加组件,Products.PloneHelpCenter 因为此消息来自该加载项)。
The module you are looking for is:
which you can override with z3c.jbot. Or in the ZMI, customize:
(And, you must have at least one add-on installed, Products.PloneHelpCenter because this message is from that add-on).