diff -uprN -x CVS facebook_status-DRUPAL-6--3/facebook_status.module facebook_status/facebook_status.module
--- facebook_status-DRUPAL-6--3/facebook_status.module	2011-01-27 00:51:01.000000000 +0000
+++ facebook_status/facebook_status.module	2011-01-27 22:51:58.000000000 +0000
@@ -27,9 +27,9 @@
  */
 define("FACEBOOK_STATUS_OVERRIDE_TIMER", 10);
 
-//=============
-//DRUPAL HOOKS.
-//=============
+//==============
+// DRUPAL HOOKS.
+//==============
 
 /**
  * Implementation of hook_help().
@@ -230,12 +230,12 @@ function facebook_status_perm() {
  */
 function facebook_status_user($op, &$edit, &$account, $category = NULL) {
   if ($op == 'delete') {
-    //Remove abandoned statuses from the database on user account deletion.
+    // Remove abandoned statuses from the database on user account deletion.
     db_query("DELETE FROM {facebook_status} WHERE sender = %d OR (recipient = %d AND type = 'user')", $account->uid, $account->uid);
   }
   elseif ($op == 'view' && variable_get('facebook_status_profile', 1)) {
     $value = theme('facebook_status_form_display', $account, 'user');
-    //Don't show this section if there's nothing there or the user doesn't have permission to see it.
+    // Don't show this section if there's nothing there or the user doesn't have permission to see it.
     if (empty($value)) {
       return;
     }
@@ -261,7 +261,7 @@ function facebook_status_user($op, &$edi
  * Implementation of hook_init().
  */
 function facebook_status_init() {
-  //Don't clear the default text on first focus if the default text was manually set in the URL.
+  // Don't clear the default text on first focus if the default text was manually set in the URL.
   $undefault = isset($_GET['status-text']);
   if (isset($_GET['sid']) && is_numeric($_GET['sid'])) {
     $rs = facebook_status_load($_GET['sid']);
@@ -305,23 +305,23 @@ function facebook_status_link($type, $st
       'attributes' => array('class' => 'facebook_status-delete-link facebook_status-action-link'),
     );
   }
-  //If not self update by current user (because if it is a self update by the current user, there is no need for a response)
+  // If not self update by current user (because if it is a self update by the current user, there is no need for a response)
   if ($status->type != 'user' || $status->recipient != $status->sender || $status->sender != $user->uid) {
-    //If permission to respond
+    // If permission to respond
     if (facebook_status_user_access('add', facebook_status_user_load($status->sender), 'user', $user)) {
-      //If to current user (not a self update)
+      // If to current user (not a self update)
       if ($status->type == 'user' && $status->recipient == $user->uid) {
         $title = t('reply');
       }
-      //If self update (not by current user)
+      // If self update (not by current user)
       elseif ($status->type == 'user' && $status->recipient == $status->sender) {
         $title = t('respond');
       }
-      //If from one user to another and the current user is not the recipient
+      // If from one user to another and the current user is not the recipient
       elseif ($status->type == 'user') {
         $title = t('view conversation');
       }
-      //If not to a user
+      // If not to a user
       else {
         $title = t('discuss');
       }
@@ -353,7 +353,7 @@ function facebook_status_theme($existing
         'status' => NULL,
         'options' => array(),
       ),
-      'template' => 'facebook-status-item',
+      'template' => 'templates/facebook-status-item',
       'file' => 'includes/facebook_status.preprocess.inc',
     ),
     'facebook_status_form_display' => array(
@@ -377,9 +377,9 @@ function facebook_status_theme($existing
   );
 }
 
-//================
-//THEME FUNCTIONS.
-//================
+//=================
+// THEME FUNCTIONS.
+//=================
 
 /**
  * Display a status message.
@@ -424,9 +424,9 @@ function theme_facebook_status_time($tim
   }
 }
 
-//==================================
-//APPLICATION PROGRAMMING INTERFACE.
-//==================================
+//===================================
+// APPLICATION PROGRAMMING INTERFACE.
+//===================================
 
 /**
  * Checks that users have permission to perform various status-related tasks.
@@ -558,12 +558,12 @@ function facebook_status_determine_conte
   $contexts = facebook_status_all_contexts();
   if (empty($type)) {
     $context = array();
-    //The user context is our base case, so we never end up with no context.
+    // The user context is our base case, so we never end up with no context.
     foreach ($contexts as $context) {
       if (!empty($context['file']) && file_exists($context['file'])) {
         require_once $context['file'];
       }
-      //Make sure the parent class is always loaded.
+      // Make sure the parent class is always loaded.
       if (empty($context['parent'])) {
         module_load_include('inc', 'facebook_status', '/includes/utility/facebook_status.contexts');
       }
@@ -581,7 +581,7 @@ function facebook_status_determine_conte
     if (!empty($context['file']) && file_exists($context['file'])) {
       require_once $context['file'];
     }
-    //Make sure the parent class is always loaded.
+    // Make sure the parent class is always loaded.
     if (empty($context['parent'])) {
       module_load_include('inc', 'facebook_status', '/includes/utility/facebook_status.contexts');
     }
@@ -591,10 +591,10 @@ function facebook_status_determine_conte
     $context['handler'] = new $context['handler']();
   }
   else {
-    //We can't find the requested context, so abort.
+    // We can't find the requested context, so abort.
     return;
   }
-  //title and handler are required.
+  // title and handler are required.
   $context += array(
     'description' => '',
     'view' => '',
@@ -684,17 +684,17 @@ function facebook_status_save_status($re
   $recipient_id = $context['handler']->recipient_id($recipient);
   $time = time();
   $message = trim($message);
-  //Merge in defaults.
+  // Merge in defaults.
   $options += array(
     'discard duplicates' => TRUE,
     'timed override' => TRUE,
     'discard blank statuses' => TRUE,
   );
-  //Calls hook_facebook_status_save_options_alter(&$options).
+  // Calls hook_facebook_status_save_options_alter(&$options).
   drupal_alter('facebook_status_save_options', $options);
-  //Pretend to have set a new status if the submitted status is exactly the same as the old one.
+  // Pretend to have set a new status if the submitted status is exactly the same as the old one.
   $status = _facebook_status_get_status_fast($sender->uid);
-  //The status object to be saved.
+  // The status object to be saved.
   $object = (object) array(
     'message' => $message,
     'created' => $time,
@@ -704,9 +704,9 @@ function facebook_status_save_status($re
   );
   if ($message != $status->message || $type != $status->type || $recipient_id != $status->recipient || !$options['discard duplicates']) {
     $edit = FALSE;
-    //If a new status is submitted on one's own profile within
-    //FACEBOOK_STATUS_OVERRIDE_TIMER seconds of the old one, we assume the user
-    //didn't mean to post the first one.
+    // If a new status is submitted on one's own profile within
+    // FACEBOOK_STATUS_OVERRIDE_TIMER seconds of the old one, we assume the user
+    // didn't mean to post the first one.
     if ($time - $status->created < FACEBOOK_STATUS_OVERRIDE_TIMER && $type = 'user' && $sender->uid == $recipient_id && $options['timed override']) {
       $sql = "UPDATE {facebook_status} SET status = '%s', status_time = %d WHERE sid = %d ORDER BY sid DESC";
       db_query($sql, $message, $time, $status->sid);
@@ -714,15 +714,15 @@ function facebook_status_save_status($re
       $edit = TRUE;
     }
     else {
-      //Don't save blank messages unless to clear the user's own last status update.
-      //The only reason clearing the last status update would even be needed would be if the most recent status update was displayed by itself somewhere.
+      // Don't save blank messages unless to clear the user's own last status update.
+      // The only reason clearing the last status update would even be needed would be if the most recent status update was displayed by itself somewhere.
       if ($type != 'user' || $sender->uid != $recipient_id || !empty($message) || !$options['discard blank statuses']) {
         drupal_write_record('facebook_status', $object);
       }
     }
-    //Invokes hook_facebook_status_save($status, $context, $edit).
+    // Invokes hook_facebook_status_save($status, $context, $edit).
     module_invoke_all('facebook_status_save', $object, $context, $edit);
-    //Trigger integration. Don't call if the status is blank because usually nothing interesting is happening.
+    // Trigger integration. Don't call if the status is blank because usually nothing interesting is happening.
     if (module_exists('trigger') && !empty($message)) {
       $op = 'fbss_submitted_'. $type;
       if ($type == 'user') {
@@ -737,9 +737,9 @@ function facebook_status_save_status($re
   return $object;
 }
 
-//=================
-//HELPER FUNCTIONS.
-//=================
+//==================
+// HELPER FUNCTIONS.
+//==================
 
 /**
  * A saner sort function for use in uasort().
@@ -812,9 +812,9 @@ function _facebook_status_user_load_by_n
   return $accounts[$name];
 }
 
-//========================
-//STREAM TYPE DEFINITIONS.
-//========================
+//=========================
+// STREAM TYPE DEFINITIONS.
+//=========================
 
 /**
  * Implementation of hook_facebook_status_context_info().
@@ -852,9 +852,9 @@ function facebook_status_facebook_status
   );
 }
 
-//====================
-//TRIGGER INTEGRATION.
-//====================
+//=====================
+// TRIGGER INTEGRATION.
+//=====================
 
 /**
  * Implementation of hook_hook_info().
@@ -918,7 +918,7 @@ function facebook_status_facebook_status
   $recipient = $context['handler']->load_recipient($status->recipient);
   $sender = _facebook_status_user_load($status->sender);
 
-  //Reduce the amount of recalculation we will need to do later.
+  // Reduce the amount of recalculation we will need to do later.
   $sender->facebook_status = $status;
   $sender->context = $context;
 
@@ -934,9 +934,9 @@ function facebook_status_facebook_status
   actions_do(array_keys($aids), $sender, $activity_context);
 }
 
-//==================
-//TOKEN INTEGRATION.
-//==================
+//===================
+// TOKEN INTEGRATION.
+//===================
 
 /**
  * Implementation of hook_token_list().
@@ -978,7 +978,7 @@ function facebook_status_token_values($t
   if ($type != 'facebook_status' || empty($data)) {
     return;
   }
-  //@todo: Figure out whether this actually works.
+  // @todo: Figure out whether this actually works.
   $status = $data->facebook_status;
   $context = $data->context;
 
@@ -1021,9 +1021,9 @@ function facebook_status_token_values($t
   return $values;
 }
 
-//==================
-//VIEWS INTEGRATION.
-//==================
+//===================
+// VIEWS INTEGRATION.
+//===================
 
 /**
  * Implementation of hook_views_api().
@@ -1044,9 +1044,9 @@ function facebook_status_display_user_pi
   return theme('user_picture', $account);
 }
 
-//==========================
-//SMS FRAMEWORK INTEGRATION.
-//==========================
+//===========================
+// SMS FRAMEWORK INTEGRATION.
+//===========================
 
 /**
  * Implementation of hook_sms_incoming().
@@ -1063,9 +1063,9 @@ function facebook_status_sms_incoming($o
   }
 }
 
-//==================================
-//VIEWS BULK OPERATIONS INTEGRATION.
-//==================================
+//===================================
+// VIEWS BULK OPERATIONS INTEGRATION.
+//===================================
 
 /**
  * Implementation of hook_views_bulk_operations_object_info().
@@ -1081,9 +1081,9 @@ function facebook_status_views_bulk_oper
   );
 }
 
-//===================
-//CTOOLS INTEGRATION.
-//===================
+//====================
+// CTOOLS INTEGRATION.
+//====================
 
 /**
  * Implementation of hook_ctools_plugin_directory().
diff -uprN -x CVS facebook_status-DRUPAL-6--3/includes/views/facebook_status.views_default.inc facebook_status/includes/views/facebook_status.views_default.inc
--- facebook_status-DRUPAL-6--3/includes/views/facebook_status.views_default.inc	2011-01-22 09:45:41.000000000 +0000
+++ facebook_status/includes/views/facebook_status.views_default.inc	2011-01-27 22:52:41.000000000 +0000
@@ -16,7 +16,7 @@ function facebook_status_views_default_v
   $view = new view;
   $view->name = 'facebook_status_all';
   $view->description = 'Displays all status updates.';
-  $view->tag = 'Facebook-style Statuses';
+  $view->tag = 'facebook_status';
   $view->view_php = '';
   $view->base_table = 'facebook_status';
   $view->is_cacheable = FALSE;
@@ -360,7 +360,7 @@ function facebook_status_views_default_v
   $view = new view;
   $view->name = 'facebook_status_conversation';
   $view->description = 'Displays the conversation in status messages between two users.';
-  $view->tag = 'Facebook-style Statuses';
+  $view->tag = 'facebook_status';
   $view->view_php = '';
   $view->base_table = 'facebook_status';
   $view->is_cacheable = FALSE;
@@ -552,7 +552,7 @@ function facebook_status_views_default_v
       'alter' => array(
         'text' => '<div>[picture] [name] [message]</div>
 
-<div>[created] [edit] [delete]</div>',
+<div>[created] [edit] [delete] [respond] [repost]</div>',
         'make_link' => 0,
         'path' => '',
         'link_class' => '',
@@ -709,7 +709,7 @@ function facebook_status_views_default_v
   $view = new view;
   $view->name = 'facebook_status_stream';
   $view->description = 'Displays status updates that match the current recipient context.';
-  $view->tag = 'Facebook-style Statuses';
+  $view->tag = 'facebook_status';
   $view->view_php = '';
   $view->base_table = 'facebook_status';
   $view->is_cacheable = FALSE;
diff -uprN -x CVS facebook_status-DRUPAL-6--3/submodules/facebook_status_comments/facebook_status_comments.css facebook_status/submodules/facebook_status_comments/facebook_status_comments.css
--- facebook_status-DRUPAL-6--3/submodules/facebook_status_comments/facebook_status_comments.css	1970-01-01 01:00:00.000000000 +0100
+++ facebook_status/submodules/facebook_status_comments/facebook_status_comments.css	2011-01-27 22:06:12.000000000 +0000
@@ -0,0 +1,79 @@
+.facebook-status-comments {
+  border: 1px solid #E0E0E0;
+  margin: 1em 1.5em;
+  padding: 0.75em;
+}
+
+.facebook-status-comments-comment {
+  border-bottom: 1px solid #E0E0E0;
+  margin: 0.5em 0;
+  padding: 0.5em 0.25em 0.75em;
+}
+
+.facebook-status-comments .first {
+  margin: 0 0 0.5em;
+  padding: 0.25em 0.25em 0.75em;
+}
+
+.facebook-status-comments .last {
+  border-bottom: none;
+  padding: 0;
+}
+
+.facebook-status-comments-author {
+  display: inline;
+  padding-right: 0.5em;
+}
+
+.facebook-status-comments-text {
+  display: inline;
+  padding: 0.5em 0 0;
+}
+
+.facebook-status-comments-closure {
+  font-size: 90%;
+  margin-top: 0.25em;
+}
+
+.facebook-status-comments-closure span {
+  padding-right: 1em;
+}
+
+.facebook-status-comments-created {
+  font-style: italic;
+}
+
+.facebook-status-comments-form .resizable-textarea {
+  margin: 1.5em 1.5em 1em;
+}
+
+.facebook-status-comments-form .form-submit {
+  margin: 0 1.5em;
+}
+
+.facebook-status-comments-hide {
+  display: none;
+}
+
+/* The "Comment" link. */
+.facebook-status-comments-show-comment-form {
+  display: inline;
+  font-size: 90%;
+  margin-left: 0.5em;
+}
+.facebook-status-comments-show-comment-form-inner {
+  display: inline;
+  font-size: 90%;
+  margin-left: 2.25em;
+}
+
+/* The "Show all comments" link. */
+.facebook-status-comments-show-comments-link {
+  border-bottom: 1px solid #E0E0E0;
+  display: block;
+  font-size: 90%;
+  padding-bottom: 0.5em;
+}
+
+/* The "Show all comments" link when it expands instead of redirecting. */
+.facebook-status-comments-show-comments {}
diff -uprN -x CVS facebook_status-DRUPAL-6--3/submodules/facebook_status_comments/facebook_status_comments.edit.inc facebook_status/submodules/facebook_status_comments/facebook_status_comments.edit.inc
--- facebook_status-DRUPAL-6--3/submodules/facebook_status_comments/facebook_status_comments.edit.inc	1970-01-01 01:00:00.000000000 +0100
+++ facebook_status/submodules/facebook_status_comments/facebook_status_comments.edit.inc	2011-01-27 22:07:16.000000000 +0000
@@ -0,0 +1,98 @@
+<?php
+// $Id$
+
+/**
+ * @file
+ *   Edit and delete forms for the Facebook-style Statuses Comments module.
+ */
+
+/**
+ * The edit form for status comments.
+ *
+ * @param $comment
+ *   The comment object for the status comment being edited.
+ */
+function facebook_status_comments_edit($form_state, $comment) {
+  $form = array();
+  $form['status-comment-edit'] = array(
+    '#type' => 'textarea',
+    '#rows' => 3,
+    '#required' => TRUE,
+    '#default_value' => $comment->comment,
+  );
+  $form['save'] = array(
+    '#type' => 'submit',
+    '#value' => t('Update'),
+  );
+  $form['#cid'] = $comment->cid;
+  return $form;
+}
+
+/**
+ * The submit handler for the edit form for status comments.
+ */
+function facebook_status_comments_edit_submit($form, &$form_state) {
+  db_query("UPDATE {facebook_status_comments} SET comment = '%s' WHERE cid = %d", $form_state['values']['status-comment-edit'], $form['#cid']);
+  $c = facebook_status_comments_load($form['#cid']);
+  module_invoke_all('fbss_after_save', $c, TRUE);
+  if ($_GET['destination'] && $_GET['destinaton'] != 'facebook_status_comments/js') {
+    $form_state['redirect'] = $_GET['destination'];
+  }
+  else {
+    $form_state['redirect'] = '<front>';
+  }
+  drupal_set_message(t('Status comment has been successfully edited.'));
+}
+
+/**
+ * The delete form for status comments.
+ *
+ * @param $comment
+ *   The comment object for the status comment being deleted.
+ */
+function facebook_status_comments_delete($form_state, $comment) {
+  $form = array();
+  $form['infotext'] = array(
+    '#value' => '<p>'. t('Are you sure you want to permanently delete the status comment %comment?',
+      array('%comment' => $comment->comment)) .'</p>'
+  );
+  $form['confirm'] = array(
+    '#type' => 'submit',
+    '#value' => t('Confirm'),
+    '#submit' => array('facebook_status_comments_delete_confirm'),
+  );
+  $form['back'] = array(
+    '#type' => 'submit',
+    '#value' => t('Cancel'),
+    '#submit' => array('facebook_status_comments_delete_cancel'),
+  );
+  $form['#cid'] = $comment->cid;
+  return $form;
+}
+
+/**
+ * The confirmation submit handler for the delete form for status comments.
+ */
+function facebook_status_comments_delete_confirm($form, &$form_state) {
+  facebook_status_comments_delete_comment($form['#cid']);
+  drupal_set_message(t('Status comment deleted.'));
+  if ($_GET['destination'] && $_GET['destinaton'] != 'facebook_status_comments/js') {
+    $form_state['redirect'] = $_GET['destination'];
+  }
+  else {
+    $form_state['redirect'] = '<front>';
+  }
+}
+
+/**
+ * The cancellation submit handler for the delete form for status comments.
+ */
+function facebook_status_comments_delete_cancel($form, &$form_state) {
+  drupal_set_message(t('Status comment was not deleted.'));
+  if ($_GET['destination'] && $_GET['destinaton'] != 'facebook_status_comments/js') {
+    $form_state['redirect'] = $_GET['destination'];
+  }
+  else {
+    $form_state['redirect'] = '<front>';
+  }
+}
diff -uprN -x CVS facebook_status-DRUPAL-6--3/submodules/facebook_status_comments/facebook_status_comments.info facebook_status/submodules/facebook_status_comments/facebook_status_comments.info
--- facebook_status-DRUPAL-6--3/submodules/facebook_status_comments/facebook_status_comments.info	1970-01-01 01:00:00.000000000 +0100
+++ facebook_status/submodules/facebook_status_comments/facebook_status_comments.info	2011-01-27 00:19:26.000000000 +0000
@@ -0,0 +1,6 @@
+; $Id$
+name = Facebook-style Statuses Comments
+description = "Allows comments on Facebook-style Statuses."
+dependencies[] = facebook_status
+package = Facebook-style Statuses
+core = 6.x
diff -uprN -x CVS facebook_status-DRUPAL-6--3/submodules/facebook_status_comments/facebook_status_comments.install facebook_status/submodules/facebook_status_comments/facebook_status_comments.install
--- facebook_status-DRUPAL-6--3/submodules/facebook_status_comments/facebook_status_comments.install	1970-01-01 01:00:00.000000000 +0100
+++ facebook_status/submodules/facebook_status_comments/facebook_status_comments.install	2011-01-27 22:08:20.000000000 +0000
@@ -0,0 +1,72 @@
+<?php
+// $Id$
+
+/**
+ * @file
+ *   Installs comments for Facebook-style Statuses.
+ */
+
+/**
+ * Implementation of hook_schema().
+ */
+function facebook_status_comments_schema() {
+  $schema = array();
+  $schema['facebook_status_comments'] = array(
+    'description' => 'Comments on statuses.',
+    'fields' => array(
+      'cid' => array(
+        'type' => 'serial',
+        'not null' => TRUE,
+        'unsigned' => TRUE,
+        'description' => 'The Comment ID.',
+      ),
+      'sid' => array(
+        'type' => 'int',
+        'unsigned' => TRUE,
+        'not null' => TRUE,
+        'default' => 0,
+        'description' => 'The Status ID.',
+      ),
+      'uid' => array(
+        'type' => 'int',
+        'unsigned' => TRUE,
+        'not null' => TRUE,
+        'default' => 0,
+        'description' => 'The User ID of the poster of the comment.',
+      ),
+      'created' => array(
+        'type' => 'int',
+        'not null' => TRUE,
+        'default' => 0,
+        'description' => 'The time the comment was submitted.',
+      ),
+      'comment' => array(
+        'type' => 'text',
+        'not null' => TRUE,
+        'description' => 'The comment text.',
+      ),
+    ),
+    'indexes' => array(
+      'cid' => array('cid'),
+      'sid' => array('sid'),
+      'uid' => array('uid'),
+      'created' => array('created'),
+    ),
+    'primary key' => array('cid'),
+  );
+  return $schema;
+}
+
+/**
+ * Implementation of hook_install().
+ */
+function facebook_status_comments_install() {
+  drupal_install_schema('facebook_status_comments');
+}
+
+/**
+ * Implementation of hook_uninstall().
+ */
+function facebook_status_comments_uninstall() {
+  drupal_uninstall_schema('facebook_status_comments');
+}
diff -uprN -x CVS facebook_status-DRUPAL-6--3/submodules/facebook_status_comments/facebook_status_comments.js facebook_status/submodules/facebook_status_comments/facebook_status_comments.js
--- facebook_status-DRUPAL-6--3/submodules/facebook_status_comments/facebook_status_comments.js	1970-01-01 01:00:00.000000000 +0100
+++ facebook_status/submodules/facebook_status_comments/facebook_status_comments.js	2011-01-27 22:41:27.000000000 +0000
@@ -0,0 +1,18 @@
+// $Id$
+Drupal.behaviors.facebook_status_comments = function (context) {
+  $('.facebook-status-comments-show-comment-form').one('click', function() {
+    $(this).hide();
+    $('#'+ this.id +' + div').show();
+    return false;
+  });
+  $('.facebook-status-comments-show-comment-form-inner').one('click', function() {
+    $(this).hide();
+    $('#'+ this.id +' + div').show();
+    return false;
+  });
+  $('a.facebook-status-comments-show-comments').one('click', function() {
+    $(this).hide();
+    $('#'+ this.id +' ~ div.facebook-status-comments-hide').show();
+    return false;
+  });
+}
diff -uprN -x CVS facebook_status-DRUPAL-6--3/submodules/facebook_status_comments/facebook_status_comments.module facebook_status/submodules/facebook_status_comments/facebook_status_comments.module
--- facebook_status-DRUPAL-6--3/submodules/facebook_status_comments/facebook_status_comments.module	1970-01-01 01:00:00.000000000 +0100
+++ facebook_status/submodules/facebook_status_comments/facebook_status_comments.module	2011-01-27 23:20:23.000000000 +0000
@@ -0,0 +1,669 @@
+<?php
+// $Id$
+
+/**
+ * @file
+ *   Allows comments on Facebook-style Statuses.
+ * @todo
+ *   - Integrations:
+ *       + activity (trigger/actions, token)
+ *       + flag
+ *       + rules
+ *       + userpoints
+ *       + devel generate
+ *       + popups api
+ *       + sms framework
+ *       + views bulk operations
+ *   - Document API and add README.txt.
+ *   - Turn the comment theme functions into templates.
+ */
+
+//==============
+// DRUPAL HOOKS.
+//==============
+
+/**
+ * Implementation of hook_init().
+ */
+function facebook_status_comments_init() {
+  if (strpos($_GET['q'], 'admin/build/views/edit') !== FALSE) {
+    $path = drupal_get_path('module', 'facebook_status_comments');
+    drupal_add_js($path .'/facebook_status_comments.js');
+    drupal_add_css($path .'/facebook_status_comments.css');
+  }
+}
+
+/**
+ * Implementation of hook_menu().
+ */
+function facebook_status_comments_menu() {
+  $items = array();
+  $items['statuses/comment/%facebook_status_comments/edit'] = array(
+    'title' => 'Edit status comment',
+    'page callback' => 'drupal_get_form',
+    'page arguments' => array('facebook_status_comments_edit', 2),
+    'access callback' => 'facebook_status_comments_can_edit',
+    'access arguments' => array(2),
+    'type' => MENU_CALLBACK,
+    'file' => 'facebook_status_comments.edit.inc',
+  );
+  $items['statuses/comment/%facebook_status_comments/delete'] = array(
+    'title' => 'Delete status comment',
+    'page callback' => 'drupal_get_form',
+    'page arguments' => array('facebook_status_comments_delete', 2),
+    'access callback' => 'facebook_status_comments_can_delete',
+    'access arguments' => array(2),
+    'type' => MENU_CALLBACK,
+    'file' => 'facebook_status_comments.edit.inc',
+  );
+  $items['facebook_status_comments/js/refresh'] = array(
+    'title' => 'Save status comment form',
+    'page callback' => 'facebook_status_comments_save_js',
+    'access arguments' => array('post status comment'),
+    'type' => MENU_CALLBACK,
+  );
+  return $items;
+}
+
+/**
+ * Implementation of hook_user().
+ */
+function facebook_status_comments_user($op, &$edit, &$account, $category = NULL) {
+  if ($op == 'delete') {
+    db_query("DELETE FROM {facebook_status_comments} WHERE uid = %d", $account->uid);
+  }
+}
+
+/**
+ * Implementation of hook_perm().
+ */
+function facebook_status_comments_perm() {
+  return array('delete all status comments',
+               'delete own status comments',
+               'delete comments on own statuses',
+               'edit all status comments',
+               'edit own status comments',
+               'edit comments on own statuses',
+               'post status comment',
+               'view all status comments',
+  );
+}
+
+/**
+ * Implementation of hook_theme().
+ */
+function facebook_status_comments_theme($existing, $type, $theme, $path) {
+  return array(
+    'facebook_status_comments_item' => array(
+      'arguments' => array(
+        'comment' => NULL,
+        'classes' => array(),
+        'destination' => '',
+      ),
+    ),
+    'facebook_status_comments_items' => array(
+      'arguments' => array(
+        'comments' => array(),
+        'delay_load' => TRUE,
+        'destination' => '',
+      ),
+    ),
+    'facebook_status_comments_form_display' => array(
+      'arguments' => array(
+        'sid' => NULL,
+        'delay_load_form' => TRUE,
+        'delay_load_comments' => TRUE,
+      ),
+    ),
+  );
+}
+
+//=================
+// THEME FUNCTIONS.
+//=================
+
+/**
+ * Formats a comment.
+ *
+ * @param $comment
+ *   The comment object.
+ * @param $classes
+ *   An array of extra classes to include in the comment status wrapper div.
+ * @param $destination
+ *   The destination query string for edit and delete links. Usually the current
+ *   page unless this function is called from a JavaScript callback page.
+ * @return
+ *   The fully themed status comment or FALSE if the current user does not have
+ *   permission to view the comment.
+ */
+function theme_facebook_status_comments_item($comment, $classes = array(), $destination = '') {
+  if (!facebook_status_comments_can_view($comment)) {
+      return FALSE;
+  }
+  array_unshift($classes, 'facebook_status_comments_comment');
+  $classes = implode(' ', $classes);
+  $output = '<div class="'. $classes .'">';
+  $output .= '<div class="facebook-status-comments-author">'. theme('username', _facebook_status_user_load($comment->uid)) .'</div>';
+  $comment_text = _facebook_status_run_filter($comment->comment);
+  $comment_text = nl2br($comment_text);
+  $output .= '<div class="facebook-status-comments-text">'. $comment_text .'</div>';
+  $output .= '<div class="facebook-status-comments-closure">';
+  $output .= '<span class="facebook-status-comments-created">'. theme('facebook_status_time', $comment->created) .'</span>';
+  $q = $_GET['q'];
+  if ($destination) {
+    $q = $destination;
+  }
+  elseif (strpos($q, 'facebook_status_comments/js') !== FALSE) {
+    $q = '<front>';
+  }
+  if (facebook_status_comments_can_edit($comment)) {
+    $output .= '<span class="facebook-status-comments-edit-delete">'.
+      l(t('Edit'), 'statuses/comment/'. $comment->cid .'/edit', array('query' => array('destination' => $q)))
+      .'</span>';
+  }
+  if (facebook_status_comments_can_delete($comment)) {
+    $output .= '<span class="facebook-status-comments-edit-delete">'.
+      l(t('Delete'), 'statuses/comment/'. $comment->cid .'/delete', array('query' => array('destination' => $q)))
+      .'</span>';
+  }
+  $output .= '</div></div>';
+  // Invokes hook_facebook_status_comments_render_alter(&$output, $comment).
+  drupal_alter('facebook_status_comments_render', $output, $comment);
+  return $output;
+}
+
+/**
+ * Displays a status comment thread.
+ *
+ * @param $comments
+ *   An array of comment objects to display.
+ * @param $delay_load
+ *   If TRUE and there are no comments on the relevant status, a "show all
+ *   comments" link will be displayed instead of the full list of comments. When
+ *   clicked, the full list of comments will be shown for users with JavaScript
+ *   enabled. Users with JavaScript disabled will be redirected to the status
+ *   thread page. If FALSE the "comment" link (with the comment form hidden)
+ *   will be used instead of just showing the comment form.
+ * @param $destination
+ *   The destination query string for edit and delete links. Usually the current
+ *   page unless this function is called from a JavaScript callback page.
+ * @return
+ *   Themed HTML for the status comments.
+ */
+function theme_facebook_status_comments_items($comments, $delay_load = TRUE, $destination = '') {
+  $count = count($comments);
+  if (!$count) {
+    return;
+  }
+  $path = drupal_get_path('module', 'facebook_status_comments');
+  drupal_add_js($path .'/facebook_status_comments.js');
+  $output = '<div class="facebook-status-comments">';
+  if ($count > 3 && $delay_load) {
+    $options = array('attributes' => array('class' => 'facebook-status-comments-show-comments-link facebook-status-comments-show-comments', 'id' => 'facebook_status_comments_toggle_'. $comments[0]->sid));
+    if ($count > 9) {
+      $options['attributes']['class'] = 'facebook-status-comments-show-comments-link';
+    }
+    $output .= l(t('Show all @count comments', array('@count' => $count)), 'statuses/'. $comments[0]->sid, $options);
+  }
+  foreach ($comments as $key => $comment) {
+    $classes = array();
+    if ($key == 0) {
+      $classes[] = 'first';
+    }
+    if ($key == $count - 1) {
+      $classes[] = 'last';
+    }
+    if ($key % 2 == 0) {
+      $classes[] = 'odd';
+    }
+    else {
+      $classes[] = 'even';
+    }
+    if ($count > 3 && $key != $count - 1 && $key != $count - 2 && $delay_load) {
+      $classes[] = 'facebook-status-comments-hide';
+    }
+    if (!$delay_load || $count < 10 || $key == $count - 1 || $key == $count - 2) {
+      $output .= theme('facebook_status_comments_item', $comment, $classes, $destination);
+    }
+  }
+  $output .= '</div>';
+  return $output;
+}
+
+/**
+ * Displays the status comment form.
+ *
+ * @param $sid
+ *   The Status ID of the comment thread.
+ * @param $delay_load_form
+ *   If TRUE and there are no comments on the relevant status, a "comment" link
+ *   will be displayed instead of the comment form. When clicked, the form will
+ *   be revealed for users with JavaScript enabled. Users with JavaScript
+ *   disabled will be redirected to the status thread page. If FALSE the
+ *   "comment" link will not be used and the comment form will not be initially
+ *   hidden.
+ * @param $delay_load_comments
+ *   If TRUE and there are no comments on the relevant status, a "show all
+ *   comments" link will be displayed instead of the full list of comments. When
+ *   clicked, the full list of comments will be shown for users with JavaScript
+ *   enabled. Users with JavaScript disabled will be redirected to the status
+ *   thread page. If FALSE the "comment" link (with the comment form hidden)
+ *   will be used instead of just showing the comment form.
+ * @return
+ *   Themed HTML for the status form.
+ */
+function theme_facebook_status_comments_form_display($sid, $delay_load_form = TRUE, $delay_load_comments = TRUE) {
+  if (facebook_status_comments_can_post(facebook_status_load($sid))) {
+    $path = drupal_get_path('module', 'facebook_status_comments');
+    drupal_add_js($path .'/facebook_status_comments.js');
+    $output = '';
+    if ($delay_load_form && !facebook_status_comments_count_comments($sid)) {
+      $output = '<div class="facebook-status-comments-show-comment-form" id="facebook_status_comments_toggle_'. $sid .'">'.
+        l(t('Comment'), 'statuses/'. $sid, array('attributes' => array('class' => 'facebook-status-comments-show-comment-form-link')))
+        .'</div>';
+        return $output .'<div class="facebook-status-comments-hide facebook-status-comments-form">'. drupal_get_form('facebook_status_comments_box', $sid, $delay_load_comments) .'</div>';
+    }
+    return '<div class="facebook-status-comments-form">'. drupal_get_form('facebook_status_comments_box', $sid, $delay_load_comments) .'</div>';
+  }
+}
+
+//===============
+// API FUNCTIONS.
+//===============
+
+/**
+ * Loads a status comment.
+ *
+ * @param $cid
+ *   The status comment ID.
+ * @return
+ *   A full status comment object.
+ */
+function facebook_status_comments_load($cid) {
+  if (!is_numeric($cid)) {
+    return;
+  }
+  return db_fetch_object(db_query("SELECT * FROM {facebook_status_comments} WHERE cid = %d", $cid));
+}
+
+/**
+ * Retrieves the comments from a thread.
+ *
+ * @param $sid
+ *   The Status ID of the thread for which to retrieve comments.
+ * @return
+ *   An array of comment objects for the relative thread.
+ */
+function facebook_status_comments_get_comments($sid) {
+  $result = db_query("SELECT * FROM {facebook_status_comments} WHERE sid = %d ORDER BY created ASC, cid ASC", $sid);
+  $results = array();
+  while ($comment = db_fetch_object($result)) {
+    $results[] = $comment;
+  }
+  return $results;
+}
+
+/**
+ * Saves a status comment.
+ *
+ * @param $comment
+ *   The status comment object.
+ * @return
+ *   The saved status comment object.
+ */
+function facebook_status_comments_save_comment($sid, $comment, $uid = NULL) {
+  if (!$uid) {
+    $uid = $GLOBALS['user']->uid;
+  }
+  $c = (object) array('sid' => $sid, 'uid' => $uid, 'created' => time(), 'comment' => $comment);
+  drupal_write_record('facebook_status_comments', $c);
+  module_invoke_all('fbss_after_save', $c, FALSE);
+  return $c;
+}
+
+/**
+ * Deletes a status comment.
+ *
+ * @param $cid
+ *   The comment ID.
+ */
+function facebook_status_comments_delete_comment($cid) {
+  db_query("DELETE FROM {facebook_status_comments} WHERE cid = %d", $cid);
+  module_invoke_all('facebook_status_comments_delete', $cid);
+}
+
+/**
+ * Counts the number of comments on a status.
+ */
+function facebook_status_comments_count_comments($sid) {
+  return db_result(db_query("SELECT COUNT(cid) FROM {facebook_status_comments} WHERE sid = %d", $sid));
+}
+
+/**
+ * Determines whether a user has commented on this status.
+ *
+ * @param $sid
+ *   The Status ID of the thread for which to retrieve comments.
+ * @param $uid
+ *   The User ID of the user for whom to check participation. Defaults to the
+ *   current user.
+ * @return
+ *   TRUE if the user has commented on this status; FALSE otherwise.
+ */
+function facebook_status_comments_has_commented($sid, $uid = NULL) {
+  if (!$uid) {
+    $uid = $GLOBALS['user']->uid;
+  }
+  $result = db_result(db_query("SELECT COUNT(cid) FROM {facebook_status_comments} WHERE sid = %d and uid = %d", $sid, $uid));
+  return $result > 0;
+}
+
+/**
+ * Determines whether a user can view the relevant status.
+ *
+ * @param $comment
+ *   The comment object.
+ * @param $account
+ *   The $user object of the user whose access will be checked. Defaults to the
+ *   current user.
+ */
+function facebook_status_comments_can_view($comment, $account = NULL) {
+  if (empty($account)) {
+    $account = $GLOBALS['user'];
+  }
+  $allow = TRUE;
+  // Only change $allow if you need it to be FALSE.
+  // Do not set it to TRUE as this may override other modules' actions.
+  drupal_alter('facebook_status_comments_can_view', $allow, $comment, $account);
+  return $allow && user_access('view all status comments', $account);
+}
+
+/**
+ * Determines whether a user can post a comment on the relevant status.
+ *
+ * @param $status
+ *   The status object.
+ * @param $account
+ *   The $user object of the user whose access will be checked. Defaults to the
+ *   current user.
+ * @return
+ *   TRUE if the user can post the comment; FALSE otherwise.
+ */
+function facebook_status_comments_can_post($status, $account = NULL) {
+  if (empty($account)) {
+    $account = $GLOBALS['user'];
+  }
+  $allow = TRUE;
+  // Only change $allow if you need it to be FALSE.
+  // Do not set it to TRUE as this may override other modules' actions.
+  drupal_alter('facebook_status_comments_can_post', $allow, $status, $account);
+  return $allow && user_access('post status comment', $account);
+}
+
+/**
+ * Determines whether a user can edit a comment on the relevant status.
+ *
+ * @param $comment
+ *   The comment object.
+ * @param $account
+ *   The $user object of the user whose access will be checked. Defaults to the
+ *   current user.
+ * @return
+ *   TRUE if the user can edit the comment; FALSE otherwise.
+ */
+function facebook_status_comments_can_edit($comment, $account = NULL) {
+  if (empty($account)) {
+    $account = $GLOBALS['user'];
+  }
+  $allow = TRUE;
+  // Only change $allow if you need it to be FALSE.
+  // Do not set it to TRUE as this may override other modules' actions.
+  drupal_alter('facebook_status_comments_can_edit', $allow, $comment, $account);
+  // This is in two separate statements (instead of one big return statement)
+  // so that the SQL in _facebook_status_comments_get_thread_author() does not usually need to be run.
+  if ($allow && (user_access('edit all status comments', $account) ||
+    (user_access('edit own status comments', $account) && $account->uid == $comment->uid)
+  )) {
+    return TRUE;
+  }
+  return $allow && user_access('edit comments on own statuses', $account)
+    && $account->uid == _facebook_status_comments_get_thread_author($comment->sid);
+}
+
+/**
+ * Determines whether a user can delete a comment on the relevant status.
+ *
+ * @param $comment
+ *   The comment object.
+ * @param $account
+ *   The $user object of the user whose access will be checked. Defaults to the
+ *   current user.
+ * @return
+ *   TRUE if the user can delete the comment; FALSE otherwise.
+ */
+function facebook_status_comments_can_delete($comment, $account = NULL) {
+  if (empty($account)) {
+    $account = $GLOBALS['user'];
+  }
+  $allow = TRUE;
+  // Only change $allow if you need it to be FALSE.
+  // Do not set it to TRUE as this may override other modules' actions.
+  drupal_alter('facebook_status_comments_can_delete', $allow, $comment, $account);
+  // This is in two separate statements (instead of one big return statement)
+  // so that the SQL in _facebook_status_comments_get_thread_author() does not usually need to be run.
+  if ($allow && (user_access('delete all status comments', $account) ||
+    (user_access('delete own status comments', $account) && $account->uid == $comment->uid)
+  )) {
+    return TRUE;
+  }
+  return $allow && user_access('delete comments on own statuses', $account)
+    && $account->uid == _facebook_status_comments_get_thread_author($comment->sid);
+}
+
+//==================
+// HELPER FUNCTIONS.
+//==================
+
+/**
+ * Determines the author of a status.
+ *
+ * @param $sid
+ *   The Status ID of the thread in question.
+ * @return
+ *   The User ID of the author of the relevant status.
+ */
+function _facebook_status_comments_get_thread_author($sid) {
+  return db_result(db_query("SELECT sender FROM {facebook_status} WHERE sid = %d", $sid));
+}
+
+//================
+// FORM FUNCTIONS.
+//================
+
+/**
+ * The status comment form.
+ *
+ * @param $sid
+ *   The Status ID of the thread.
+ * @param $delay_load
+ *   If TRUE and there are no comments on the relevant status, a "show all
+ *   comments" link will be displayed instead of the full list of comments. When
+ *   clicked, the full list of comments will be shown for users with JavaScript
+ *   enabled. Users with JavaScript disabled will be redirected to the status
+ *   thread page. If FALSE the "comment" link with delayed comment form loading
+ *   will not be used.
+ */
+function facebook_status_comments_box($form_state, $sid, $delay_load = TRUE) {
+  $path = drupal_get_path('module', 'facebook_status_comments');
+  drupal_add_css($path .'/facebook_status_comments.css');
+  $form = array();
+  if (!isset($form_state['facebook_status_comments']['q'])) {
+    $form['#qu'] = $_GET['q'];
+  }
+  else {
+    $form['#qu'] = $form_state['facebook_status_comments']['q'];
+  }
+  $comments = facebook_status_comments_get_comments($sid);
+  $form['before'] = array('#value' => '<div id="facebook_status_comments_replace_'. $sid .'">');
+  $form['comments'] = array('#value' => theme('facebook_status_comments_items', $comments, $delay_load, $form['#qu']));
+  if (count($comments)) {
+    $form['start-hide'] = array('#value' => '<div class="facebook-status-comments-show-comment-form-inner" id="facebook_status_comments_inner_toggle_'. $sid .'">'.
+      l(t('Comment'), 'statuses/'. $sid, array('attributes' => array('class' => 'facebook-status-comments-show-comment-inner-form-link')))
+      .'</div><div class="facebook-status-comments-hide facebook-status-comments-replace-inner-'. $sid .'">');
+  }
+  $form['status-comment'] = array(
+    '#type' => 'textarea',
+    '#rows' => 1,
+    '#required' => TRUE,
+  );
+  $form['save'] = array(
+    '#type' => 'submit',
+    '#value' => t('Comment'),
+    '#ahah' => array(
+      'path' => 'facebook_status_comments/js/refresh',
+      'wrapper' => 'facebook_status_comments_replace_'. $sid,
+      'effect' => 'fade',
+      'method' => 'replace',
+    ),
+  );
+  if (count($comments)) {
+    $form['end-hide'] = array('#value' => '</div>');
+  }
+  $form['after'] = array('#value' => '</div>');
+  $form['#sid'] = $sid;
+  if ($form_state['facebook_status_comments']['sid']) {
+    $form['#sid'] = $form_state['facebook_status_comments']['sid'];
+  }
+  return $form;
+}
+
+/**
+ * The submit handler for the status comment form.
+ */
+function facebook_status_comments_box_submit($form, &$form_state) {
+  $form_state['facebook_status_comments']['q'] = $form['#qu'];
+  $form_state['facebook_status_comments']['sid'] = $form['#sid'];
+  facebook_status_comments_save_comment($form['#sid'], $form_state['values']['status-comment']);
+  $form_state['rebuild'] = TRUE;
+}
+
+/**
+ * Saves status comments via AHAH.
+ */
+function facebook_status_comments_save_js() {
+  $form_state = array('storage' => NULL, 'submitted' => FALSE);
+  $form_build_id = $_POST['form_build_id'];
+  $form = form_get_cache($form_build_id, $form_state);
+  $form_state['post'] = $form['#post'] = $_POST;
+  $form['#programmed'] = $form['#redirect'] = FALSE;
+  $args = $form['#parameters'];
+  // This happens if someone goes directly to the JS processing page.
+  if (!is_array($args) && !$args) {
+    drupal_goto('user');
+    watchdog('facebook_status',
+      'Someone tried to access the JavaScript processing page for Facebook-style Statuses Comments directly.', array(), WATCHDOG_DEBUG);
+    return;
+  }
+  $form_id = array_shift($args);
+  drupal_process_form($form_id, $form, $form_state);
+  $form = drupal_rebuild_form($form_id, $form_state, $args, $form_build_id);
+  // Get HTML for the replacement form. Only these elements will be AHAH-refreshed.
+  $new_form['comments']       = $form['comments'];
+  $new_form['status-comment'] = $form['status-comment'];
+  $new_form['save']           = $form['save'];
+  $output = theme('status_messages') . drupal_render($new_form);
+  // Return the results.
+  drupal_json(array('status' => TRUE, 'data' => $output));
+}
+
+//==============
+// INTEGRATIONS.
+//==============
+
+/**
+ * Implementation of hook_facebook_status_delete().
+ */
+function facebook_status_comments_facebook_status_delete($sid) {
+  db_query("DELETE FROM {facebook_status_comments} WHERE sid = %d", $sid);
+}
+
+/**
+ * Implementation of hook_facebook_status_render_components().
+ */
+function facebook_status_comments_facebook_status_render_components($status) {
+  return array(
+    'comments' => array(
+      'type' => (arg(0) == 'statuses' && is_numeric(arg(1)) && !arg(2)) ? 'markup' : 'value',
+      'value' => theme('facebook_status_comments_form_display', $status->sid, FALSE, FALSE),
+      'weight' => 50,
+    ),
+  );
+}
+
+/**
+ * Implementation of hook_views_api().
+ */
+function facebook_status_comments_views_api() {
+  return array('api' => 2);
+}
+
+/**
+ * Implementation of hook_views_default_views_alter().
+ */
+function facebook_status_comments_views_default_views_alter(&$views) {
+  foreach ($views as $view) {
+    // We can't use the base_table property because some FBSS views are based on the {users} table.
+    if ($view->tag == 'facebook_status') {
+      // Do some trickery to make sure the comment box comes before the global:nothing field so that it's available as a token.
+      $s = $view->display['default']->display_options['fields']['nothing'];
+      unset($view->display['default']->display_options['fields']['nothing']);
+      // This won't work anywhere fields are overridden in the default views.
+      $view->display['default']->display_options['fields']['comment-box'] = array(
+        'label' => '',
+        'alter' => array(
+          'alter_text' => 0,
+          'text' => '',
+          'make_link' => 0,
+          'path' => '',
+          'link_class' => '',
+          'alt' => '',
+          'prefix' => '',
+          'suffix' => '',
+          'target' => '',
+          'help' => '',
+          'trim' => 0,
+          'max_length' => '',
+          'word_boundary' => 1,
+          'ellipsis' => 1,
+          'strip_tags' => 0,
+          'html' => 0,
+        ),
+        'empty' => '',
+        'hide_empty' => 0,
+        'empty_zero' => 0,
+        'exclude' => 1,
+        'id' => 'comment-box',
+        'table' => 'facebook_status',
+        'field' => 'comment-box',
+        'relationship' => 'none',
+        'override' => array(
+          'button' => 'Override',
+        ),
+      );
+      $view->display['default']->display_options['fields']['nothing'] = $s;
+/*      $view->display['default']->display_options['fields']['nothing']['alter']['text'] = 
+        "<div>[picture] [name] [message]</div>
+
+        <div>[created] [edit] [delete] [respond] [repost] [comment-box]</div>";*/
+      // Can't get this to work!
+      $t = $view->display['default']->display_options['fields']['nothing']['alter']['text'];
+      if (drupal_substr($t, -6) == '</div>') {
+        $t = drupal_substr($t, -6) . ' [comment-box]</div>';
+      }
+      else {
+        $t .= "\n\n<div>[comment-box]</div>";
+      }
+      $view->display['default']->display_options['fields']['nothing']['alter']['text'] .= $t;
+    }
+  }
+}
diff -uprN -x CVS facebook_status-DRUPAL-6--3/submodules/facebook_status_comments/facebook_status_comments.views.inc facebook_status/submodules/facebook_status_comments/facebook_status_comments.views.inc
--- facebook_status-DRUPAL-6--3/submodules/facebook_status_comments/facebook_status_comments.views.inc	1970-01-01 01:00:00.000000000 +0100
+++ facebook_status/submodules/facebook_status_comments/facebook_status_comments.views.inc	2011-01-27 22:11:49.000000000 +0000
@@ -0,0 +1,213 @@
+<?php
+// $Id$
+
+/**
+ * @file
+ *   Provide views data and handlers for the Facebook-style Statuses module.
+ */
+
+/**
+ * Implementation of hook_views_data().
+ */
+function facebook_status_comments_views_data() {
+  // Basic table information.
+  $data['facebook_status_comments']['table']['group']  = t('Facebook-style Statuses Comments');
+  $data['facebook_status_comments']['table']['join'] = array(
+    'users' => array(
+      'left_field' => 'uid',
+      'field' => 'uid',
+      'type' => 'INNER',
+    ),
+    'facebook_status' => array(
+      'left_field' => 'sid',
+      'field' => 'sid',
+      'type' => 'INNER',
+    ),
+  );
+
+  // Advertise this table as a possible base table.
+  $data['facebook_status_comments']['table']['base'] = array(
+    'field' => 'cid',
+    'title' => t('Facebook-style Statuses Comments'),
+    'help' => t('Stores status comments.'),
+    'weight' => 10,
+  );
+
+  // Alias for the FBSS Status ID to extend its use.
+  $data['facebook_status']['comment-box'] = array(
+    'title' => t('Status comment box'),
+    'help' => t('Shows the list of comments for the relevant status and the form to submit a new status comment.'),
+    'field' => array(
+      'field' => 'sid',
+      'handler' => 'facebook_status_comments_views_handler_field_comment_box',
+      'click sortable' => FALSE,
+    ),
+  );
+
+
+  // Declares the Comment ID column.
+  $data['facebook_status_comments']['cid'] = array(
+    'title' => t('Status Comment ID'),
+    'help' => t('The ID of the status comment.'),
+    'field' => array(
+      'handler' => 'views_handler_field',
+      'click sortable' => TRUE,
+    ),
+    'filter' => array(
+      'handler' => 'views_handler_filter_numeric',
+    ),
+    'sort' => array(
+      'handler' => 'views_handler_sort',
+    ),
+    'argument' => array(
+      'handler' => 'views_handler_argument_numeric',
+    ),
+  );
+
+  // Declares the Status ID column.
+  $data['facebook_status_comments']['sid'] = array(
+    'title' => t('Status ID'),
+    'help' => t('The ID of the status.'),
+    'field' => array(
+      'handler' => 'views_handler_field',
+      'click sortable' => TRUE,
+    ),
+    'filter' => array(
+      'handler' => 'views_handler_filter_numeric',
+    ),
+    'sort' => array(
+      'handler' => 'views_handler_sort',
+    ),
+    'argument' => array(
+      'handler' => 'views_handler_argument_numeric',
+    ),
+  );
+
+  // "Comment count."
+  $data['facebook_status']['comment-count'] = array(
+    'title' => t('Comment count'),
+    'help' => t('The number of comments on the status.'),
+    'field' => array(
+      'field' => 'sid',
+      'handler' => 'facebook_status_comments_views_handler_field_cc',
+      'click sortable' => TRUE,
+    ),
+  );
+
+  // "Comment count" with plural-sensitive string.
+  $data['facebook_status']['plural-comment-count'] = array(
+    'title' => t('Pluralized comment count'),
+    'help' => t('The number of comments on the status in words ("1 comment" or "N comments").'),
+    'field' => array(
+      'field' => 'sid',
+      'handler' => 'facebook_status_comments_views_handler_field_cc2',
+      'click sortable' => TRUE,
+    ),
+  );
+
+  // Declares the commenter's User ID column.
+  $data['facebook_status_comments']['uid'] = array(
+    'title' => t('User ID'),
+    'help' => t('The User ID of the status comment author.'),
+    'field' => array(
+      'handler' => 'views_handler_field',
+      'click sortable' => TRUE,
+    ),
+    'filter' => array(
+      'handler' => 'views_handler_filter_numeric',
+    ),
+    'sort' => array(
+      'handler' => 'views_handler_sort',
+    ),
+    'argument' => array(
+      'handler' => 'views_handler_argument_numeric',
+    ),
+  );
+
+  // Declares the status comment timestamp column.
+  $data['facebook_status_comments']['created'] = array(
+    'title' => t('Created time'),
+    'help' => t('The time the status comment was posted.'),
+    'field' => array(
+      'handler' => 'views_handler_field_date',
+      'click sortable' => TRUE,
+    ),
+    'sort' => array(
+      'handler' => 'views_handler_sort',
+    ),
+    'filter' => array(
+      'handler' => 'views_handler_filter_date',
+    ),
+  );
+
+  // Declares the status comment text column.
+  $data['facebook_status_comments']['comment'] = array(
+    'title' => t('Comment text'),
+    'help' => t('The text of the status comment.'),
+    'field' => array(
+      'handler' => 'views_handler_field',
+      'click sortable' => FALSE,
+    ),
+    'filter' => array(
+      'handler' => 'views_handler_filter_string',
+    ),
+  );
+
+  return $data;
+}
+
+/**
+ * Implementation of hook_views_data_alter().
+ */
+function facebook_status_comments_views_data_alter(&$data) {
+  $data['facebook_status_comments']['users'] = array(
+    'group' => t('Facebook-style Statuses Comments'),
+    'relationship' => array(
+      'title' => t('Users'),
+      'label' => t('Users'),
+      'help' => t('Add a relationship to gain access to information related to the users who submitted the relevant status comments.'),
+      'relationship table' => 'facebook_status_comments',
+      'relationship field' => 'uid',
+      'base' => 'users',
+      'field' => 'uid',
+      'type' => 'INNER',
+      'handler' => 'views_handler_relationship',
+    ),
+  );
+  $data['facebook_status_comments']['facebook_status'] = array(
+    'group' => t('Facebook-style Statuses Comments'),
+    'relationship' => array(
+      'title' => t('Statuses'),
+      'label' => t('Statuses'),
+      'help' => t('Add a relationship to gain access to information related to the statuses themselves.'),
+      'relationship table' => 'facebook_status_comments',
+      'relationship field' => 'sid',
+      'base' => 'facebook_status',
+      'field' => 'sid',
+      'type' => 'INNER',
+      'handler' => 'views_handler_relationship',
+    ),
+  );
+}
+
+/**
+ * Implementation of hook_views_handlers().
+ */
+function facebook_status_comments_views_handlers() {
+  return array(
+    'info' => array(
+      'path' => drupal_get_path('module', 'facebook_status_comments'),
+    ),
+    'handlers' => array(
+      'facebook_status_comments_views_handler_field_comment_box' => array(
+        'parent' => 'views_handler_field',
+      ),
+      'facebook_status_comments_views_handler_field_cc' => array(
+        'parent' => 'views_handler_field',
+      ),
+      'facebook_status_comments_views_handler_field_cc2' => array(
+        'parent' => 'views_handler_field',
+      ),
+    ),
+  );
+}
diff -uprN -x CVS facebook_status-DRUPAL-6--3/submodules/facebook_status_comments/facebook_status_comments_views_handler_field_cc.inc facebook_status/submodules/facebook_status_comments/facebook_status_comments_views_handler_field_cc.inc
--- facebook_status-DRUPAL-6--3/submodules/facebook_status_comments/facebook_status_comments_views_handler_field_cc.inc	1970-01-01 01:00:00.000000000 +0100
+++ facebook_status/submodules/facebook_status_comments/facebook_status_comments_views_handler_field_cc.inc	2011-01-27 22:10:13.000000000 +0000
@@ -0,0 +1,18 @@
+<?php
+// $Id$
+
+/**
+ * @file
+ *   Provides a "comment count" view field handler.
+ */
+
+/**
+ * Implements the "comment count" field.
+ */
+class facebook_status_comments_views_handler_field_cc extends views_handler_field {
+  function render($values) {
+    $sid = $values->{$this->field_alias};
+    $count = db_result(db_query("SELECT COUNT(cid) FROM {facebook_status_comments} WHERE sid = %d", $sid));
+    return $count;
+  }
+}
diff -uprN -x CVS facebook_status-DRUPAL-6--3/submodules/facebook_status_comments/facebook_status_comments_views_handler_field_cc2.inc facebook_status/submodules/facebook_status_comments/facebook_status_comments_views_handler_field_cc2.inc
--- facebook_status-DRUPAL-6--3/submodules/facebook_status_comments/facebook_status_comments_views_handler_field_cc2.inc	1970-01-01 01:00:00.000000000 +0100
+++ facebook_status/submodules/facebook_status_comments/facebook_status_comments_views_handler_field_cc2.inc	2011-01-27 22:09:51.000000000 +0000
@@ -0,0 +1,18 @@
+<?php
+// $Id$
+
+/**
+ * @file
+ *   Provides a "comment count" view field handler.
+ */
+
+/**
+ * Implements the "comment count" field.
+ */
+class facebook_status_comments_views_handler_field_cc2 extends views_handler_field {
+  function render($values) {
+    $sid = $values->{$this->field_alias};
+    $count = db_result(db_query("SELECT COUNT(cid) FROM {facebook_status_comments} WHERE sid = %d", $sid));
+    return format_plural($count, '1 comment', '@count comments');
+  }
+}
diff -uprN -x CVS facebook_status-DRUPAL-6--3/submodules/facebook_status_comments/facebook_status_comments_views_handler_field_comment_box.inc facebook_status/submodules/facebook_status_comments/facebook_status_comments_views_handler_field_comment_box.inc
--- facebook_status-DRUPAL-6--3/submodules/facebook_status_comments/facebook_status_comments_views_handler_field_comment_box.inc	1970-01-01 01:00:00.000000000 +0100
+++ facebook_status/submodules/facebook_status_comments/facebook_status_comments_views_handler_field_comment_box.inc	2011-01-27 22:09:26.000000000 +0000
@@ -0,0 +1,16 @@
+<?php
+// $Id$
+
+/**
+ * @file
+ *   Formats the status comment update form in Views.
+ */
+
+/**
+ * Field handler to add the status comment update form.
+ */
+class facebook_status_comments_views_handler_field_comment_box extends views_handler_field {
+  function render($values) {
+    return theme('facebook_status_comments_form_display', $values->facebook_status_sid, TRUE, TRUE);
+  }
+}
diff -uprN -x CVS facebook_status-DRUPAL-6--3/submodules/facebook_status_tags/facebook_status_tags.module facebook_status/submodules/facebook_status_tags/facebook_status_tags.module
--- facebook_status-DRUPAL-6--3/submodules/facebook_status_tags/facebook_status_tags.module	2011-01-27 00:51:01.000000000 +0000
+++ facebook_status/submodules/facebook_status_tags/facebook_status_tags.module	2011-01-27 02:30:30.000000000 +0000
@@ -561,6 +561,16 @@ function _facebook_status_tags_get_term(
   return db_fetch_object(db_query("SELECT tid, name FROM {term_data} WHERE LOWER(name) = LOWER('%s') AND vid = %d", $name, variable_get('facebook_status_tags_vid', -1)));
 }
 
+/**
+ * Convert tags in message to links.
+ */
+function facebook_status_tags_display_message($message) {
+  //$status_text comes in pre-encoded. Temporarily replace the single-quote
+  //character encoding so it doesn't get unintentionally linkified.
+  $message = str_replace("'", '&#039;', _facebook_status_tags_filter(str_replace('&#039;', "'", $message)));
+  return $message;
+}
+
 //=================
 //FBSS INTEGRATION.
 //=================
@@ -635,7 +645,27 @@ function facebook_status_tags_facebook_s
  * Implementation of hook_views_api().
  */
 function facebook_status_tags_views_api() {
-  return array('api' => 2);
+  return array(
+    'api' => 2,
+    'path' => drupal_get_path('module', 'facebook_status_tags') .'/views',
+  );
+}
+
+/**
+ * Override message handler to convert tags to links.
+ */
+function facebook_status_tags_views_data_alter(&$data) {
+  $data['facebook_status']['message'] = array(
+    'title' => t('Status message (tags linked)'),
+    'help' => t('The text of the status update with tags converted to links.'),
+    'field' => array(
+      'handler' => 'facebook_status_tags_views_handler_field_message',
+      'click sortable' => TRUE,
+    ),
+    'filter' => array(
+      'handler' => 'views_handler_filter_string',
+    ),
+  );
 }
 
 /**
diff -uprN -x CVS facebook_status-DRUPAL-6--3/submodules/facebook_status_tags/views/facebook_status_tags.views.inc facebook_status/submodules/facebook_status_tags/views/facebook_status_tags.views.inc
--- facebook_status-DRUPAL-6--3/submodules/facebook_status_tags/views/facebook_status_tags.views.inc	2011-01-27 00:51:01.000000000 +0000
+++ facebook_status/submodules/facebook_status_tags/views/facebook_status_tags.views.inc	2011-01-27 02:29:13.000000000 +0000
@@ -136,7 +136,7 @@ function facebook_status_tags_views_data
 function facebook_status_tags_views_handlers() {
   return array(
     'info' => array(
-      'path' => drupal_get_path('module', 'facebook_status'),
+      'path' => drupal_get_path('module', 'facebook_status_tags') .'/views',
     ),
     'handlers' => array(
       'facebook_status_tags_views_handler_argument_has_this_tag' => array(
@@ -160,6 +160,9 @@ function facebook_status_tags_views_hand
       'facebook_status_tags_views_handler_filter_string_type' => array(
         'parent' => 'views_handler_filter_in_operator',
       ),
+      'facebook_status_tags_views_handler_field_message' => array(
+        'parent' => 'views_handler_field',
+      ),
     ),
   );
 }
diff -uprN -x CVS facebook_status-DRUPAL-6--3/submodules/facebook_status_tags/views/facebook_status_tags.views_default.inc facebook_status/submodules/facebook_status_tags/views/facebook_status_tags.views_default.inc
--- facebook_status-DRUPAL-6--3/submodules/facebook_status_tags/views/facebook_status_tags.views_default.inc	2011-01-27 00:51:01.000000000 +0000
+++ facebook_status/submodules/facebook_status_tags/views/facebook_status_tags.views_default.inc	2011-01-27 23:08:20.000000000 +0000
@@ -21,7 +21,7 @@ function facebook_status_tags_views_defa
   $view->disabled = !module_exists('taxonomy');
   $handler = $view->new_display('default', 'Tag Reference', 'default');
   $handler->override_option('fields', array(
-    'pid_extra' => array(
+    'user_contextual_pic' => array(
       'label' => '',
       'alter' => array(
         'alter_text' => 0,
@@ -40,12 +40,12 @@ function facebook_status_tags_views_defa
         'html' => 0,
       ),
       'exclude' => 1,
-      'id' => 'pid_extra',
+      'id' => 'user_contextual_pic',
       'table' => 'facebook_status',
-      'field' => 'pid_extra',
+      'field' => 'user_contextual_pic',
       'relationship' => 'none',
     ),
-    'status' => array(
+    'message' => array(
       'label' => '',
       'alter' => array(
         'alter_text' => 0,
@@ -64,16 +64,16 @@ function facebook_status_tags_views_defa
         'html' => 0,
       ),
       'exclude' => 1,
-      'id' => 'status',
+      'id' => 'message',
       'table' => 'facebook_status',
-      'field' => 'status',
+      'field' => 'message',
       'relationship' => 'none',
     ),
-    'status_time' => array(
+    'created' => array(
       'label' => '',
       'alter' => array(
         'alter_text' => 1,
-        'text' => '[pid_extra] [status] [status_time]',
+        'text' => '',
         'make_link' => 0,
         'path' => '',
         'alt' => '',
@@ -89,19 +89,47 @@ function facebook_status_tags_views_defa
       ),
       'date_format' => 'time ago',
       'custom_date_format' => '1',
-      'exclude' => 0,
-      'id' => 'status_time',
+      'exclude' => 1,
+      'id' => 'created',
       'table' => 'facebook_status',
-      'field' => 'status_time',
+      'field' => 'created',
+      'relationship' => 'none',
+    ),
+    'nothing' => array(
+      'label' => '',
+      'alter' => array(
+        'text' => '<div>[user_contextual_pic] [message] [created]</div>',
+        'make_link' => 0,
+        'path' => '',
+        'link_class' => '',
+        'alt' => '',
+        'prefix' => '',
+        'suffix' => '',
+        'target' => '',
+        'help' => '',
+        'trim' => 0,
+        'max_length' => '',
+        'word_boundary' => 1,
+        'ellipsis' => 1,
+        'html' => 0,
+        'strip_tags' => 0,
+      ),
+      'empty' => '',
+      'hide_empty' => 0,
+      'empty_zero' => 0,
+      'exclude' => 0,
+      'id' => 'nothing',
+      'table' => 'views',
+      'field' => 'nothing',
       'relationship' => 'none',
     ),
   ));
   $handler->override_option('sorts', array(
-    'status_time' => array(
+    'created' => array(
       'order' => 'DESC',
-      'id' => 'status_time',
+      'id' => 'created',
       'table' => 'facebook_status',
-      'field' => 'status_time',
+      'field' => 'created',
       'relationship' => 'none',
     ),
     'sid' => array(
@@ -167,32 +195,18 @@ function facebook_status_tags_views_defa
     ),
   ));
   $handler->override_option('filters', array(
-    'sid_extra' => array(
-      'operator' => '=',
-      'value' => '0',
-      'group' => '0',
-      'exposed' => FALSE,
-      'expose' => array(
-        'operator' => FALSE,
-        'label' => '',
-      ),
-      'id' => 'sid_extra',
-      'table' => 'facebook_status',
-      'field' => 'sid_extra',
-      'relationship' => 'none',
-    ),
-    'pid_extra_3' => array(
+    'auto-type' => array(
       'operator' => '=',
-      'value' => '0',
+      'value' => '',
       'group' => '0',
       'exposed' => FALSE,
       'expose' => array(
         'operator' => FALSE,
         'label' => '',
       ),
-      'id' => 'pid_extra_3',
+      'id' => 'auto-type',
       'table' => 'facebook_status',
-      'field' => 'pid_extra_3',
+      'field' => 'auto-type',
       'relationship' => 'none',
     ),
   ));
@@ -210,19 +224,19 @@ function facebook_status_tags_views_defa
     'sticky' => 0,
     'order' => 'asc',
     'columns' => array(
-      'pid_extra' => 'pid_extra',
-      'status' => 'status',
-      'status_time' => 'status_time',
+      'user_contextual_pic' => 'user_contextual_pic',
+      'message' => 'message',
+      'created' => 'created',
     ),
     'info' => array(
-      'pid_extra' => array(
+      'user_contextual_pic' => array(
         'separator' => '',
       ),
-      'status' => array(
+      'message' => array(
         'sortable' => 0,
         'separator' => '',
       ),
-      'status_time' => array(
+      'created' => array(
         'sortable' => 0,
         'separator' => '',
       ),
@@ -284,7 +298,7 @@ function facebook_status_tags_views_defa
   $view->disabled = FALSE;
   $handler = $view->new_display('default', 'User Reference', 'default');
   $handler->override_option('fields', array(
-    'pid_extra' => array(
+    'user_contextual_pic' => array(
       'label' => '',
       'alter' => array(
         'alter_text' => 0,
@@ -303,12 +317,12 @@ function facebook_status_tags_views_defa
         'html' => 0,
       ),
       'exclude' => 1,
-      'id' => 'pid_extra',
+      'id' => 'user_contextual_pic',
       'table' => 'facebook_status',
-      'field' => 'pid_extra',
+      'field' => 'user_contextual_pic',
       'relationship' => 'none',
     ),
-    'status' => array(
+    'message' => array(
       'label' => '',
       'alter' => array(
         'alter_text' => 0,
@@ -327,16 +341,16 @@ function facebook_status_tags_views_defa
         'html' => 0,
       ),
       'exclude' => 1,
-      'id' => 'status',
+      'id' => 'message',
       'table' => 'facebook_status',
-      'field' => 'status',
+      'field' => 'message',
       'relationship' => 'none',
     ),
-    'status_time' => array(
+    'created' => array(
       'label' => '',
       'alter' => array(
         'alter_text' => 1,
-        'text' => '[pid_extra] [status] [status_time]',
+        'text' => '',
         'make_link' => 0,
         'path' => '',
         'alt' => '',
@@ -352,19 +366,47 @@ function facebook_status_tags_views_defa
       ),
       'date_format' => 'time ago',
       'custom_date_format' => '1',
-      'exclude' => 0,
-      'id' => 'status_time',
+      'exclude' => 1,
+      'id' => 'created',
       'table' => 'facebook_status',
-      'field' => 'status_time',
+      'field' => 'created',
+      'relationship' => 'none',
+    ),
+    'nothing' => array(
+      'label' => '',
+      'alter' => array(
+        'text' => '<div>[user_contextual_pic] [message] [created]</div>',
+        'make_link' => 0,
+        'path' => '',
+        'link_class' => '',
+        'alt' => '',
+        'prefix' => '',
+        'suffix' => '',
+        'target' => '',
+        'help' => '',
+        'trim' => 0,
+        'max_length' => '',
+        'word_boundary' => 1,
+        'ellipsis' => 1,
+        'html' => 0,
+        'strip_tags' => 0,
+      ),
+      'empty' => '',
+      'hide_empty' => 0,
+      'empty_zero' => 0,
+      'exclude' => 0,
+      'id' => 'nothing',
+      'table' => 'views',
+      'field' => 'nothing',
       'relationship' => 'none',
     ),
   ));
   $handler->override_option('sorts', array(
-    'status_time' => array(
+    'created' => array(
       'order' => 'DESC',
-      'id' => 'status_time',
+      'id' => 'created',
       'table' => 'facebook_status',
-      'field' => 'status_time',
+      'field' => 'created',
       'relationship' => 'none',
     ),
     'sid' => array(
@@ -423,58 +465,22 @@ function facebook_status_tags_views_defa
       'validate_argument_type' => 'tid',
       'validate_argument_transform' => 0,
       'validate_user_restrict_roles' => 0,
-      'validate_argument_php' => '//If this view is overridden and then FBSS is disabled, it can
-//cause a WSOD if these lines are not included here.
-if (!function_exists(\'_facebook_status_user_load_by_name\')) {
-  return;
-}
-
-if (is_numeric($argument)) {
-  return TRUE;
-}
-if (strpos($argument, \',\') !== FALSE) {
-  $names = explode(\',\', $argument);
-  $type = \',\';
-}
-else if (strpos($argument, \'+\') !== FALSE) {
-  $names = explode(\'+\', $argument);
-  $type = \'+\';
-}
-else {
-  $names = array($argument);
-  $type = \'\';
-}
-$uids = array();
-foreach ($names as $name) {
-  if (is_numeric($name)) {
-    $uids[] = $name;
-    continue;
-  }
-  $account = _facebook_status_user_load_by_name($name);
-  if ($account->uid) {
-    $uids[] = $account->uid;
-  }
-}
-if (!empty($uids)) {
-  $handler->argument = implode($type, $uids);
-  return TRUE;
-}
-return FALSE;',
+      'validate_argument_php' => '',
     ),
   ));
   $handler->override_option('filters', array(
-    'pid_extra_3' => array(
+    'auto-type' => array(
       'operator' => '=',
-      'value' => '0',
+      'value' => '',
       'group' => '0',
       'exposed' => FALSE,
       'expose' => array(
         'operator' => FALSE,
         'label' => '',
       ),
-      'id' => 'pid_extra_3',
+      'id' => 'auto-type',
       'table' => 'facebook_status',
-      'field' => 'pid_extra_3',
+      'field' => 'auto-type',
       'relationship' => 'none',
     ),
   ));
@@ -494,20 +500,20 @@ return FALSE;',
     'sticky' => 0,
     'order' => 'asc',
     'columns' => array(
-      'name' => 'name',
-      'status' => 'status',
-      'status_time' => 'status_time',
+      'user_contextual_pic' => 'user_contextual_pic',
+      'message' => 'message',
+      'created' => 'created',
     ),
     'info' => array(
-      'name' => array(
+      'user_contextual_pic' => array(
         'sortable' => 0,
         'separator' => '',
       ),
-      'status' => array(
+      'message' => array(
         'sortable' => 0,
         'separator' => '',
       ),
-      'status_time' => array(
+      'created' => array(
         'sortable' => 0,
         'separator' => '',
       ),
@@ -584,68 +590,14 @@ return FALSE;',
       'validate_argument_type' => 'tid',
       'validate_argument_transform' => 0,
       'validate_user_restrict_roles' => 0,
-      'validate_argument_php' => '//If this view is overridden and then FBSS is disabled, it can
-//cause a WSOD if these lines are not included here.
-if (!function_exists(\'_facebook_status_user_load\')) {
-  return;
-}
-
-//If the argument is not present, get it from the UID in the URL instead.
-if (arg(0) == \'user\' && !is_string($argument)) {
-  $account = _facebook_status_user_load(arg(1));
-  if ($account->uid) {
-    $handler->argument = $account->name;
-    return TRUE;
-  }
-}
-else if (is_string($argument)) {
-  $account = _facebook_status_user_load_by_name($argument);
-  if ($account->uid) {
-    return TRUE;
-  }
-}
-return FALSE;',
+      'validate_argument_php' => '',
     ),
   ));
   if (module_exists('php')) {
-    $handler->override_option('footer', '<?php
-    /*
-      //If this view is overridden and then FBSS is disabled, it can
-      //cause a WSOD if these lines are not included here.
-      if (!function_exists(\'_facebook_status_user_load\')) {
-        echo t(\'Facebook-style Statuses has been disabled.\');
-        return;
-      }
-
-      //Adds a link to view your conversation with the user whose profile you are viewing.
-      global $user;
-      $account = _facebook_status_user_load(arg(1));
-      if ($account->uid && $account->uid != $user->uid) {
-        echo l(\'View mentions between you and \'. $account->name, \'statuses/conversation/\'. check_plain($account->name) .\',\'. check_plain($user->name));
-      }
-     */
-    ?>');
+    $handler->override_option('footer', '');
     $handler->override_option('footer_format', '3');
     $handler->override_option('footer_empty', 0);
-    $handler->override_option('empty', '<?php
-    //If this view is overridden and then FBSS is disabled, it can
-    //cause a WSOD if these lines are not included here.
-    if (!function_exists(\'_facebook_status_user_load\')) {
-      echo t(\'Facebook-style Statuses has been disabled.\');
-      return;
-    }
-
-    if (arg(0) == \'user\') {
-      $account = _facebook_status_user_load(arg(1));
-      global $user;
-      if ($user->uid == $account->uid) {
-        echo t(\'No one has mentioned you yet.\');
-      }
-      else {
-        echo t(\'No one has mentioned @name.\', array(\'@name\' => $account->name));
-      }
-    }
-    ?>');
+    $handler->override_option('empty', '');
     $handler->override_option('empty_format', '3');
   }
   $handler->override_option('items_per_page', 5);
diff -uprN -x CVS facebook_status-DRUPAL-6--3/submodules/facebook_status_tags/views/facebook_status_tags_views_handler_field_message.inc facebook_status/submodules/facebook_status_tags/views/facebook_status_tags_views_handler_field_message.inc
--- facebook_status-DRUPAL-6--3/submodules/facebook_status_tags/views/facebook_status_tags_views_handler_field_message.inc	1970-01-01 01:00:00.000000000 +0100
+++ facebook_status/submodules/facebook_status_tags/views/facebook_status_tags_views_handler_field_message.inc	2011-01-27 02:23:22.000000000 +0000
@@ -0,0 +1,22 @@
+<?php
+// $Id$
+
+/**
+ * @file
+ *   Converts tags in status message to links.
+ */
+
+/**
+ * Field handler to display message with tags converted to links.
+ */
+class facebook_status_tags_views_handler_field_message extends views_handler_field {
+  function render($values) {
+//    $message = _facebook_status_run_filter($values->{$this->field_alias});
+    $message = $values->{$this->field_alias};
+/*    if (variable_get('facebook_status_nl2br', 0)) {
+      $message = nl2br($message);
+    }*/
+    return facebook_status_tags_display_message($message);
+  }
+}
+
diff -uprN -x CVS facebook_status-DRUPAL-6--3/submodules/fbssc/fbssc.css facebook_status/submodules/fbssc/fbssc.css
--- facebook_status-DRUPAL-6--3/submodules/fbssc/fbssc.css	2011-01-27 00:19:26.000000000 +0000
+++ facebook_status/submodules/fbssc/fbssc.css	1970-01-01 01:00:00.000000000 +0100
@@ -1,79 +0,0 @@
-.fbssc {
-  border: 1px solid #E0E0E0;
-  margin: 1em 1.5em;
-  padding: 0.75em;
-}
-
-.fbssc_comment {
-  border-bottom: 1px solid #E0E0E0;
-  margin: 0.5em 0;
-  padding: 0.5em 0.25em 0.75em;
-}
-
-.fbssc .first {
-  margin: 0 0 0.5em;
-  padding: 0.25em 0.25em 0.75em;
-}
-
-.fbssc .last {
-  border-bottom: none;
-  padding: 0;
-}
-
-.fbssc_author {
-  display: inline;
-  padding-right: 0.5em;
-}
-
-.fbssc_text {
-  display: inline;
-  padding: 0.5em 0 0;
-}
-
-.fbssc_closure {
-  font-size: 90%;
-  margin-top: 0.25em;
-}
-
-.fbssc_closure span {
-  padding-right: 1em;
-}
-
-.fbssc_created {
-  font-style: italic;
-}
-
-.fbssc_form .resizable-textarea {
-  margin: 1.5em 1.5em 1em;
-}
-
-.fbssc_form .form-submit {
-  margin: 0 1.5em;
-}
-
-.fbssc_hide {
-  display: none;
-}
-
-/* The "Comment" link. */
-.fbssc_show_comment_form {
-  display: inline;
-  font-size: 90%;
-  margin-left: 0.5em;
-}
-.fbssc_show_comment_form_inner {
-  display: inline;
-  font-size: 90%;
-  margin-left: 2.25em;
-}
-
-/* The "Show all comments" link. */
-.fbssc_show_comments_link {
-  border-bottom: 1px solid #E0E0E0;
-  display: block;
-  font-size: 90%;
-  padding-bottom: 0.5em;
-}
-
-/* The "Show all comments" link when it expands instead of redirecting. */
-.fbssc_show_comments {}
diff -uprN -x CVS facebook_status-DRUPAL-6--3/submodules/fbssc/fbssc.edit.inc facebook_status/submodules/fbssc/fbssc.edit.inc
--- facebook_status-DRUPAL-6--3/submodules/fbssc/fbssc.edit.inc	2011-01-27 00:19:26.000000000 +0000
+++ facebook_status/submodules/fbssc/fbssc.edit.inc	1970-01-01 01:00:00.000000000 +0100
@@ -1,98 +0,0 @@
-<?php
-// $Id$
-
-/**
- * @file
- *   Edit and delete forms for the Facebook-style Statuses Comments module.
- */
-
-/**
- * The edit form for status comments.
- *
- * @param $comment
- *   The comment object for the status comment being edited.
- */
-function fbssc_edit($form_state, $comment) {
-  $form = array();
-  $form['status-comment-edit'] = array(
-    '#type' => 'textarea',
-    '#rows' => 3,
-    '#required' => TRUE,
-    '#default_value' => $comment->comment,
-  );
-  $form['save'] = array(
-    '#type' => 'submit',
-    '#value' => t('Update'),
-  );
-  $form['#cid'] = $comment->cid;
-  return $form;
-}
-
-/**
- * The submit handler for the edit form for status comments.
- */
-function fbssc_edit_submit($form, &$form_state) {
-  db_query("UPDATE {fbssc} SET comment = '%s' WHERE cid = %d", $form_state['values']['status-comment-edit'], $form['#cid']);
-  $c = fbssc_load($form['#cid']);
-  module_invoke_all('fbss_after_save', $c, TRUE);
-  if ($_GET['destination'] && $_GET['destinaton'] != 'fbssc/js') {
-    $form_state['redirect'] = $_GET['destination'];
-  }
-  else {
-    $form_state['redirect'] = '<front>';
-  }
-  drupal_set_message(t('Status comment has been successfully edited.'));
-}
-
-/**
- * The delete form for status comments.
- *
- * @param $comment
- *   The comment object for the status comment being deleted.
- */
-function fbssc_delete($form_state, $comment) {
-  $form = array();
-  $form['infotext'] = array(
-    '#value' => '<p>'. t('Are you sure you want to permanently delete the status comment %comment?',
-      array('%comment' => $comment->comment)) .'</p>'
-  );
-  $form['confirm'] = array(
-    '#type' => 'submit',
-    '#value' => t('Confirm'),
-    '#submit' => array('fbssc_delete_confirm'),
-  );
-  $form['back'] = array(
-    '#type' => 'submit',
-    '#value' => t('Cancel'),
-    '#submit' => array('fbssc_delete_cancel'),
-  );
-  $form['#cid'] = $comment->cid;
-  return $form;
-}
-
-/**
- * The confirmation submit handler for the delete form for status comments.
- */
-function fbssc_delete_confirm($form, &$form_state) {
-  fbssc_delete_comment($form['#cid']);
-  drupal_set_message(t('Status comment deleted.'));
-  if ($_GET['destination'] && $_GET['destinaton'] != 'fbssc/js') {
-    $form_state['redirect'] = $_GET['destination'];
-  }
-  else {
-    $form_state['redirect'] = '<front>';
-  }
-}
-
-/**
- * The cancellation submit handler for the delete form for status comments.
- */
-function fbssc_delete_cancel($form, &$form_state) {
-  drupal_set_message(t('Status comment was not deleted.'));
-  if ($_GET['destination'] && $_GET['destinaton'] != 'fbssc/js') {
-    $form_state['redirect'] = $_GET['destination'];
-  }
-  else {
-    $form_state['redirect'] = '<front>';
-  }
-}
diff -uprN -x CVS facebook_status-DRUPAL-6--3/submodules/fbssc/fbssc.info facebook_status/submodules/fbssc/fbssc.info
--- facebook_status-DRUPAL-6--3/submodules/fbssc/fbssc.info	2011-01-27 00:19:26.000000000 +0000
+++ facebook_status/submodules/fbssc/fbssc.info	1970-01-01 01:00:00.000000000 +0100
@@ -1,6 +0,0 @@
-; $Id$
-name = Facebook-style Statuses Comments
-description = "Allows comments on Facebook-style Statuses."
-dependencies[] = facebook_status
-package = Facebook-style Statuses
-core = 6.x
diff -uprN -x CVS facebook_status-DRUPAL-6--3/submodules/fbssc/fbssc.install facebook_status/submodules/fbssc/fbssc.install
--- facebook_status-DRUPAL-6--3/submodules/fbssc/fbssc.install	2011-01-27 00:19:27.000000000 +0000
+++ facebook_status/submodules/fbssc/fbssc.install	1970-01-01 01:00:00.000000000 +0100
@@ -1,72 +0,0 @@
-<?php
-// $Id$
-
-/**
- * @file
- *   Installs comments for Facebook-style Statuses.
- */
-
-/**
- * Implementation of hook_schema().
- */
-function fbssc_schema() {
-  $schema = array();
-  $schema['fbssc'] = array(
-    'description' => 'Comments on statuses.',
-    'fields' => array(
-      'cid' => array(
-        'type' => 'serial',
-        'not null' => TRUE,
-        'unsigned' => TRUE,
-        'description' => 'The Comment ID.',
-      ),
-      'sid' => array(
-        'type' => 'int',
-        'unsigned' => TRUE,
-        'not null' => TRUE,
-        'default' => 0,
-        'description' => 'The Status ID.',
-      ),
-      'uid' => array(
-        'type' => 'int',
-        'unsigned' => TRUE,
-        'not null' => TRUE,
-        'default' => 0,
-        'description' => 'The User ID of the poster of the comment.',
-      ),
-      'created' => array(
-        'type' => 'int',
-        'not null' => TRUE,
-        'default' => 0,
-        'description' => 'The time the comment was submitted.',
-      ),
-      'comment' => array(
-        'type' => 'text',
-        'not null' => TRUE,
-        'description' => 'The comment text.',
-      ),
-    ),
-    'indexes' => array(
-      'cid' => array('cid'),
-      'sid' => array('sid'),
-      'uid' => array('uid'),
-      'created' => array('created'),
-    ),
-    'primary key' => array('cid'),
-  );
-  return $schema;
-}
-
-/**
- * Implementation of hook_install().
- */
-function fbssc_install() {
-  drupal_install_schema('fbssc');
-}
-
-/**
- * Implementation of hook_uninstall().
- */
-function fbssc_uninstall() {
-  drupal_uninstall_schema('fbssc');
-}
diff -uprN -x CVS facebook_status-DRUPAL-6--3/submodules/fbssc/fbssc.js facebook_status/submodules/fbssc/fbssc.js
--- facebook_status-DRUPAL-6--3/submodules/fbssc/fbssc.js	2011-01-27 00:19:27.000000000 +0000
+++ facebook_status/submodules/fbssc/fbssc.js	1970-01-01 01:00:00.000000000 +0100
@@ -1,18 +0,0 @@
-// $Id$
-Drupal.behaviors.fbssc = function (context) {
-  $('.fbssc_show_comment_form').one('click', function() {
-    $(this).hide();
-    $('#'+ this.id +' + div').show();
-    return false;
-  });
-  $('.fbssc_show_comment_form_inner').one('click', function() {
-    $(this).hide();
-    $('#'+ this.id +' + div').show();
-    return false;
-  });
-  $('a.fbssc_show_comments').one('click', function() {
-    $(this).hide();
-    $('#'+ this.id +' ~ div.fbssc_hide').show();
-    return false;
-  });
-}
diff -uprN -x CVS facebook_status-DRUPAL-6--3/submodules/fbssc/fbssc.module facebook_status/submodules/fbssc/fbssc.module
--- facebook_status-DRUPAL-6--3/submodules/fbssc/fbssc.module	2011-01-27 00:19:26.000000000 +0000
+++ facebook_status/submodules/fbssc/fbssc.module	1970-01-01 01:00:00.000000000 +0100
@@ -1,664 +0,0 @@
-<?php
-// $Id$
-
-/**
- * @file
- *   Allows comments on Facebook-style Statuses.
- * @todo
- *   - Integrations:
- *       + activity (trigger/actions, token)
- *       + flag
- *       + rules
- *       + userpoints
- *       + devel generate
- *       + popups api
- *       + sms framework
- *       + views bulk operations
- *   - Document API and add README.txt.
- *   - Turn the comment theme functions into templates.
- */
-
-//=============
-//DRUPAL HOOKS.
-//=============
-
-/**
- * Implementation of hook_init().
- */
-function fbssc_init() {
-  if (strpos($_GET['q'], 'admin/build/views/edit') !== FALSE) {
-    $path = drupal_get_path('module', 'fbssc');
-    drupal_add_js($path .'/fbssc.js');
-    drupal_add_css($path .'/fbssc.css');
-  }
-}
-
-/**
- * Implementation of hook_menu().
- */
-function fbssc_menu() {
-  $items = array();
-  $items['statuses/comment/%fbssc/edit'] = array(
-    'title' => 'Edit status comment',
-    'page callback' => 'drupal_get_form',
-    'page arguments' => array('fbssc_edit', 2),
-    'access callback' => 'fbssc_can_edit',
-    'access arguments' => array(2),
-    'type' => MENU_CALLBACK,
-    'file' => 'fbssc.edit.inc',
-  );
-  $items['statuses/comment/%fbssc/delete'] = array(
-    'title' => 'Delete status comment',
-    'page callback' => 'drupal_get_form',
-    'page arguments' => array('fbssc_delete', 2),
-    'access callback' => 'fbssc_can_delete',
-    'access arguments' => array(2),
-    'type' => MENU_CALLBACK,
-    'file' => 'fbssc.edit.inc',
-  );
-  $items['fbssc/js/refresh'] = array(
-    'title' => 'Save status comment form',
-    'page callback' => 'fbssc_save_js',
-    'access arguments' => array('post status comment'),
-    'type' => MENU_CALLBACK,
-  );
-  return $items;
-}
-
-/**
- * Implementation of hook_user().
- */
-function fbssc_user($op, &$edit, &$account, $category = NULL) {
-  if ($op == 'delete') {
-    db_query("DELETE FROM {fbssc} WHERE uid = %d", $account->uid);
-  }
-}
-
-/**
- * Implementation of hook_perm().
- */
-function fbssc_perm() {
-  return array('delete all status comments',
-               'delete own status comments',
-               'delete comments on own statuses',
-               'edit all status comments',
-               'edit own status comments',
-               'edit comments on own statuses',
-               'post status comment',
-               'view all status comments',
-  );
-}
-
-/**
- * Implementation of hook_theme().
- */
-function fbssc_theme($existing, $type, $theme, $path) {
-  return array(
-    'fbssc_item' => array(
-      'arguments' => array(
-        'comment' => NULL,
-        'classes' => array(),
-        'destination' => '',
-      ),
-    ),
-    'fbssc_items' => array(
-      'arguments' => array(
-        'comments' => array(),
-        'delay_load' => TRUE,
-        'destination' => '',
-      ),
-    ),
-    'fbssc_form_display' => array(
-      'arguments' => array(
-        'sid' => NULL,
-        'delay_load_form' => TRUE,
-        'delay_load_comments' => TRUE,
-      ),
-    ),
-  );
-}
-
-//================
-//THEME FUNCTIONS.
-//================
-
-/**
- * Formats a comment.
- *
- * @param $comment
- *   The comment object.
- * @param $classes
- *   An array of extra classes to include in the comment status wrapper div.
- * @param $destination
- *   The destination query string for edit and delete links. Usually the current
- *   page unless this function is called from a JavaScript callback page.
- * @return
- *   The fully themed status comment or FALSE if the current user does not have
- *   permission to view the comment.
- */
-function theme_fbssc_item($comment, $classes = array(), $destination = '') {
-  if (!fbssc_can_view($comment)) {
-      return FALSE;
-  }
-  array_unshift($classes, 'fbssc_comment');
-  $classes = implode(' ', $classes);
-  $output = '<div class="'. $classes .'">';
-  $output .= '<div class="fbssc_author">'. theme('username', _facebook_status_user_load($comment->uid)) .'</div>';
-  $comment_text = _facebook_status_run_filter($comment->comment);
-  $comment_text = nl2br($comment_text);
-  $output .= '<div class="fbssc_text">'. $comment_text .'</div>';
-  $output .= '<div class="fbssc_closure">';
-  $output .= '<span class="fbssc_created">'. theme('facebook_status_time', $comment->created) .'</span>';
-  $q = $_GET['q'];
-  if ($destination) {
-    $q = $destination;
-  }
-  elseif (strpos($q, 'fbssc/js') !== FALSE) {
-    $q = '<front>';
-  }
-  if (fbssc_can_edit($comment)) {
-    $output .= '<span class="fbssc_edit_delete">'.
-      l(t('Edit'), 'statuses/comment/'. $comment->cid .'/edit', array('query' => array('destination' => $q)))
-      .'</span>';
-  }
-  if (fbssc_can_delete($comment)) {
-    $output .= '<span class="fbssc_edit_delete">'.
-      l(t('Delete'), 'statuses/comment/'. $comment->cid .'/delete', array('query' => array('destination' => $q)))
-      .'</span>';
-  }
-  $output .= '</div></div>';
-  // Invokes hook_fbssc_render_alter(&$output, $comment).
-  drupal_alter('fbssc_render', $output, $comment);
-  return $output;
-}
-
-/**
- * Displays a status comment thread.
- *
- * @param $comments
- *   An array of comment objects to display.
- * @param $delay_load
- *   If TRUE and there are no comments on the relevant status, a "show all
- *   comments" link will be displayed instead of the full list of comments. When
- *   clicked, the full list of comments will be shown for users with JavaScript
- *   enabled. Users with JavaScript disabled will be redirected to the status
- *   thread page. If FALSE the "comment" link (with the comment form hidden)
- *   will be used instead of just showing the comment form.
- * @param $destination
- *   The destination query string for edit and delete links. Usually the current
- *   page unless this function is called from a JavaScript callback page.
- * @return
- *   Themed HTML for the status comments.
- */
-function theme_fbssc_items($comments, $delay_load = TRUE, $destination = '') {
-  $count = count($comments);
-  if (!$count) {
-    return;
-  }
-  $path = drupal_get_path('module', 'fbssc');
-  drupal_add_js($path .'/fbssc.js');
-  $output = '<div class="fbssc">';
-  if ($count > 3 && $delay_load) {
-    $options = array('attributes' => array('class' => 'fbssc_show_comments_link fbssc_show_comments', 'id' => 'fbssc_toggle_'. $comments[0]->sid));
-    if ($count > 9) {
-      $options['attributes']['class'] = 'fbssc_show_comments_link';
-    }
-    $output .= l(t('Show all @count comments', array('@count' => $count)), 'statuses/'. $comments[0]->sid, $options);
-  }
-  foreach ($comments as $key => $comment) {
-    $classes = array();
-    if ($key == 0) {
-      $classes[] = 'first';
-    }
-    if ($key == $count - 1) {
-      $classes[] = 'last';
-    }
-    if ($key % 2 == 0) {
-      $classes[] = 'odd';
-    }
-    else {
-      $classes[] = 'even';
-    }
-    if ($count > 3 && $key != $count - 1 && $key != $count - 2 && $delay_load) {
-      $classes[] = 'fbssc_hide';
-    }
-    if (!$delay_load || $count < 10 || $key == $count - 1 || $key == $count - 2) {
-      $output .= theme('fbssc_item', $comment, $classes, $destination);
-    }
-  }
-  $output .= '</div>';
-  return $output;
-}
-
-/**
- * Displays the status comment form.
- *
- * @param $sid
- *   The Status ID of the comment thread.
- * @param $delay_load_form
- *   If TRUE and there are no comments on the relevant status, a "comment" link
- *   will be displayed instead of the comment form. When clicked, the form will
- *   be revealed for users with JavaScript enabled. Users with JavaScript
- *   disabled will be redirected to the status thread page. If FALSE the
- *   "comment" link will not be used and the comment form will not be initially
- *   hidden.
- * @param $delay_load_comments
- *   If TRUE and there are no comments on the relevant status, a "show all
- *   comments" link will be displayed instead of the full list of comments. When
- *   clicked, the full list of comments will be shown for users with JavaScript
- *   enabled. Users with JavaScript disabled will be redirected to the status
- *   thread page. If FALSE the "comment" link (with the comment form hidden)
- *   will be used instead of just showing the comment form.
- * @return
- *   Themed HTML for the status form.
- */
-function theme_fbssc_form_display($sid, $delay_load_form = TRUE, $delay_load_comments = TRUE) {
-  if (fbssc_can_post(facebook_status_load($sid))) {
-    $path = drupal_get_path('module', 'fbssc');
-    drupal_add_js($path .'/fbssc.js');
-    $output = '';
-    if ($delay_load_form && !fbssc_count_comments($sid)) {
-      $output = '<div class="fbssc_show_comment_form" id="fbssc_toggle_'. $sid .'">'.
-        l(t('Comment'), 'statuses/'. $sid, array('attributes' => array('class' => 'fbssc_show_comment_form_link')))
-        .'</div>';
-        return $output .'<div class="fbssc_hide fbssc_form">'. drupal_get_form('fbssc_box', $sid, $delay_load_comments) .'</div>';
-    }
-    return '<div class="fbssc_form">'. drupal_get_form('fbssc_box', $sid, $delay_load_comments) .'</div>';
-  }
-}
-
-//==============
-//API FUNCTIONS.
-//==============
-
-/**
- * Loads a status comment.
- *
- * @param $cid
- *   The status comment ID.
- * @return
- *   A full status comment object.
- */
-function fbssc_load($cid) {
-  if (!is_numeric($cid)) {
-    return;
-  }
-  return db_fetch_object(db_query("SELECT * FROM {fbssc} WHERE cid = %d", $cid));
-}
-
-/**
- * Retrieves the comments from a thread.
- *
- * @param $sid
- *   The Status ID of the thread for which to retrieve comments.
- * @return
- *   An array of comment objects for the relative thread.
- */
-function fbssc_get_comments($sid) {
-  $result = db_query("SELECT * FROM {fbssc} WHERE sid = %d ORDER BY created ASC, cid ASC", $sid);
-  $results = array();
-  while ($comment = db_fetch_object($result)) {
-    $results[] = $comment;
-  }
-  return $results;
-}
-
-/**
- * Saves a status comment.
- *
- * @param $comment
- *   The status comment object.
- * @return
- *   The saved status comment object.
- */
-function fbssc_save_comment($sid, $comment, $uid = NULL) {
-  if (!$uid) {
-    $uid = $GLOBALS['user']->uid;
-  }
-  $c = (object) array('sid' => $sid, 'uid' => $uid, 'created' => time(), 'comment' => $comment);
-  drupal_write_record('fbssc', $c);
-  module_invoke_all('fbss_after_save', $c, FALSE);
-  return $c;
-}
-
-/**
- * Deletes a status comment.
- *
- * @param $cid
- *   The comment ID.
- */
-function fbssc_delete_comment($cid) {
-  db_query("DELETE FROM {fbssc} WHERE cid = %d", $cid);
-  module_invoke_all('fbssc_delete', $cid);
-}
-
-/**
- * Counts the number of comments on a status.
- */
-function fbssc_count_comments($sid) {
-  return db_result(db_query("SELECT COUNT(cid) FROM {fbssc} WHERE sid = %d", $sid));
-}
-
-/**
- * Determines whether a user has commented on this status.
- *
- * @param $sid
- *   The Status ID of the thread for which to retrieve comments.
- * @param $uid
- *   The User ID of the user for whom to check participation. Defaults to the
- *   current user.
- * @return
- *   TRUE if the user has commented on this status; FALSE otherwise.
- */
-function fbssc_has_commented($sid, $uid = NULL) {
-  if (!$uid) {
-    $uid = $GLOBALS['user']->uid;
-  }
-  $result = db_result(db_query("SELECT COUNT(cid) FROM {fbssc} WHERE sid = %d and uid = %d", $sid, $uid));
-  return $result > 0;
-}
-
-/**
- * Determines whether a user can view the relevant status.
- *
- * @param $comment
- *   The comment object.
- * @param $account
- *   The $user object of the user whose access will be checked. Defaults to the
- *   current user.
- */
-function fbssc_can_view($comment, $account = NULL) {
-  if (empty($account)) {
-    $account = $GLOBALS['user'];
-  }
-  $allow = TRUE;
-  // Only change $allow if you need it to be FALSE.
-  // Do not set it to TRUE as this may override other modules' actions.
-  drupal_alter('fbssc_can_view', $allow, $comment, $account);
-  return $allow && user_access('view all status comments', $account);
-}
-
-/**
- * Determines whether a user can post a comment on the relevant status.
- *
- * @param $status
- *   The status object.
- * @param $account
- *   The $user object of the user whose access will be checked. Defaults to the
- *   current user.
- * @return
- *   TRUE if the user can post the comment; FALSE otherwise.
- */
-function fbssc_can_post($status, $account = NULL) {
-  if (empty($account)) {
-    $account = $GLOBALS['user'];
-  }
-  $allow = TRUE;
-  // Only change $allow if you need it to be FALSE.
-  // Do not set it to TRUE as this may override other modules' actions.
-  drupal_alter('fbssc_can_post', $allow, $status, $account);
-  return $allow && user_access('post status comment', $account);
-}
-
-/**
- * Determines whether a user can edit a comment on the relevant status.
- *
- * @param $comment
- *   The comment object.
- * @param $account
- *   The $user object of the user whose access will be checked. Defaults to the
- *   current user.
- * @return
- *   TRUE if the user can edit the comment; FALSE otherwise.
- */
-function fbssc_can_edit($comment, $account = NULL) {
-  if (empty($account)) {
-    $account = $GLOBALS['user'];
-  }
-  $allow = TRUE;
-  // Only change $allow if you need it to be FALSE.
-  // Do not set it to TRUE as this may override other modules' actions.
-  drupal_alter('fbssc_can_edit', $allow, $comment, $account);
-  // This is in two separate statements (instead of one big return statement)
-  // so that the SQL in _fbssc_get_thread_author() does not usually need to be run.
-  if ($allow && (user_access('edit all status comments', $account) ||
-    (user_access('edit own status comments', $account) && $account->uid == $comment->uid)
-  )) {
-    return TRUE;
-  }
-  return $allow && user_access('edit comments on own statuses', $account)
-    && $account->uid == _fbssc_get_thread_author($comment->sid);
-}
-
-/**
- * Determines whether a user can delete a comment on the relevant status.
- *
- * @param $comment
- *   The comment object.
- * @param $account
- *   The $user object of the user whose access will be checked. Defaults to the
- *   current user.
- * @return
- *   TRUE if the user can delete the comment; FALSE otherwise.
- */
-function fbssc_can_delete($comment, $account = NULL) {
-  if (empty($account)) {
-    $account = $GLOBALS['user'];
-  }
-  $allow = TRUE;
-  // Only change $allow if you need it to be FALSE.
-  // Do not set it to TRUE as this may override other modules' actions.
-  drupal_alter('fbssc_can_delete', $allow, $comment, $account);
-  // This is in two separate statements (instead of one big return statement)
-  // so that the SQL in _fbssc_get_thread_author() does not usually need to be run.
-  if ($allow && (user_access('delete all status comments', $account) ||
-    (user_access('delete own status comments', $account) && $account->uid == $comment->uid)
-  )) {
-    return TRUE;
-  }
-  return $allow && user_access('delete comments on own statuses', $account)
-    && $account->uid == _fbssc_get_thread_author($comment->sid);
-}
-
-//=================
-//HELPER FUNCTIONS.
-//=================
-
-/**
- * Determines the author of a status.
- *
- * @param $sid
- *   The Status ID of the thread in question.
- * @return
- *   The User ID of the author of the relevant status.
- */
-function _fbssc_get_thread_author($sid) {
-  return db_result(db_query("SELECT sender FROM {facebook_status} WHERE sid = %d", $sid));
-}
-
-//===============
-//FORM FUNCTIONS.
-//===============
-
-/**
- * The status comment form.
- *
- * @param $sid
- *   The Status ID of the thread.
- * @param $delay_load
- *   If TRUE and there are no comments on the relevant status, a "show all
- *   comments" link will be displayed instead of the full list of comments. When
- *   clicked, the full list of comments will be shown for users with JavaScript
- *   enabled. Users with JavaScript disabled will be redirected to the status
- *   thread page. If FALSE the "comment" link with delayed comment form loading
- *   will not be used.
- */
-function fbssc_box($form_state, $sid, $delay_load = TRUE) {
-  $path = drupal_get_path('module', 'fbssc');
-  drupal_add_css($path .'/fbssc.css');
-  $form = array();
-  if (!isset($form_state['fbssc']['q'])) {
-    $form['#qu'] = $_GET['q'];
-  }
-  else {
-    $form['#qu'] = $form_state['fbssc']['q'];
-  }
-  $comments = fbssc_get_comments($sid);
-  $form['before'] = array('#value' => '<div id="fbssc_replace_'. $sid .'">');
-  $form['comments'] = array('#value' => theme('fbssc_items', $comments, $delay_load, $form['#qu']));
-  if (count($comments)) {
-    $form['start-hide'] = array('#value' => '<div class="fbssc_show_comment_form_inner" id="fbssc_inner_toggle_'. $sid .'">'.
-      l(t('Comment'), 'statuses/'. $sid, array('attributes' => array('class' => 'fbssc_show_comment_inner_form_link')))
-      .'</div><div class="fbssc_hide fbssc_replace_inner_'. $sid .'">');
-  }
-  $form['status-comment'] = array(
-    '#type' => 'textarea',
-    '#rows' => 1,
-    '#required' => TRUE,
-  );
-  $form['save'] = array(
-    '#type' => 'submit',
-    '#value' => t('Comment'),
-    '#ahah' => array(
-      'path' => 'fbssc/js/refresh',
-      'wrapper' => 'fbssc_replace_'. $sid,
-      'effect' => 'fade',
-      'method' => 'replace',
-    ),
-  );
-  if (count($comments)) {
-    $form['end-hide'] = array('#value' => '</div>');
-  }
-  $form['after'] = array('#value' => '</div>');
-  $form['#sid'] = $sid;
-  if ($form_state['fbssc']['sid']) {
-    $form['#sid'] = $form_state['fbssc']['sid'];
-  }
-  return $form;
-}
-
-/**
- * The submit handler for the status comment form.
- */
-function fbssc_box_submit($form, &$form_state) {
-  $form_state['fbssc']['q'] = $form['#qu'];
-  $form_state['fbssc']['sid'] = $form['#sid'];
-  fbssc_save_comment($form['#sid'], $form_state['values']['status-comment']);
-  $form_state['rebuild'] = TRUE;
-}
-
-/**
- * Saves status comments via AHAH.
- */
-function fbssc_save_js() {
-  $form_state = array('storage' => NULL, 'submitted' => FALSE);
-  $form_build_id = $_POST['form_build_id'];
-  $form = form_get_cache($form_build_id, $form_state);
-  $form_state['post'] = $form['#post'] = $_POST;
-  $form['#programmed'] = $form['#redirect'] = FALSE;
-  $args = $form['#parameters'];
-  // This happens if someone goes directly to the JS processing page.
-  if (!is_array($args) && !$args) {
-    drupal_goto('user');
-    watchdog('facebook_status',
-      'Someone tried to access the JavaScript processing page for Facebook-style Statuses Comments directly.', array(), WATCHDOG_DEBUG);
-    return;
-  }
-  $form_id = array_shift($args);
-  drupal_process_form($form_id, $form, $form_state);
-  $form = drupal_rebuild_form($form_id, $form_state, $args, $form_build_id);
-  // Get HTML for the replacement form. Only these elements will be AHAH-refreshed.
-  $new_form['comments']       = $form['comments'];
-  $new_form['status-comment'] = $form['status-comment'];
-  $new_form['save']           = $form['save'];
-  $output = theme('status_messages') . drupal_render($new_form);
-  // Return the results.
-  drupal_json(array('status' => TRUE, 'data' => $output));
-}
-
-//=============
-//INTEGRATIONS.
-//=============
-
-/**
- * Implementation of hook_facebook_status_delete().
- */
-function fbssc_facebook_status_delete($sid) {
-  db_query("DELETE FROM {fbssc} WHERE sid = %d", $sid);
-}
-
-/**
- * Implementation of hook_facebook_status_render_components().
- */
-function fbssc_facebook_status_render_components($status) {
-  return array(
-    'comments' => array(
-      'type' => (arg(0) == 'statuses' && is_numeric(arg(1)) && !arg(2)) ? 'markup' : 'value',
-      'value' => theme('fbssc_form_display', $status->sid, FALSE, FALSE),
-      'weight' => 50,
-    ),
-  );
-}
-
-/**
- * Implementation of hook_views_api().
- */
-function fbssc_views_api() {
-  return array('api' => 2);
-}
-
-/**
- * Implementation of hook_views_default_views_alter().
- */
-function fbssc_views_default_views_alter(&$views) {
-  foreach ($views as $view) {
-    // We can't use the base_table property because some FBSS views are based on the {users} table.
-    if ($view->tag == 'facebook_status') {
-      // Do some trickery to make sure the comment box comes before the global:nothing field so that it's available as a token.
-      $s = $view->display['default']->display_options['fields']['nothing'];
-      unset($view->display['default']->display_options['fields']['nothing']);
-      // This won't work anywhere fields are overridden in the default views.
-      $view->display['default']->display_options['fields']['comment-box'] = array(
-        'label' => '',
-        'alter' => array(
-          'alter_text' => 0,
-          'text' => '',
-          'make_link' => 0,
-          'path' => '',
-          'link_class' => '',
-          'alt' => '',
-          'prefix' => '',
-          'suffix' => '',
-          'target' => '',
-          'help' => '',
-          'trim' => 0,
-          'max_length' => '',
-          'word_boundary' => 1,
-          'ellipsis' => 1,
-          'strip_tags' => 0,
-          'html' => 0,
-        ),
-        'empty' => '',
-        'hide_empty' => 0,
-        'empty_zero' => 0,
-        'exclude' => 1,
-        'id' => 'comment-box',
-        'table' => 'facebook_status',
-        'field' => 'comment-box',
-        'relationship' => 'none',
-        'override' => array(
-          'button' => 'Override',
-        ),
-      );
-      $view->display['default']->display_options['fields']['nothing'] = $s;
-      $t = $view->display['default']->display_options['fields']['nothing']['alter']['text'];
-      if (drupal_substr($t, -6) == '</div>') {
-        $t = drupal_substr($t, 0, -6) . ' [comment-box]</div>';
-      }
-      else {
-        $t .= "\n\n<div>[comment-box]</div>";
-      }
-      $view->display['default']->display_options['fields']['nothing']['alter']['text'] .= $t;
-    }
-  }
-}
diff -uprN -x CVS facebook_status-DRUPAL-6--3/submodules/fbssc/fbssc.views.inc facebook_status/submodules/fbssc/fbssc.views.inc
--- facebook_status-DRUPAL-6--3/submodules/fbssc/fbssc.views.inc	2011-01-27 00:19:27.000000000 +0000
+++ facebook_status/submodules/fbssc/fbssc.views.inc	1970-01-01 01:00:00.000000000 +0100
@@ -1,213 +0,0 @@
-<?php
-// $Id$
-
-/**
- * @file
- *   Provide views data and handlers for the Facebook-style Statuses module.
- */
-
-/**
- * Implementation of hook_views_data().
- */
-function fbssc_views_data() {
-  // Basic table information.
-  $data['fbssc']['table']['group']  = t('Facebook-style Statuses Comments');
-  $data['fbssc']['table']['join'] = array(
-    'users' => array(
-      'left_field' => 'uid',
-      'field' => 'uid',
-      'type' => 'INNER',
-    ),
-    'facebook_status' => array(
-      'left_field' => 'sid',
-      'field' => 'sid',
-      'type' => 'INNER',
-    ),
-  );
-
-  // Advertise this table as a possible base table.
-  $data['fbssc']['table']['base'] = array(
-    'field' => 'cid',
-    'title' => t('Facebook-style Statuses Comments'),
-    'help' => t('Stores status comments.'),
-    'weight' => 10,
-  );
-
-  // Alias for the FBSS Status ID to extend its use.
-  $data['facebook_status']['comment-box'] = array(
-    'title' => t('Status comment box'),
-    'help' => t('Shows the list of comments for the relevant status and the form to submit a new status comment.'),
-    'field' => array(
-      'field' => 'sid',
-      'handler' => 'fbssc_views_handler_field_comment_box',
-      'click sortable' => FALSE,
-    ),
-  );
-
-
-  // Declares the Comment ID column.
-  $data['fbssc']['cid'] = array(
-    'title' => t('Status Comment ID'),
-    'help' => t('The ID of the status comment.'),
-    'field' => array(
-      'handler' => 'views_handler_field',
-      'click sortable' => TRUE,
-    ),
-    'filter' => array(
-      'handler' => 'views_handler_filter_numeric',
-    ),
-    'sort' => array(
-      'handler' => 'views_handler_sort',
-    ),
-    'argument' => array(
-      'handler' => 'views_handler_argument_numeric',
-    ),
-  );
-
-  // Declares the Status ID column.
-  $data['fbssc']['sid'] = array(
-    'title' => t('Status ID'),
-    'help' => t('The ID of the status.'),
-    'field' => array(
-      'handler' => 'views_handler_field',
-      'click sortable' => TRUE,
-    ),
-    'filter' => array(
-      'handler' => 'views_handler_filter_numeric',
-    ),
-    'sort' => array(
-      'handler' => 'views_handler_sort',
-    ),
-    'argument' => array(
-      'handler' => 'views_handler_argument_numeric',
-    ),
-  );
-
-  // "Comment count."
-  $data['facebook_status']['comment-count'] = array(
-    'title' => t('Comment count'),
-    'help' => t('The number of comments on the status.'),
-    'field' => array(
-      'field' => 'sid',
-      'handler' => 'fbssc_views_handler_field_cc',
-      'click sortable' => TRUE,
-    ),
-  );
-
-  // "Comment count" with plural-sensitive string.
-  $data['facebook_status']['plural-comment-count'] = array(
-    'title' => t('Pluralized comment count'),
-    'help' => t('The number of comments on the status in words ("1 comment" or "N comments").'),
-    'field' => array(
-      'field' => 'sid',
-      'handler' => 'fbssc_views_handler_field_cc2',
-      'click sortable' => TRUE,
-    ),
-  );
-
-  // Declares the commenter's User ID column.
-  $data['fbssc']['uid'] = array(
-    'title' => t('User ID'),
-    'help' => t('The User ID of the status comment author.'),
-    'field' => array(
-      'handler' => 'views_handler_field',
-      'click sortable' => TRUE,
-    ),
-    'filter' => array(
-      'handler' => 'views_handler_filter_numeric',
-    ),
-    'sort' => array(
-      'handler' => 'views_handler_sort',
-    ),
-    'argument' => array(
-      'handler' => 'views_handler_argument_numeric',
-    ),
-  );
-
-  // Declares the status comment timestamp column.
-  $data['fbssc']['created'] = array(
-    'title' => t('Created time'),
-    'help' => t('The time the status comment was posted.'),
-    'field' => array(
-      'handler' => 'views_handler_field_date',
-      'click sortable' => TRUE,
-    ),
-    'sort' => array(
-      'handler' => 'views_handler_sort',
-    ),
-    'filter' => array(
-      'handler' => 'views_handler_filter_date',
-    ),
-  );
-
-  // Declares the status comment text column.
-  $data['fbssc']['comment'] = array(
-    'title' => t('Comment text'),
-    'help' => t('The text of the status comment.'),
-    'field' => array(
-      'handler' => 'views_handler_field',
-      'click sortable' => FALSE,
-    ),
-    'filter' => array(
-      'handler' => 'views_handler_filter_string',
-    ),
-  );
-
-  return $data;
-}
-
-/**
- * Implementation of hook_views_data_alter().
- */
-function fbssc_views_data_alter(&$data) {
-  $data['fbssc']['users'] = array(
-    'group' => t('Facebook-style Statuses Comments'),
-    'relationship' => array(
-      'title' => t('Users'),
-      'label' => t('Users'),
-      'help' => t('Add a relationship to gain access to information related to the users who submitted the relevant status comments.'),
-      'relationship table' => 'fbssc',
-      'relationship field' => 'uid',
-      'base' => 'users',
-      'field' => 'uid',
-      'type' => 'INNER',
-      'handler' => 'views_handler_relationship',
-    ),
-  );
-  $data['fbssc']['facebook_status'] = array(
-    'group' => t('Facebook-style Statuses Comments'),
-    'relationship' => array(
-      'title' => t('Statuses'),
-      'label' => t('Statuses'),
-      'help' => t('Add a relationship to gain access to information related to the statuses themselves.'),
-      'relationship table' => 'fbssc',
-      'relationship field' => 'sid',
-      'base' => 'facebook_status',
-      'field' => 'sid',
-      'type' => 'INNER',
-      'handler' => 'views_handler_relationship',
-    ),
-  );
-}
-
-/**
- * Implementation of hook_views_handlers().
- */
-function fbssc_views_handlers() {
-  return array(
-    'info' => array(
-      'path' => drupal_get_path('module', 'fbssc'),
-    ),
-    'handlers' => array(
-      'fbssc_views_handler_field_comment_box' => array(
-        'parent' => 'views_handler_field',
-      ),
-      'fbssc_views_handler_field_cc' => array(
-        'parent' => 'views_handler_field',
-      ),
-      'fbssc_views_handler_field_cc2' => array(
-        'parent' => 'views_handler_field',
-      ),
-    ),
-  );
-}
diff -uprN -x CVS facebook_status-DRUPAL-6--3/submodules/fbssc/fbssc_views_handler_field_cc.inc facebook_status/submodules/fbssc/fbssc_views_handler_field_cc.inc
--- facebook_status-DRUPAL-6--3/submodules/fbssc/fbssc_views_handler_field_cc.inc	2011-01-27 00:19:26.000000000 +0000
+++ facebook_status/submodules/fbssc/fbssc_views_handler_field_cc.inc	1970-01-01 01:00:00.000000000 +0100
@@ -1,18 +0,0 @@
-<?php
-// $Id$
-
-/**
- * @file
- *   Provides a "comment count" view field handler.
- */
-
-/**
- * Implements the "comment count" field.
- */
-class fbssc_views_handler_field_cc extends views_handler_field {
-  function render($values) {
-    $sid = $values->{$this->field_alias};
-    $count = db_result(db_query("SELECT COUNT(cid) FROM {fbssc} WHERE sid = %d", $sid));
-    return $count;
-  }
-}
diff -uprN -x CVS facebook_status-DRUPAL-6--3/submodules/fbssc/fbssc_views_handler_field_cc2.inc facebook_status/submodules/fbssc/fbssc_views_handler_field_cc2.inc
--- facebook_status-DRUPAL-6--3/submodules/fbssc/fbssc_views_handler_field_cc2.inc	2011-01-27 00:19:26.000000000 +0000
+++ facebook_status/submodules/fbssc/fbssc_views_handler_field_cc2.inc	1970-01-01 01:00:00.000000000 +0100
@@ -1,18 +0,0 @@
-<?php
-// $Id$
-
-/**
- * @file
- *   Provides a "comment count" view field handler.
- */
-
-/**
- * Implements the "comment count" field.
- */
-class fbssc_views_handler_field_cc2 extends views_handler_field {
-  function render($values) {
-    $sid = $values->{$this->field_alias};
-    $count = db_result(db_query("SELECT COUNT(cid) FROM {fbssc} WHERE sid = %d", $sid));
-    return format_plural($count, '1 comment', '@count comments');
-  }
-}
diff -uprN -x CVS facebook_status-DRUPAL-6--3/submodules/fbssc/fbssc_views_handler_field_comment_box.inc facebook_status/submodules/fbssc/fbssc_views_handler_field_comment_box.inc
--- facebook_status-DRUPAL-6--3/submodules/fbssc/fbssc_views_handler_field_comment_box.inc	2011-01-27 00:19:27.000000000 +0000
+++ facebook_status/submodules/fbssc/fbssc_views_handler_field_comment_box.inc	1970-01-01 01:00:00.000000000 +0100
@@ -1,16 +0,0 @@
-<?php
-// $Id$
-
-/**
- * @file
- *   Formats the status comment update form in Views.
- */
-
-/**
- * Field handler to add the status comment update form.
- */
-class fbssc_views_handler_field_comment_box extends views_handler_field {
-  function render($values) {
-    return theme('fbssc_form_display', $values->facebook_status_sid, TRUE, TRUE);
-  }
-}
