Index: autoassignrole-path.inc
===================================================================
--- autoassignrole-path.inc	(revision 279)
+++ autoassignrole-path.inc	(working copy)
@@ -20,3 +20,14 @@
   $output = user_page();
   return $output;
 }
+
+function autoassignrole_register_portal()
+{
+  // Get any available auto assign roles that have been defined to display in a 'registration portal' page
+  $result = db_query("SELECT path, title, rid, display FROM {autoassignrole_page}");
+  $options = array();
+  while($r = db_fetch_object($result)) {
+    $options[] = array('name' => $r->title, 'link' => $r->path);
+  }
+  return theme('autoassignrole_registration_portal', $options);
+}
\ No newline at end of file
Index: autoassignrole.module
===================================================================
--- autoassignrole.module	(revision 279)
+++ autoassignrole.module	(working copy)
@@ -17,16 +17,24 @@
  */
 function autoassignrole_menu() {
   $items = array();
-    $items['admin/user/autoassignrole'] = array(
-      'title' => t('Auto assign role'),
-      'description' => t('Designate a role to assign all new users to.'),
-      'page callback' => 'drupal_get_form',
-      'page arguments' => array('autoassignrole_admin_form'),
-      'access arguments' => array('administer autoassignrole'),
-      'type' => MENU_NORMAL_ITEM,
-      'file' => 'autoassignrole-admin.inc',
-    );
+  $items['admin/user/autoassignrole'] = array(
+    'title' => t('Auto assign role'),
+    'description' => t('Designate a role to assign all new users to.'),
+    'page callback' => 'drupal_get_form',
+    'page arguments' => array('autoassignrole_admin_form'),
+    'access arguments' => array('administer autoassignrole'),
+    'type' => MENU_NORMAL_ITEM,
+    'file' => 'autoassignrole-admin.inc',
+  );
 
+  $items['user/register/role'] = array(
+    'page callback' => 'autoassignrole_register_portal',
+    'title' => t('Register'),
+    'type' => MENU_CALLBACK,
+    'access callback' => 'user_register_access',
+    'file' => 'autoassignrole-path.inc',
+  );
+
   // path based role assignments that are listed as a menu item
   $result = db_query("SELECT rid, path, display, title, weight FROM {autoassignrole_page}");
   while ($r = db_fetch_object($result)) {
@@ -140,6 +148,19 @@
  */
 function autoassignrole_user($op, &$edit, &$account, $category = NULL) {
   switch ($op) {
+    case 'view':
+      if(module_exists('content_profile')) {
+        $profile_types = content_profile_get_types('names', 'registration_use');
+        if(is_array($profile_types)) {
+          foreach($profile_types as $type => $typename) {
+            $enabled = variable_get('autoassignrole_content_profile_'. $type, 0);
+            if(!isset($account->roles[$enabled])) {
+              unset($account->content['content_profile']['content_profile_' . $type]);
+            }
+          }
+        }
+      }
+    break;
     case 'insert':
       $path = drupal_get_path_alias($_GET['q']);
       $page = db_fetch_object(db_query("SELECT rid FROM {autoassignrole_page} WHERE path = '%s'", $path));
@@ -374,7 +395,7 @@
 }
 
 function autoassignrole_form_alter(&$form, $form_state, $form_id) {
-    if ($form_id == 'node_type_form' && module_exists('content_profile')) {
+  if ($form_id == 'node_type_form' && module_exists('content_profile')) {
     $result = db_query("SELECT ar.path, ar.rid, r.name FROM {autoassignrole_page} ar INNER JOIN {role} r ON ar.rid = r.rid");
     $options = array();
     $options[0] = "All Registration forms";
@@ -391,16 +412,23 @@
     );
     $form['#submit'][] = 'autoassignrole_node_type_form_submit';
   }
-  if ($form_id == 'user_register' && module_exists('content')  && module_exists('content_profile')) {
-    $profile_types = content_profile_get_types('names', 'registration_use');
+  if ($form_id == 'user_register') {
     $path = drupal_get_path_alias($_GET['q']);
-    if($path != '/user/register') {
+    if ($path == 'user/register' && _autoassignrole_settings('registration_portal') == 1)
+    {
+      drupal_goto('user/register/role', drupal_get_destination());
+    }
+    else if(module_exists('content')  && module_exists('content_profile')) {
+      $profile_types = content_profile_get_types('names', 'registration_use');
       $page = db_fetch_object(db_query("SELECT rid FROM {autoassignrole_page} WHERE path = '%s'", $path));
       if(isset($page->rid)) {
         foreach ($profile_types as $type => $typename) {
           $enabled = variable_get('autoassignrole_content_profile_'. $type, 0);
           if($enabled != $page->rid) {
             $node = array('uid' => 0, 'name' => '', 'type' => $type);
+            if(!function_exists('node_form')) {
+              module_load_include('inc', 'node', 'node.pages');
+            }
             $node_form = drupal_retrieve_form($type .'_node_form', $form_state, $node);
             drupal_prepare_form($type .'_node_form', $node_form, $form_state);
             foreach($node_form['#field_info'] as $field_name => $info) {
@@ -418,3 +446,11 @@
   return;
 }
 
+function autoassignrole_theme() {
+  return array(
+    'autoassignrole_registration_portal' => array(
+      'template' => 'autoassignrole-registration-portal',
+      'arguments' => array('registration_roles' => NULL),
+    ),
+  );
+}
\ No newline at end of file
Index: autoassignrole.install
===================================================================
--- autoassignrole.install	(revision 279)
+++ autoassignrole.install	(working copy)
@@ -51,6 +51,14 @@
   db_query("INSERT into {autoassignrole} (arid,value) VALUES ('%s', '%s')",
     'page_active', 0
   );
+  db_query("INSERT into {autoassignrole} (arid,value) VALUES ('%s', '%s')",
+    'registration_portal', 0
+  );
+
+  // Drop module weight so we act after content.
+  // taken fron community_tags.install
+  $weight = (int)db_result(db_query("SELECT weight FROM {system} WHERE name = 'content'"));
+  db_query("UPDATE {system} SET weight = %d WHERE name = 'autoassignrole'", $weight + 1);
 }
 
 /**
Index: autoassignrole-registration-portal.tpl.php
===================================================================
--- autoassignrole-registration-portal.tpl.php	(revision 0)
+++ autoassignrole-registration-portal.tpl.php	(revision 0)
@@ -0,0 +1,19 @@
+<?php
+// $Id$
+
+/**
+ * @file autoassignrole-registration-portal.tpl.php
+ * Default theme implementation to replace the basic registration page with a
+ * 'portal' like page linking to available roles. 
+ *
+ * Available variables:
+ * - $registration_roles An array containing lists with two indexes: 
+ *     'name': Human friendly name of the role
+ *     'link': Relative path to registration with that role.
+ */
+ ?>
+ 
+<p>You may choose from the following available registration options:</p>
+<?php foreach ($registration_roles as $role): ?>
+  <div style="margin-top: 10px;"><?php print l($role['name'], $role['link']); ?></div>
+<?php endforeach; ?>
\ No newline at end of file
Index: autoassignrole-admin.inc
===================================================================
--- autoassignrole-admin.inc	(revision 279)
+++ autoassignrole-admin.inc	(working copy)
@@ -65,6 +65,19 @@
     '#collapsible' => TRUE,
     '#collapsed' => TRUE,
   );
+
+  // Option to modify the registration page to become a listing of links to role options 
+  $form['autoassignrole_settings_page']['registration_portal'] = array(
+    '#type' => 'radios',
+    '#title' => t('Registration Page As Portal'),
+    '#default_value' => _autoassignrole_settings('registration_portal'),
+    '#description' => t('This option will replace the default registration page
+      with a page listing the roles available for registration (linking to the paths specified
+      below). You can theme this page by overriding the autoassignrole-registration-portal.tpl
+      template'),
+    '#options' => array(1 => t('Enabled'), 0 => t('Disabled')),
+  );
+
   $result = db_query("SELECT rid, display, path, title, description, format, weight FROM {autoassignrole_page}");
   $defaults = array();
   while ($setting = db_fetch_object($result)) {
@@ -325,8 +338,9 @@
     $form_values['values']['user_description'], 'user_description');
   db_query("UPDATE {autoassignrole} set value = '%s' where arid = '%s'",
     $form_values['values']['user_selection'], 'user_selection');
+  db_query("UPDATE {autoassignrole} set value = '%s' where arid = '%s'",
+    $form_values['values']['registration_portal'], 'registration_portal');
 
-
   // Role assignment based on path
   db_query("truncate {autoassignrole_page}");
   $roles = user_roles(TRUE);
