I am trying to learn Rules and adding a custom condition. I need help to figure out what I am doing wrong.
My Condiiton set up:
function rules_example_capacity_condition_info() {
$conditions = array(
'rules_example_action_count_capacity' => array(
'label' => t('Print capacity count on page'),
'group' => t('Rules examples'),
'parameters' => array(
'count' => array('type' => 'value', 'label' => t('registration event count')),
'capacity' => array('type' => 'value', 'label' => t('registration event capacity')),
),
),
);
return $conditions;
}
and the function that calls it...
function rules_example_action_count_capacity($count, $capacity) {
$reg_count = reg_count_load($count);
return($reg_count->capacity == $capacity) ? true : false;
}
I am trying to determine the count (how many people have registered so far) and the capacity. When the count and capacity are the same send an email.
I am not a developer so this is a little bit of a struggle. I found this series (http://nodeone.se/node/28) which is helpful, however there are so many smaller things I might be missing. Please help if you can. I am hoping that this will help more then just myself.
Thanks Tim