You are here

function forum_pathauto in Pathauto 5

Same name and namespace in other branches
  1. 5.2 pathauto_taxonomy.inc \forum_pathauto()
  2. 6.2 pathauto.module \forum_pathauto()
  3. 6 pathauto_taxonomy.inc \forum_pathauto()
  4. 7 pathauto.module \forum_pathauto()

Implementation of hook_pathauto() for forum topics.

File

./pathauto_taxonomy.inc, line 147

Code

function forum_pathauto($op) {
  switch ($op) {
    case 'settings':
      $settings = array();
      $settings['module'] = 'forum';
      $settings['groupheader'] = t('Forum path settings');
      $settings['patterndescr'] = t('Pattern for forums and forum containers');
      $settings['patterndefault'] = t('[vocab]/[catpath]');
      $settings['placeholders'] = array(
        t('[vocab]') => t("The vocabulary that the page's first category belongs to."),
        t('[cat]') => t('The name of the category.'),
        t('[catpath]') => t('As [cat], but including its supercategories.'),
        t('[tid]') => t('The id number of the category.'),
      );
      $settings['supportsfeeds'] = '0/feed';
      $settings['bulkname'] = t('Bulk update forum paths');
      $settings['bulkdescr'] = t('Generate aliases for all existing forums and forum containers which do not already have aliases.');
      return (object) $settings;
    default:
      break;
  }
}