function forum_pathauto in Pathauto 6
Same name and namespace in other branches
- 5.2 pathauto_taxonomy.inc \forum_pathauto()
- 5 pathauto_taxonomy.inc \forum_pathauto()
- 6.2 pathauto.module \forum_pathauto()
- 7 pathauto.module \forum_pathauto()
Implementation of hook_pathauto() for forum module.
File
- ./
pathauto_taxonomy.inc, line 125 - Hook implementations for taxonomy module integration.
Code
function forum_pathauto($op) {
switch ($op) {
case 'settings':
$settings = array();
$settings['module'] = 'forum';
$settings['token_type'] = 'taxonomy';
$settings['groupheader'] = t('Forum paths');
$settings['patterndescr'] = t('Pattern for forums and forum containers');
$settings['patterndefault'] = '[vocab-raw]/[catpath-raw]';
$patterns = token_get_list('taxonomy');
foreach ($patterns as $type => $pattern_set) {
if ($type != 'global') {
foreach ($pattern_set as $pattern => $description) {
$settings['placeholders']['[' . $pattern . ']'] = $description;
}
}
}
$settings['supportsfeeds'] = '0/feed';
$settings['bulkname'] = t('Bulk generate aliases for forum paths that are not aliased');
$settings['bulkdescr'] = t('Generate aliases for all existing forums and forum containers which do not already have aliases.');
return (object) $settings;
default:
break;
}
}