Add new comment to Rules událost Taxonomy term is viewed
Moje kniha o CMS Drupal
Poslední komentáře
- 4 days 7 hours ago
- 6 days 3 hours ago
- 6 months ago
- 6 months ago
- 8 months 1 week ago
- 9 months ago
- 9 months ago
- 9 months 1 week ago
- 1 year ago
- 1 year 1 month ago
Nové diskuze
- (4 weeks 1 day zpět)
- (1 month zpět)
- (7 months 3 weeks zpět)
- (9 months 1 week zpět)
- (1 year 6 months zpět)
- (1 year 7 months zpět)
- (1 year 10 months zpět)
- (1 year 11 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);
}