diff --git a/crm_core_pathauto.module b/crm_core_pathauto.module
index 3d3123a..09a3598 100644
--- a/crm_core_pathauto.module
+++ b/crm_core_pathauto.module
@@ -11,39 +11,77 @@
 function crm_core_pathauto_pathauto($op) {
   switch ($op) {
     case 'settings':
-      $settings = array();
-      $settings['module'] = 'crm_core_pathauto';
-      $settings['token_type'] = 'crm_core_contact';
-      $settings['groupheader'] = t('Contact paths');
-      $settings['patterndescr'] = t('Default path pattern (applies to all contact types with blank patterns below)');
-      $settings['patterndefault'] = 'contact/[crm_core_contact:contact_name]';
-
       $languages = array();
       if (module_exists('locale')) {
         $languages = array(LANGUAGE_NONE => t('language neutral')) + locale_language_list('name');
       }
 
+      $settings = array();
+
+      // Contact
+
+      $settings['crm_core_contact'] = (object) array(
+        'module' => 'crm_core_contact',
+        'token_type' => 'crm_core_contact',
+        'groupheader' => t('Contact paths'),
+        'patterndescr' => t('Default path pattern (applies to all contact types with blank patterns below)'),
+        'patterndefault' => 'contact/[crm_core_contact:contact_name]',
+        'patternitems' => array(),
+      );
+
       foreach (crm_core_contact_types() as $contact_type => $contact_name) {
         if (count($languages) && variable_get('language_contact_type_' . $contact_type, 0)) {
-          $settings['patternitems'][$contact_type] = t(
+          $settings['crm_core_contact']->patternitems[$contact_type] = t(
             'Default path pattern for @$contact_type (applies to all @contact_type contact types with blank patterns below)',
             array('@contact_type' => $contact_name->name)
           );
           foreach ($languages as $lang_code => $lang_name) {
-            $settings['patternitems'][$contact_type . '_' . $lang_code] = t('Pattern for all @language @contact_type paths', array(
-                '@contact_type' => $contact_name->name,
-                '@language' => $lang_name
-              ));
+            $settings['crm_core_contact']->patternitems[$contact_type . '_' . $lang_code] = t('Pattern for all @language @contact_type paths', array(
+              '@contact_type' => $contact_name->name,
+              '@language' => $lang_name
+            ));
           }
         }
         else {
-          $settings['patternitems'][$contact_type] = t(
+          $settings['crm_core_contact']->patternitems[$contact_type] = t(
             'Pattern for all @contact_type paths',
             array('@contact_type' => $contact_name->name)
           );
         }
       }
-      return (object) $settings;
+
+      // Activity
+
+      $settings['crm_core_activity'] = (object) array(
+        'module' => 'crm_core_activity',
+        'token_type' => 'crm_core_activity',
+        'groupheader' => t('activity paths'),
+        'patterndescr' => t('Default path pattern (applies to all activity types with blank patterns below)'),
+        'patterndefault' => 'activity/[crm_core_activity:title]',
+        'patternitems' => array(),
+      );
+
+      foreach (crm_core_activity_types() as $activity_type => $activity_name) {
+        if (count($languages) && variable_get('language_activity_type_' . $activity_type, 0)) {
+          $settings['crm_core_activity']->patternitems[$activity_type] = t(
+            'Default path pattern for @$activity_type (applies to all @activity_type activity types with blank patterns below)',
+            array('@activity_type' => $activity_name->name)
+          );
+          foreach ($languages as $lang_code => $lang_name) {
+            $settings['crm_core_activity']->patternitems[$activity_type . '_' . $lang_code] = t('Pattern for all @language @activity_type paths', array(
+              '@activity_type' => $activity_name->name,
+              '@language' => $lang_name
+            ));
+          }
+        }
+        else {
+          $settings['crm_core_activity']->patternitems[$activity_type] = t(
+            'Pattern for all @activity_type paths',
+            array('@activity_type' => $activity_name->name)
+          );
+        }
+      }
+      return $settings;
     default:
       break;
   }
@@ -75,3 +113,30 @@ function crm_core_pathauto_crm_core_contact_delete($entity) {
   $uri = entity_uri('crm_core_contact', $entity);
   pathauto_path_delete_all($uri['path']);
 }
+
+/**
+ * Implements hook_crm_core_activity_insert().
+ */
+function crm_core_pathauto_crm_core_activity_insert($entity) {
+  module_load_include('inc', 'pathauto');
+  $uri = entity_uri('crm_core_activity', $entity);
+  pathauto_create_alias('crm_core_pathauto', 'insert', $uri['path'], array('crm_core_activity' => $entity), $entity->type);
+}
+
+/**
+ * Implements hook_crm_core_activity_update().
+ */
+function crm_core_pathauto_crm_core_activity_update($entity) {
+  module_load_include('inc', 'pathauto');
+  $uri = entity_uri('crm_core_activity', $entity);
+  pathauto_create_alias('crm_core_pathauto', 'update', $uri['path'], array('crm_core_activity' => $entity), $entity->type);
+}
+
+/**
+ * Implements hook_crm_core_activity_delete().
+ */
+function crm_core_pathauto_crm_core_activity_delete($entity) {
+  module_load_include('inc', 'pathauto');
+  $uri = entity_uri('crm_core_activity', $entity);
+  pathauto_path_delete_all($uri['path']);
+}
