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