drupal、规则、标志、日期
我正在使用 drupal 6。我有一个名为 [classroom] 的节点。我想要一个与每个教室相关的[空缺登记册]。
空缺寄存器是一个 cck 类型,具有:
-uid
- 尼德
- 加入日期
我希望每个用户[注册]以获得空缺职位。我想我可以为此使用标志。
当用户加入时,我可以使用规则来操作要发送给用户的电子邮件和 [classroom]->cck_email 字段。
我希望规则计划也每 30 天运行一次(可配置),以提醒用户确认他们的[注册]。
1a。如果未确认注册,则 14 天后,该用户将从课堂中[取消注册]。
1b。如果用户确认注册(通过单击按钮或网址)。然后规则 1 再次运行。
我想确认一下我的做法是否正确。
更新:
我一直在尝试注册,但我发现它的规则时间表方面很难根据我的喜好进行定制。
我正在尝试为signup_signup 和signup_cancel 编写一个规则事件,然后通过规则计划对其进行操作。但我必须查看一些现有的注册代码。
必须做太多的自定义工作才能注册,所以我想,使用规则和标志来完成会更容易。缺点是还必须为其创建 UI。
对于注册模块,
我有以下规则事件。
请问这个可以审核吗?
<http://drupal.org/node/298549>
function signup_rules_event_info() {
return array(
'signup_signup' => array(
'label' => t('User signups to classroom'),
'module' => 'Signup',
'arguments' => array(
'userA' => array('type' => 'user', 'label' => t('UserA, which adds userB.')),
'userB' => array('type' => 'user', 'label' => t('UserB, which is added to UserA\'s list.')),
),
),
);
}
我不知道如何处理参数列表。
I am using drupal 6. I have a node called [classroom]. I would like to have a [vacancy register] associated with each classroom.
vacancy register is a cck type with:
- uid
- nid
- join date
I would like for each user to [register] for a vacancy. I think I can use flag for this.
When a user joins, I can use rules to action an email to be sent to the user and the [classroom]->cck_email field.
I would like a rule schedule to also run every 30 days ( configurable ) to alert the user to confirm their [registration].
1a. If no registration is confirmed, then 14 days later, the user is [unregistered] from the classroom.
1b. If user confirms registration ( by clicking on a button or url ). then the rule 1 runs again.
I would like to confirms if my approach to this is correct.
Update:
I have been playing around with signup, but there are the rules schedule aspect of it that I find hard customising to my liking.
I'm trying to write a rules event for signup_signup and signup_cancel, then action it through rules schedule. But there a bit of existing signup code I have to look through.
Have to do too much custom work to signup, so I thought, its easier to just do it with rules and flags. The downside is having to also create the UI for it.
For the signup module,
I have the following rules event.
Could this be reviewed please?
<http://drupal.org/node/298549>
function signup_rules_event_info() {
return array(
'signup_signup' => array(
'label' => t('User signups to classroom'),
'module' => 'Signup',
'arguments' => array(
'userA' => array('type' => 'user', 'label' => t('UserA, which adds userB.')),
'userB' => array('type' => 'user', 'label' => t('UserB, which is added to UserA\'s list.')),
),
),
);
}
I don't know what to do with the arguments list.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我有一段时间没有查看 signup 模块了,但我认为这可能是一个更好的模块对于你的情况。标志模块也是一个不错的选择,但注册模块更适合您正在做的事情。用户注册教室等内容。
I haven't looked at the signup module for some time, but I think that might be a better module for your case. The flag module is a good choice too, but the signup module is more geared towards what you are doing. Users signing up for content like a classroom.