Add new comment to Rules událost Taxonomy term is viewed
Moje kniha o CMS Drupal
Poslední komentáře
- 1 hour ago
- 4 months 2 weeks ago
- 4 months 2 weeks ago
- 6 months 3 weeks ago
- 7 months 3 weeks ago
- 7 months 3 weeks ago
- 7 months 3 weeks ago
- 10 months 4 weeks ago
- 11 months 2 weeks ago
- 11 months 2 weeks ago
Nové diskuze
- (6 months 1 week zpět)
- (7 months 3 weeks zpět)
- (1 year 5 months zpět)
- (1 year 5 months zpět)
- (1 year 9 months zpět)
- (1 year 9 months zpět)
- (1 year 10 months zpět)
- (2 years 2 months zpět)

Dobrý den,
moc děkuji!!! Ten druhý tip na modul je přesně to elegantní malé řešení, které hledám. Ale, v Rules se vše vytvoří, ale následující kód nevytvoří žádnou událost. Nevidíte v kódu dole chybu? Událost "taxonomy_term_view" jsem ověřoval a skutečně existuje.
PS: namísto modulename používám svůj modul rules_taxonomy_term.
/**
* Implements hook_rules_event_info().
*/
function modulename_rules_event_info() {
$defaults_term = array(
'group' => t('modulename'),
'access callback' => 'rules_taxonomy_term_integration_access',
'module' => 'taxonomy',
'class' => 'RulesTaxonomyEventHandler',
);
return array(
'taxonomy_term_view' => $defaults_term + array(
'label' => t('After viewing a term'),
'variables' => array(
'term' => array('type' => 'taxonomy_term', 'label' => t('Viewed term')),
),
),
);
}
/**
* Implements hook_taxonomy_term_view().
*/
function modulename_taxonomy_term_view($term, $view_mode, $langcode) {
rules_invoke_event('taxonomy_term_view', $term);
}