修改ploneboard线程或注释时通知用户
hl.plone.boardnotifications的Python项目详细描述
Introduction
hl.plone.boardnotifications为 Ploneboard几个 目的。它允许您:
- 允许用户订阅/取消订阅论坛线程;
- 编辑内容后通知对话/评论所有者, 由版主删除或移动到其他论坛;
- 为每个目的配置特定的邮件文本。将邮件文本留空 对于您不想使用的通知类型;
- 使用MemberData属性对邮件进行个性化设置;
- 在通知中使用对话/评论URL和标题。
Installation
- 将包添加到构建中。
- 运行Buildout。
- 重启Zope。
- 使用plone控制面板安装hl.plone.boardnotifications。
- 访问站点控制面板中的“板通知”(转到 @@boardnotifier-settings)并配置邮件模板(请参见 Configuration of Mail Templates下面)。
Upgrading from previous versions
在版本1.1中,存储订阅已更改。迁移现有订阅:
- 备份数据库
- 转到plone control panel->;加载项
- 向下滚动到已激活的加载项,搜索板电子邮件通知并单击“升级”
如果有任何问题,请随时提交bug report
Configuration of Mail Templates
Subject and Signature
如果选择配置主题和签名,则将在所有 模板。如果你想在每个模板的基础上使用主题和签名, 将这些字段留空。然后可以将签名添加到每个模板 适当的。对于每个模板主题,输入:
Subject:your subject here
在邮件模板的第一行,后跟一个空行。
Variables
可以使用多个变量生成有意义的邮件文本 变量名为的标准python字符串插值说明符 映射键(即%(variable_name)s)。以下变量可用 在电子邮件模板中:
- 在portal_memberdata; 中定义的所有成员属性
- 会话标题:使用%(threadtitle)s引用会话的 标题;
- 对话url:使用%(threadurl)s引用对话的url;
- 论坛标题:使用%(boardtitle)s引用论坛标题;
- 注释url:使用%(commenturl)s引用注释的url。
- 注释文本:使用%(commenttext)s引用注释的文本。
Personalized Mail Salutations
敬礼字段可用于定义特定于性别的敬礼。如果你 不需要这个功能,只需留空即可。保存设置时, 空字符串将被:替换-忽略此项即可。你还是可以放一个 在每个邮件模板中使用泛型称呼,并使用%(fullname)sto address 收件人。
如果您想要个性化的问候语,hl.plone.boardnotifications定义 名为“salutation”的新成员属性。你有责任填补 通过自定义@@personal-settings等方式为每个成员提供。那你得绘制地图 敬礼成员属性的可能内容 敬礼,例如:
Mr:Dear Mr. %(fullname)s, Mrs:Dear Mrs. %(fullname)s, :Dear Mrs./Mr. %(fullname)s,
Examples of mailing texts
已将评论添加到对话中,请通知对话订户:
Subject:New comment in thread "%(threadtitle)s" %(salutation)s There is a new post in thread "%(threadtitle)s", in the forum "%(boardtitle)s". You are suscribed to this thread. Here is the comment text: %(commenttext)s Go to the latests post: %(commenturl)s %(mailsignature)s If you don't want to be notified: %(threadurl)s/unsubscribe This e-mail has been sent automatically.
对话已移动到另一个论坛:
Subject:Conversation "%(threadtitle)s" has been moved %(salutation)s The conversation "%(threadtitle)s" has been moved to "%(boardtitle)s". Go to the moved conversation: %(threadurl)s %(mailsignature)s
Changelog
1.1 (2015-10-19)
- 如果目的地地址不可用(Rafaelbco),请不要尝试发送通知电子邮件。
- 使用oobtree存储订阅
1.0 (2015-01-13)- 修复事件处理程序(移动订阅)
- 修复事件处理程序(移动订阅)
0.9 (2014-12-10)
- 当一个线程移动到另一个论坛时,也移动订阅
- 移动线程时通知订阅服务器
0.8 (2014-03-19)
- 确保CommentText是Unicode(牛仔裤)
- 删除plonesite(rafaelbco)时不要失败
0.7 (2013-08-01)
- 有意义的viewlet名称
0.6 (2013-07-22)
- 添加mail-in功能(jean)
- 论坛订阅(jean)
- 添加“commentText”作为通知邮件选项(jean)
0.5 (2013-02-11)
- 增加了巴斯克语和西班牙语翻译(勘误表)
0.3 (2012-12-13)
- 添加文档
- 不要试图向已删除的用户发送电子邮件
- 当模板只包含空格时,不要发送电子邮件
0.2 (2012-08-23)
- 工作清单.in
0.1 (2012-08-23)
- 初始版本