简体   繁体   English

Drupal中的节点“兴趣”通知

[英]Node “interest” notification in drupal

My question is quite simple (i think) but cannot find the right module for that. 我的问题很简单(我认为),但是找不到合适的模块。

I'm working on a small classified website in which i have a bunch of nodes. 我正在一个小型机密网站上工作,其中有很多节点。 I display them using views. 我使用视图显示它们。

I'd like for any (authenticated with role) user of the website to be able to click on a kind of button like "I'm interested" which will trigger an event doing various actions like 'changing one cck field' on that content-type and also send an e-mail to the author of the classified. 我希望该网站的任何(具有角色身份验证的)用户都能够单击“我感兴趣”之类的按钮,这将触发一个事件,该事件在该内容上执行各种操作,例如“更改一个cck字段” -类型,并向分类的作者发送电子邮件。

Pretty straight forward but no clue on where to start, which module should i use ? 很简单,但是不知道从哪里开始,我应该使用哪个模块?

For this, you can use the Flag Module and Rules Module 为此,您可以使用标志模块规则模块

In your view, you can create a relationship to flags to allow the use of other 'fields'. 在您看来,您可以创建与标志的关系以允许使用其他“字段”。

Using Rules, create a new rule that is triggered when a node is flagged (or unflagged). 使用“规则”,创建一个新规则,该新规则在标记(或未标记)节点时触发。 Rules allows you to do both: changing a CCK field and sending out emails when an event occurs. 规则允许您同时执行以下操作:更改CCK字段并在事件发生时发送电子邮件。

Walk-through: 演练:

  1. Install and enable the Flag Module and Rules Module 安装并启用标志模块和规则模块
  2. Create a new flag at "admin/build/flags" 在“ admin / build / flags”处创建一个新标志
  3. Edit/Create you classified view, add a relationship to Flags: Node Flag and choose > the name of the flag you just created. 编辑/创建分类视图,将关系添加到“ Flags: Node Flag然后选择>您刚刚创建的标志的名称。
  4. Under "fields" add Flags: Flag link and configure as you like 在“字段”下添加Flags: Flag link并根据需要进行配置
  5. Add a new rule at "admin/rules/trigger/add" for the event A node has been flagged,
    under "FLAG NAME"
    对于A node has been flagged,
    under "FLAG NAME"
    的事件,在“ admin / rules / trigger / add”处添加新规则A node has been flagged,
    under "FLAG NAME"
    A node has been flagged,
    under "FLAG NAME"
  6. Add action to perform of Populate a field under the heading CCK 在标题CCK下添加要执行的操作以Populate a field
  7. Add action to perform of Send a mail to a user under the heading System and configure your desired settings. 在“ 系统 ”标题下添加要执行的“ Send a mail to a user ,并配置所需的设置。

Then when a user clicks the "interested" flag a field will be populated and email sent. 然后,当用户单击“感兴趣”标志时,将填充一个字段并发送电子邮件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM