diff -u -p1 -r -N -b -B -w facebook_status_6_3/README.txt screamwork_fbss7/README.txt
--- facebook_status_6_3/README.txt	2011-04-09 19:23:26.519616400 -0400
+++ screamwork_fbss7/README.txt	2011-05-25 20:53:28.000000000 -0400
@@ -1,12 +1,20 @@
 
-The Facebook-style Statuses module allows posting messages to "streams"
-attached to various entities, just like Facebook's "walls."
+what to do:
+===========
+
+for now able to enable:
+
+facebook_status module
+facebook_status_pathauto submodule
+facebook_status_tags submodule
+facebook_status_activity
+facebook_status_comments
+
+known issues at the moment:
+
+facebook_status_comment:
+on reply link the comment box shows.
+
+facebook_status:
+when editing a status error after reload it works.
 
-Extensive admin documentation is available at http://drupal.org/node/421128
-Thorough API/developer documentation is at http://drupal.org/node/421336
-Visit the project page at http://drupal.org/project/facebook_status
-Check out the issue queue at http://drupal.org/project/issues/facebook_status
-
-Isaac Sukin (IceCreamYou) wrote and maintains this module.
-Contact him at http://drupal.org/user/201425/contact
-or visit his website at http://www.isaacsukin.com/blog.
\ No newline at end of file
diff -u -p1 -r -N -b -B -w facebook_status_6_3/api.php screamwork_fbss7/api.php
--- facebook_status_6_3/api.php	2011-06-02 12:05:01.118420700 -0400
+++ screamwork_fbss7/api.php	2011-05-25 20:53:28.000000000 -0400
@@ -8,12 +8,33 @@
 /**
- * React to a status being saved.
+ * Alter user access.
+ *
+ * @param $allow
+ *   Whether the action is permitted to be taken. Change this only if you can
+ *   decide conclusively that the action is definitely (not) permitted.
+ * @param $op
+ *   The action being taken. One of add, converse, delete, edit, view,
+ *   view_stream.
+ * @param $args
+ *   An array of additional arguments. Varies depending on $op.
+ * @see facebook_status_user_access()
+ */
+function hook_facebook_status_user_access_alter(&$allow, $op, $args) {
+  global $user;
+  switch ($op) {
+    case 'add':
+      $recipient = isset($args[0]) ? $args[0] : $user;
+      $type = isset($args[1]) ? $args[1] : 'user';
+      $sender = isset($args[2]) ? $args[2] : $user;
+      $context = facebook_status_determine_context($type);
+      //Updating one's own status should ALWAYS be allowed.
+      if ($type == 'user' && $context['handler']->recipient_id($recipient) == $sender->uid) {
+        $allow = TRUE;
+      }
+      break;
+  }
+}
+
+/**
+ * Alter status save options.
  *
- * @param $status
- *   The status object that was just saved.
- * @param $context
- *   The stream context array.
- * @param $edit
- *   TRUE if the incoming status was just edited; FALSE if the status is
- *   entirely new. Note that editing can mean either saving the edit form or
- *   overwriting a previous status by timed override.
  * @param $options
@@ -26,11 +47,11 @@
  * @see facebook_status_save_status()
- * @see facebook_status_edit_submit()
  */
-function hook_facebook_status_save($status, $context, $edit, $options) {
-  if ($edit) {
-    drupal_set_message(t('The status message has been saved.'));
-  }
-  else {
-    drupal_set_message(t('The status message has been updated.'));
+function hook_facebook_status_save_options($options) {
+  //If we allow saving attachments with statuses, then we could have different
+  //attachments with the same message, so we need to allow saving statuses with
+  //duplicate messages.
+  if (module_exists('fbsmp')) {
+    $options['discard duplicates'] = FALSE;
   }
+  return;
 }
@@ -38,17 +59,14 @@ function hook_facebook_status_save($stat
 /**
- * React to a status being deleted.
+ * Alter status links.
  *
+ * @param $links
+ *   A structured array as returned by implementations of hook_link().
  * @param $status
- *   The status object to delete.
- * @param $meta
- *   An array of metadata that affects what behaviors are triggered from this
- *   function. There are no default options, but other modules may use them.
- *   For example, the Facebook-style Micropublisher module makes use of a
- *   "has attachment" option, which denotes whether the status that is being
- *   deleted has attached media.
- * @see facebook_status_delete_status()
+ *   A status object.
+ * @see _facebook_status_show()
  */
-function hook_facebook_status_delete($status, $meta = array()) {
-  if (module_exists('facebook_status_tags')) {
-    db_query("DELETE FROM {facebook_status_tags} WHERE sid = %d", $status->sid);
+function hook_facebook_status_link_alter(&$links, $status) {
+  //Capitalize the first letter of every link.
+  foreach ($links as $type => $data) {
+    $links[$type]['title'] = drupal_ucfirst($links[$type]['title']);
   }
@@ -77,16 +95,2 @@ function hook_facebook_status_delete($st
  *   - view (optional): The default view to use as the context stream.
- *   - visibility (optional): Flag to indicate how to apply contexts on pages.
- *     - -1: Use module default settings
- *     - 0: Show on all pages except listed pages
- *     - 1: Show only on listed pages
- *     - 2: Use custom PHP code to determine visibility
- *     - 3: Use the conditions from a Context from the Context module
- *   - pages (optional): Either a list of paths on which to include/exclude the
- *     context or PHP code, depending on "visibility" setting. Visibility and
- *     pages provide a user-facing way of overriding the is_applicable()
- *     function of the context handler.
- *   - context (optional): A Context defined by the Context module whose
- *     conditions should be used to determine whether the stream context
- *     applies on this page if the "visibility" flag is set appropriately.
- *     Overrides the is_applicable() function of the context handler.
  *   - weight (optional): The default precedence of the context type.
@@ -119,2 +123,42 @@ function hook_facebook_status_context_in
 /**
+ * React to a status being deleted.
+ *
+ * @param $sid
+ *   The status ID.
+ * @see facebook_status_delete_status()
+ */
+function hook_facebook_status_delete($sid) {
+  if (module_exists('facebook_status_tags')) {
+    // TODO Please review the conversion of this statement to the D7 database API syntax.
+    /* db_query("DELETE FROM {facebook_status_tags} WHERE sid = %d", $sid) */
+    db_delete('facebook_status_tags')
+  ->condition('sid', $sid)
+  ->execute();
+  }
+}
+
+/**
+ * React to a status being saved.
+ *
+ * @param $status
+ *   The status object that was just saved.
+ * @param $context
+ *   The stream context array.
+ * @param $edit
+ *   TRUE if the incoming status was just edited; FALSE if the status is
+ *   entirely new. Note that editing can mean either saving the edit form or
+ *   overwriting a previous status by timed override.
+ * @see facebook_status_save_status()
+ * @see facebook_status_edit_submit()
+ */
+function hook_facebook_status_save($status, $context, $edit) {
+  if ($edit) {
+    drupal_set_message(t('The status message has been saved.'));
+  }
+  else {
+    drupal_set_message(t('The status message has been updated.'));
+  }
+}
+
+/**
  * Return a list of DOM selectors whose contents FBSS should automatically
@@ -130,3 +174,2 @@ function hook_facebook_status_context_in
  * @see theme_facebook_status_form_display()
- * @see hook_facebook_status_refresh_selectors_alter()
  */
@@ -150,125 +193,2 @@ function hook_facebook_status_refresh_se
  * @see facebook_status_link()
- * @see _facebook_status_show()
- */
-if (!function_exists('hook_link')) {
-  function hook_link($type, $object, $teaser = FALSE) {
-    $links = array();
-    if ($type == 'facebook_status') {
-      $status = $object;
-      $links['permalink'] = array(
-        'href' => 'statuses/'. $status->sid,
-        'title' => t('Permalink'),
-      );
-    }
-    return $links;
-  }
-}
-
-/**
- * Alter status links.
- *
- * @param $links
- *   A structured array as returned by implementations of hook_link().
- * @param $status
- *   A status object.
- * @see _facebook_status_show()
- */
-function hook_facebook_status_link_alter(&$links, $status) {
-  //Capitalize the first letter of every link.
-  foreach ($links as $type => $data) {
-    $links[$type]['title'] = drupal_ucfirst($links[$type]['title']);
-  }
-}
-
-/**
- * Alter status save options.
- *
- * @param $options
- *   An associative array containing:
- *   - discard duplicates: Whether a new status containing exactly the same
- *     message as the previous status will be saved or discarded.
- *   - timed override: Whether a status update will be overwritten if a new one
- *     is submitted within FACEBOOK_STATUS_OVERRIDE_TIMER seconds.
- *   - discard blank statuses: Whether blank status messages will be discarded.
- * @param $edit
- *   TRUE if the status is being edited; FALSE if it is being created.
- * @see facebook_status_save_status()
- */
-function hook_facebook_status_save_options_alter(&$options, $edit) {
-  //If we allow saving attachments with statuses, then we could have different
-  //attachments with the same message, so we need to allow saving statuses with
-  //duplicate messages.
-  if (module_exists('fbsmp')) {
-    $options['discard duplicates'] = FALSE;
-  }
-}
-
-/**
- * Alter user access.
- *
- * @param $allow
- *   Whether the action is permitted to be taken. Change this only if you can
- *   decide conclusively that the action is definitely (not) permitted.
- * @param $op
- *   The action being taken. One of add, converse, delete, edit, view,
- *   view_stream, generate.
- * @param $args
- *   An array of additional arguments. Varies depending on $op.
- * @see facebook_status_user_access()
- */
-function hook_facebook_status_user_access_alter(&$allow, $op, $args) {
-  global $user;
-  switch ($op) {
-    case 'add':
-      $recipient = isset($args[0]) ? $args[0] : $user;
-      $type = isset($args[1]) ? $args[1] : 'user';
-      $sender = isset($args[2]) ? $args[2] : $user;
-      $context = facebook_status_determine_context($type);
-      //Updating one's own status should ALWAYS be allowed.
-      if ($type == 'user' && $context['handler']->recipient_id($recipient) == $sender->uid) {
-        $allow = TRUE;
-      }
-      break;
-  }
-}
-
-/**
- * Add items to the AHAH-refreshed form.
- *
- * Anything on the old form that needs to remain on the new form needs to be
- * moved.
- *
- * @param $new_form
- *   The FAPI array representing the form that will replace the existing one
- *   via AHAH.
- * @param $old_form
- *   The FAPI array representing the form that will be replaced via AHAH.
- * @see facebook_status_save_js()
  */
-function hook_facebook_status_form_ahah_alter(&$new_form, $old_form) {
-  $new_form['slider']      = $form['slider'];
-  $new_form['fbss-status'] = $form['fbss-status'];
-  $new_form['chars']       = $form['chars'];
-  $new_form['fbss-submit'] = $form['fbss-submit'];
-  $new_form['sdefault']    = $form['sdefault'];
-}
-
-/**
- * Alter the refresh selectors.
- *
- * Refresh selectors are DOM paths that specify regions of the page that should
- * be automatically refreshed via AHAH when a status is submitted.
- *
- * @param $selectors
- *   An array of DOM paths.
- * @param $recipient
- *   The entity which would receive a status message if one were posted on the
- *   current page.
- * @param
- *   The type of recipient.
- * @see theme_facebook_status_form_display()
- * @see hook_facebook_status_refresh_selectors()
- */
-function hook_facebook_status_refresh_selectors_alter(&$selectors, $recipient, $type) {
-  $selectors[] = '.view-facebook_status-all';
-}
diff -u -p1 -r -N -b -B -w facebook_status_6_3/facebook_status.author-pane.inc screamwork_fbss7/facebook_status.author-pane.inc
--- facebook_status_6_3/facebook_status.author-pane.inc	2011-04-09 19:23:26.520616500 -0400
+++ screamwork_fbss7/facebook_status.author-pane.inc	2011-05-25 20:53:28.000000000 -0400
@@ -9,3 +9,3 @@
 /**
- * Implementation of hook_preprocess_author_pane().
+ * Implements hook_preprocess_author_pane().
  */
@@ -28,3 +28,3 @@ function facebook_status_preprocess_auth
     //The formatted time the status was submitted.
-    $variables['facebook_status_time'] = theme('facebook_status_time', $status->created);
+    $variables['facebook_status_time'] = theme('facebook_status_time', array('time' => $status->created));
   }
diff -u -p1 -r -N -b -B -w facebook_status_6_3/facebook_status.info screamwork_fbss7/facebook_status.info
--- facebook_status_6_3/facebook_status.info	2011-04-09 19:23:26.520616500 -0400
+++ screamwork_fbss7/facebook_status.info	2011-05-25 20:53:28.000000000 -0400
@@ -4,2 +4,38 @@ package = Facebook-style Statuses
 dependencies[] = views
-core = 6.x
+core = 7.x
+
+files[] = api.php
+files[] = facebook_status.author-pane.inc
+files[] = facebook_status.install
+files[] = facebook_status.module
+files[] = includes/facebook_status.preprocess.inc
+files[] = includes/ctools/content_types/facebook_status_stream.inc
+files[] = utility/facebook_status.access.inc
+files[] = utility/facebook_status.admin.inc
+files[] = utility/facebook_status.announce.inc
+files[] = utility/facebook_status.contexts.inc
+files[] = utility/facebook_status.conversation.inc
+files[] = utility/facebook_status.edit.inc
+files[] = utility/facebook_status.form.inc
+files[] = utility/facebook_status.generate.inc
+files[] = includes/views/facebook_status.views.inc
+files[] = includes/views/facebook_status.views_default.inc
+files[] = includes/views/handlers/facebook_status_views_handler_argument_flagged_user.inc
+files[] = includes/views/handlers/facebook_status_views_handler_argument_participant.inc
+files[] = includes/views/handlers/facebook_status_views_handler_field_created.inc
+files[] = includes/views/handlers/facebook_status_views_handler_field_cross.inc
+files[] = includes/views/handlers/facebook_status_views_handler_field_cross_pic.inc
+files[] = includes/views/handlers/facebook_status_views_handler_field_delete.inc
+files[] = includes/views/handlers/facebook_status_views_handler_field_edit.inc
+files[] = includes/views/handlers/facebook_status_views_handler_field_message.inc
+files[] = includes/views/handlers/facebook_status_views_handler_field_recipient.inc
+files[] = includes/views/handlers/facebook_status_views_handler_field_recipient_pic.inc
+files[] = includes/views/handlers/facebook_status_views_handler_field_repost.inc
+files[] = includes/views/handlers/facebook_status_views_handler_field_respond.inc
+files[] = includes/views/handlers/facebook_status_views_handler_filter_autotype.inc
+files[] = includes/views/handlers/facebook_status_views_handler_filter_flagged_user.inc
+files[] = includes/views/handlers/facebook_status_views_handler_filter_latest_only.inc
+files[] = includes/views/handlers/facebook_status_views_handler_filter_not_own.inc
+files[] = includes/views/handlers/facebook_status_views_handler_filter_own.inc
+files[] = includes/views/handlers/facebook_status_views_handler_filter_participant.inc
+files[] = includes/views/handlers/facebook_status_views_plugin_row_rss.inc
diff -u -p1 -r -N -b -B -w facebook_status_6_3/facebook_status.install screamwork_fbss7/facebook_status.install
--- facebook_status_6_3/facebook_status.install	2011-06-10 11:57:28.014839500 -0400
+++ screamwork_fbss7/facebook_status.install	2011-05-25 20:53:28.000000000 -0400
@@ -7,4 +7,12 @@
 
+ 
+ /**
+  * Implements hook_install().
+  */
+function facebook_status_install() {
+}
+ 
+
 /**
- * Implementation of hook_schema().
+ * Implements hook_schema().
  */
@@ -33,3 +41,3 @@ function facebook_status_schema() {
         'default' => 0,
-        'description' => 'The ID of the entity that received the status message.',
+        'description' => 'The ID of the entity that received the status message..',
       ),
@@ -62,11 +70,4 @@ function facebook_status_schema() {
   );
-  $schema += _facebook_status_contexts_schema();
-  return $schema;
-}
 
-/**
- * Specifies the schema for the contexts table.
- */
-function _facebook_status_contexts_schema() {
-  $schema = array();
+  
   $schema['facebook_status_contexts'] = array(
@@ -100,22 +101,2 @@ function _facebook_status_contexts_schem
       ),
-      'visibility' => array(
-        'type' => 'int',
-        'not null' => TRUE,
-        'default' => -1,
-        'size' => 'tiny',
-        'description' => 'Flag to indicate how to apply contexts on pages. '.
-          '(-1 = Use module default settings, 0 = Show on all pages except listed pages, 1 = Show only on listed pages, 2 = Use custom PHP code to determine visibility, 3 = use a Context)',
-      ),
-      'pages' => array(
-        'type' => 'text',
-        'not null' => TRUE,
-        'description' => 'Contains either a list of paths on which to include/exclude the context or PHP code, depending on "visibility" setting.',
-      ),
-      'context' => array(
-        'description' => 'The primary identifier for a context.',
-        'type' => 'varchar',
-        'length' => 255,
-        'not null' => TRUE,
-        'default' => '',
-      ),
     ),
@@ -126,260 +107,15 @@ function _facebook_status_contexts_schem
   );
-  return $schema;
-}
 
-/**
- * Implementation of hook_install().
- */
-function facebook_status_install() {
-  drupal_install_schema('facebook_status');
-}
-
-/**
- * Implementation of hook_update_N().
- */
-function facebook_status_update_6300() {
-  // Remove old variables.
-  variable_del('facebook_status_profile_view');
-  variable_del('facebook_status_special_user');
-  variable_del('facebook_status_hide_status');
-  variable_del('facebook_status_flag_update');
-  variable_del('facebook_status_flood_user');
-  variable_del('facebook_status_hide_blank');
-  variable_del('facebook_status_size_long');
-  variable_del('facebook_status_default');
-  variable_del('facebook_status_exclude');
-  variable_del('facebook_status_concat');
-  variable_del('facebook_status_legacy');
-  variable_del('facebook_status_size');
-  variable_del('facebook_status_type');
-
-  $ret = array();
-
-  // Drop current indexes.
-  db_drop_index($ret, 'facebook_status', 'uid');
-  db_drop_index($ret, 'facebook_status', 'pid');
-  db_drop_index($ret, 'facebook_status', 'status_time');
-
-  // Rename fields and add 'type'.
-  db_change_field($ret, 'facebook_status', 'uid', 'recipient', array(
-    'type' => 'int',
-    'unsigned' => TRUE,
-    'not null' => TRUE,
-    'default' => 0,
-    'description' => 'The ID of the entity that received the status message.',
-  ));
-  db_change_field($ret, 'facebook_status', 'pid', 'sender', array(
-    'type' => 'int',
-    'unsigned' => TRUE,
-    'not null' => TRUE,
-    'default' => 0,
-    'description' => 'The User ID of the user who created the status message.',
-  ));
-  db_change_field($ret, 'facebook_status', 'status_time', 'created', array(
-    'type' => 'int',
-    'unsigned' => TRUE,
-    'not null' => TRUE,
-    'default' => 0,
-    'description' => 'The time the status message was saved.',
-  ));
-  db_change_field($ret, 'facebook_status', 'status', 'message', array(
-    'type' => 'text',
-    'not null' => TRUE,
-    'description' => 'The status message.',
-  ));
-  db_add_field($ret, 'facebook_status', 'type', array(
-    'type' => 'varchar',
-    'length' => 255,
-    'not null' => TRUE,
-    'default' => '',
-    'description' => 'The stream context type.',
-  ));
-
-  // Add indexes again.
-  db_add_index($ret, 'facebook_status', 'recipient', array('recipient'));
-  db_add_index($ret, 'facebook_status', 'sender', array('sender'));
-  db_add_index($ret, 'facebook_status', 'created', array('created'));
-  db_add_index($ret, 'facebook_status', 'type', array('type'));
-
-  // Update the type field in existing records.
-  $ret[] = update_sql("UPDATE {facebook_status} SET type = 'user'");
-
-  // Create the contexts table.
-  if (!db_table_exists('facebook_status_contexts')) {
-    $schema = _facebook_status_contexts_schema();
-    db_create_table($ret, 'facebook_status_contexts', $schema['facebook_status_contexts']);
-  }
-
-  // Update tokens used in Pathauto.
-  $old = array(
-    '[owner]',
-    '[owner-name]',
-    '[owner-name-raw]',
-    '[owner-id]',
-    '[poster]',
-    '[poster-name]',
-    '[poster-name-raw]',
-    '[poster-id]',
-    '[status-unformatted]',
-    '[status-formatted]',
-    '[status-raw]',
-    '[status-themed]',
-    '[status-id]',
-    '[status-edit]',
-    '[status-delete]',
-    '[status-time]',
-  );
-  $new = array(
-    '[sender-themed]',
-    '[sender-name]',
-    '[sender-name-raw]',
-    '[sender-uid]',
-    '[recipient-link]',
-    '[recipient-name]',
-    '[recipient-name-raw]',
-    '[recipient-id]',
-    '[message-unformatted]',
-    '[message-formatted]',
-    '[message-raw]',
-    '[status-themed]',
-    '[status-id]',
-    '[status-edit]',
-    '[status-delete]',
-    '[created]',
-  );
-  $result = db_query("SELECT name FROM {variable} WHERE name LIKE 'pathauto\\_facebook\\_status\\_%%'");
-  while ($variable = db_fetch_object($result)) { 
-    $name = $variable->name;
-    if ($value = variable_get($name, NULL)) {
-      $value = str_replace($old, $new, $value);
-      variable_del($name);
-      $name = str_replace('facebook_status', 'fbss_pathauto', $name);
-      variable_set($name, $value);
-    }
-  }
-
-  // If the legacy fbssc module exists, upgrade it to the fbss_comments module.
-  if (module_exists('fbssc') && !module_exists('fbss_comments')) {
-    module_disable(array('fbssc'));
-    drupal_install_modules(array('fbss_comments'));
-  }
-
-  $modules_to_install = array();
-  // If the Activity integration was in use in the 2.x branch, enable the fbss_activity submodule.
-  if (module_exists('activity') && !module_exists('fbss_activity')) {
-    $count = db_result(db_query("SELECT COUNT(*) FROM {activity} WHERE type = 'facebook_status'"));
-    if ($count > 0) {
-      $modules_to_install[] = 'fbss_activity';
-    }
-  }
-
-  // If the Flag integration was in use in the 2.x branch, enable the fbss_flag submodule.
-  if (module_exists('flag') && !module_exists('fbss_flag')) {
-    $count = db_result(db_query("SELECT COUNT(*) FROM {flags} WHERE content_type = 'facebook_status'"));
-    if ($count > 0) {
-      $modules_to_install[] = 'fbss_flag';
-    }
-  }
-
-  // If the Mollom integration was in use in the 2.x branch, enable the fbss_mollom submodule.
-  if (module_exists('mollom') && db_table_exists('mollom_form') && !module_exists('fbss_mollom')) {
-    $count = db_result(db_query("SELECT COUNT(*) FROM {mollom_form} WHERE module = 'facebook_status'"));
-    if ($count > 0) {
-      $modules_to_install[] = 'fbss_mollom';
-    }
-  }
-
-  // If the Pathauto integration was in use in the 2.x branch, enable the fbss_pathauto submodule.
-  if (module_exists('pathauto') && !module_exists('fbss_pathauto')) {
-    // We check variables named with "fbss_pathauto" instead of "facebook_status" because we already converted them above.
-    $count = db_result(db_query("SELECT COUNT(*) FROM {variable} WHERE name LIKE 'pathauto\\_fbss\\_pathauto\\_%%'"));
-    if ($count > 0) {
-      $modules_to_install[] = 'fbss_pathauto';
-    }
-  }
-
-  // If the Rules integration was in use in the 2.x branch, enable the fbss_rules submodule.
-  if (module_exists('rules') && !module_exists('fbss_rules')) {
-    $count = (int) db_result(db_query("SELECT COUNT(*) FROM {rules_rules} WHERE name LIKE 'facebook\\_status%%'"));
-    $count += (int) db_result(db_query("SELECT COUNT(*) FROM {rules_sets} WHERE name LIKE 'facebook\\_status%%'"));
-    if ($count > 0) {
-      $modules_to_install[] = 'fbss_rules';
-    }
-  }
-
-  // There is no good way to detect whether the Twitter integration was in use in the 2.x branch.
-  // However, since it would have been available by default, let's just enable it.
-  if (module_exists('twitter') && module_exists('oauth') && !module_exists('fbss_twitter')) {
-    $modules_to_install[] = 'fbss_twitter';
-  }
-
-  // If the Userpoints integration was in use in the 2.x branch, enable the fbss_userpoints submodule.
-  if (module_exists('userpoints') && !module_exists('fbss_userpoints')) {
-    $count = db_result(db_query("SELECT COUNT(*) FROM {userpoints_txn} WHERE operation LIKE 'facebook\\_status%%'"));
-    if ($count > 0) {
-      $modules_to_install[] = 'fbss_userpoints';
-    }
-  }
-
-  drupal_install_modules($modules_to_install);
-  return $ret;
+  return $schema;
 }
 
-/**
- * Implementation of hook_update_N().
- */
-function facebook_status_update_6301() {
-  $text = variable_get('facebook_status_repost', 'Re: @name @message ');
-  $text = str_replace('@status', '@message', $text);
-  variable_set('facebook_status_repost', $text);
-  return array();
-}
 
 /**
- * Implementation of hook_update_N().
+ * Implements hook_uninstall().
  */
-function facebook_status_update_6302() {
-  $ret = array();
-  if (!db_column_exists('facebook_status_contexts', 'visibility')) {
-    db_add_field($ret, 'facebook_status_contexts', 'visibility', array(
-      'type' => 'int',
-      'not null' => TRUE,
-      'default' => -1,
-      'size' => 'tiny',
-      'description' => 'Flag to indicate how to apply contexts on pages. (-1 = Use module default settings, 0 = Show on all pages except listed pages, 1 = Show only on listed pages, 2 = Use custom PHP code to determine visibility)',
-    ));
-  }
-  if (!db_column_exists('facebook_status_contexts', 'pages')) {
-    db_add_field($ret, 'facebook_status_contexts', 'pages', array(
-      'type' => 'text',
-      'not null' => TRUE,
-      'description' => 'Contains either a list of paths on which to include/exclude the context or PHP code, depending on "visibility" setting.',
-    ));
-  }
-  return $ret;
-}
+function facebook_status_uninstall() {
 
-/**
- * Implementation of hook_update_N().
- */
-function facebook_status_update_6303() {
-  $ret = array();
-  if (!db_column_exists('facebook_status_contexts', 'context')) {
-    db_add_field($ret, 'facebook_status_contexts', 'context', array(
-      'description' => 'The primary identifier for a context.',
-      'type' => 'varchar',
-      'length' => 255,
-      'not null' => TRUE,
-      'default' => '',
-    ));
-  }
-  return $ret;
-}
+  db_drop_table('facebook_status');
+  db_drop_table('facebook_contexts');
 
-/**
- * Implementation of hook_uninstall().
- */
-function facebook_status_uninstall() {
-  drupal_uninstall_schema('facebook_status');
-  variable_del('facebook_status_user_other_view');
   variable_del('facebook_status_default_text');
@@ -396,3 +132,2 @@ function facebook_status_uninstall() {
   variable_del('facebook_status_nl2br');
-  variable_del('facebook_status_ahah');
 }
diff -u -p1 -r -N -b -B -w facebook_status_6_3/facebook_status.module screamwork_fbss7/facebook_status.module
--- facebook_status_6_3/facebook_status.module	2011-07-05 09:31:31.532189200 -0400
+++ screamwork_fbss7/facebook_status.module	2011-05-25 20:53:28.000000000 -0400
@@ -6,2 +6,5 @@
  *   Creates context-sensitive social streams.
+ * @todo
+ *   Listed at http://drupal.org/node/576278#comment-4054178
+ *   Also, the "share" link might not work correctly
  */
@@ -19,3 +22,3 @@ define("FACEBOOK_STATUS_OVERRIDE_TIMER",
 /**
- * Implementation of hook_help().
+ * Implements hook_help().
  */
@@ -34,3 +37,3 @@ function facebook_status_help($path, $ar
 /**
- * Implementation of hook_menu().
+ * Implements hook_menu().
  */
@@ -38,3 +41,3 @@ function facebook_status_menu() {
   $items = array();
-  $items['admin/settings/facebook_status'] = array(
+  $items['admin/config/facebook_status'] = array(
     'title' => 'Facebook-style Statuses',
@@ -46,3 +49,3 @@ function facebook_status_menu() {
   );
-  $items['admin/settings/facebook_status/basic'] = array(
+  $items['admin/config/facebook_status/basic'] = array(
     'title' => 'Basic',
@@ -52,3 +55,3 @@ function facebook_status_menu() {
   );
-  $items['admin/settings/facebook_status/advanced'] = array(
+  $items['admin/config/facebook_status/advanced'] = array(
     'title' => 'Advanced',
@@ -61,3 +64,3 @@ function facebook_status_menu() {
   );
-  $items['admin/settings/facebook_status/contexts'] = array(
+  $items['admin/config/facebook_status/contexts'] = array(
     'title' => 'Contexts',
@@ -70,11 +73,2 @@ function facebook_status_menu() {
   );
-  $items['admin/settings/facebook_status/contexts/%facebook_status_context'] = array(
-    'title' => 'Context settings',
-    'page callback' => 'drupal_get_form',
-    'page arguments' => array('facebook_status_admin_context_settings', 4),
-    'access arguments' => array('administer Facebook-style Statuses settings'),
-    'description' => 'Allows administrators to adjust context stream settings for Facebook-style Statuses.',
-    'type' => MENU_LOCAL_TASK,
-    'file' => 'includes/utility/facebook_status.admin.inc',
-  );
   $items['statuses/announce'] = array(
@@ -143,4 +137,3 @@ function facebook_status_menu() {
       'page arguments' => array('facebook_status_generate_form'),
-      'access callback' => 'facebook_status_user_access',
-      'access arguments' => array('generate'),
+      'access callback' => '_facebook_status_generate_access',
       'file' => 'includes/utility/facebook_status.generate.inc',
@@ -155,4 +148,4 @@ function facebook_status_menu() {
 function facebook_status_share_page() {
-  $view = variable_get('facebook_status_share_view', 'facebook_status');
-  return theme('facebook_status_form_display', $GLOBALS['user'], 'user', $view);
+  $view = variable_get('facebook_status_share_view', 'facebook_status_stream');
+  return theme('facebook_status_form_display', array('recipient' => $GLOBALS['user'], 'type' => 'user', 'view' => $view));
 }
@@ -160,6 +153,6 @@ function facebook_status_share_page() {
 /**
- * Implementation of hook_block().
+ * Implements hook_block_info().
  */
-function facebook_status_block($op = 'list', $delta = 0, $edit = NULL) {
-  if ($op == 'list') {
+function facebook_status_block_info() {
+  if (TRUE) {
     $block['facebook_status']['info'] = t('Facebook-style Statuses');
@@ -169,3 +162,9 @@ function facebook_status_block($op = 'li
   }
-  elseif ($op == 'view' && $delta == 'facebook_status') {
+}
+
+/**
+ * Implements hook_block_view().
+ */
+function facebook_status_block_view($delta) {
+  if (TRUE && $delta == 'facebook_status') {
     $context = facebook_status_determine_context();
@@ -175,7 +174,13 @@ function facebook_status_block($op = 'li
     }
-    $block['subject'] = '';
-    $block['content'] = theme('facebook_status_form_display', $context);
+    $block['subject'] = t('Status');
+    $block['content'] = theme('facebook_status_form_display', array('recipient' => $context));
     return $block;
   }
-  elseif ($op == 'configure' && $delta == 'facebook_status') {
+}
+
+/**
+ * Implements hook_block_configure().
+ */
+function facebook_status_block_configure($delta) {
+  if (TRUE && $delta == 'facebook_status') {
     $form['facebook_status'] = array(
@@ -195,3 +200,9 @@ function facebook_status_block($op = 'li
   }
-  elseif ($op == 'save' && $delta == 'facebook_status') {
+}
+
+/**
+ * Implements hook_block_save().
+ */
+function facebook_status_block_save($delta, $edit) {
+  if (TRUE && $delta == 'facebook_status') {
     if (isset($edit['facebook_status'])) {
@@ -203,18 +214,50 @@ function facebook_status_block($op = 'li
 /**
- * Implementation of hook_perm().
+ * Implements hook_permission().
  */
-function facebook_status_perm() {
+function facebook_status_permission() {
   return array(
-    'administer Facebook-style Statuses settings',
-    'delete all statuses',
-    'delete own statuses',
-    'delete status messages on own profile',
-    'delete status messages on own nodes',
-    'edit all statuses',
-    'edit own statuses',
-    'post status messages to other streams',
-    'send messages to all users at once',
-    'update and view own stream',
-    'use PHP for context visibility',
-    'view all statuses',
+    'administer Facebook-style Statuses settings' => array(
+      'title' => t('administer Facebook-style Statuses settings'),
+      'description' => t('TODO Add a description for \'administer Facebook-style Statuses settings\''),
+    ),
+    'delete all statuses' => array(
+      'title' => t('delete all statuses'),
+      'description' => t('TODO Add a description for \'delete all statuses\''),
+    ),
+    'delete own statuses' => array(
+      'title' => t('delete own statuses'),
+      'description' => t('TODO Add a description for \'delete own statuses\''),
+    ),
+    'delete status messages on own profile' => array(
+      'title' => t('delete status messages on own profile'),
+      'description' => t('TODO Add a description for \'delete status messages on own profile\''),
+    ),
+    'delete status messages on own nodes' => array(
+      'title' => t('delete status messages on own nodes'),
+      'description' => t('TODO Add a description for \'delete status messages on own nodes\''),
+    ),
+    'edit all statuses' => array(
+      'title' => t('edit all statuses'),
+      'description' => t('TODO Add a description for \'edit all statuses\''),
+    ),
+    'edit own statuses' => array(
+      'title' => t('edit own statuses'),
+      'description' => t('TODO Add a description for \'edit own statuses\''),
+    ),
+    'post status messages to other streams' => array(
+      'title' => t('post status messages to other streams'),
+      'description' => t('TODO Add a description for \'post status messages to other streams\''),
+    ),
+    'send messages to all users at once' => array(
+      'title' => t('send messages to all users at once'),
+      'description' => t('TODO Add a description for \'send messages to all users at once\''),
+    ),
+    'update and view own stream' => array(
+      'title' => t('update and view own stream'),
+      'description' => t('TODO Add a description for \'update and view own stream\''),
+    ),
+    'view all statuses' => array(
+      'title' => t('view all statuses'),
+      'description' => t('TODO Add a description for \'view all statuses\''),
+    ),
   );
@@ -223,19 +266,23 @@ function facebook_status_perm() {
 /**
- * Implementation of hook_user().
- */
-function facebook_status_user($op, &$edit, &$account, $category = NULL) {
-  if ($op == 'delete') {
-    // 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);
-    // NOTE: modules that integrate with FBSS should implement hook_user()
-    // themselves instead of relying on hook_facebook_status_delete().
-    // Administrators who use the interface to create actions that occur when a
-    // status is deleted should make sure that these actions also occur for a
-    // user's statuses when that user is deleted.
-    // When we upgrade to Drupal 7, we can switch to using the status delete
-    // API function instead of a direct database call by utilizing the Queue
-    // API.
+ * Implements hook_user_cancel().
+ */
+function facebook_status_user_cancel($edit, $account, $method) {
+  if (TRUE) {
+    db_query("DELETE FROM {facebook_status} WHERE sender = :uid OR (recipient = :uid AND type = 'user')", array($account->uid));
+  }
+}
+
+/**
+ * Implements hook_user_delete($account)
+ */
+function facebook_status_user_delete($account) {
+  db_query('DELETE FROM {facebook_status} WHERE sender = :uid', array(':uid' => $account->uid));  
   }
-  elseif ($op == 'view' && variable_get('facebook_status_profile', 1)) {
-    $value = theme('facebook_status_form_display', $account, 'user');
+
+/**
+ * Implements hook_user_view().
+ */
+function facebook_status_user_view($account, $view_mode, $langcode) {
+  if (TRUE && variable_get('facebook_status_profile', 1)) {
+    $value = theme('facebook_status_form_display', array('recipient' => $account, 'type' => 'user'));
     // Don't show this section if there's nothing there or the user doesn't have permission to see it.
@@ -255,4 +302,4 @@ function facebook_status_user($op, &$edi
       '#type' => 'user_profile_item',
-      '#title' => '',
-      '#value' => $value,
+      '#title' => 'Statuses',
+      '#markup' => $value,
       '#attributes' => array('class' => 'facebook-status profile'),
@@ -263,3 +310,3 @@ function facebook_status_user($op, &$edi
 /**
- * Implementation of hook_init().
+ * Implements hook_init().
  */
@@ -284,4 +331,4 @@ function facebook_status_init() {
     'hideLength' => variable_get('facebook_status_hide_length', 0),
-    'refreshLink' => (bool) variable_get('facebook_status_refresh', 0)
-  )), 'setting');
+      'refreshLink' => (bool) variable_get('facebook_status_refresh', 0),
+    )), array('type' => 'setting', 'scope' => JS_DEFAULT));
 }
@@ -289,3 +336,3 @@ function facebook_status_init() {
 /**
- * Implementation of hook_link().
+ * Implements hook_link().
  */
@@ -301,4 +348,3 @@ function facebook_status_link($type, $st
       'title' => t('edit'),
-      'attributes' => array('class' => 'facebook-status-edit facebook-status-action-link'),
-      'weight' => -5,
+      'attributes' => array('class' => 'facebook-status-edit-link facebook-status-action-link'),
     );
@@ -309,4 +355,3 @@ function facebook_status_link($type, $st
       'title' => t('delete'),
-      'attributes' => array('class' => 'facebook-status-delete facebook-status-action-link'),
-      'weight' => -4,
+      'attributes' => array('class' => 'facebook-status-delete-link facebook-status-action-link'),
     );
@@ -314,6 +359,5 @@ function facebook_status_link($type, $st
   // 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 ($status->type != 'user' || $status->recipient != $status->sender || $status->sender != $user->uid) {
     // If permission to respond
-    if (facebook_status_user_access('add', _facebook_status_user_load($status->sender), 'user', $user)) {
-      $second_uid = $user->uid;
+    if (facebook_status_user_access('add', facebook_status_user_load($status->sender), 'user', $user)) {
       // If to current user (not a self update)
@@ -329,9 +373,11 @@ function facebook_status_link($type, $st
         $title = t('view conversation');
-        $second_uid = $status->recipient;
+      }
+      // If not to a user
+      else {
+        $title = t('discuss');
       }
       $links['respond'] = array(
-        'href' => 'statuses/conversation/'. $status->sender .','. $second_uid,
+        'href' => 'statuses/conversation/' . $status->sender . ',' . $user->uid,
         'title' => $title,
-        'attributes' => array('class' => 'facebook-status-respond facebook-status-action-link'),
-        'weight' => 3,
+        'attributes' => array('class' => 'facebook-status-respond-link facebook-status-action-link'),
       );
@@ -343,5 +389,7 @@ function facebook_status_link($type, $st
       'title' => t('share'),
-      'query' => array('sid' => $status->mid, 'destination' => $_GET['q']),
-      'attributes' => array('class' => 'facebook-status-share facebook-status-action-link'),
-      'weight' => 5,
+      'query' => array(
+        'sid' => $status->mid,
+        'destination' => $_GET['q'],
+      ),
+      'attributes' => array('class' => 'facebook-status-share-link facebook-status-action-link'),
     );
@@ -352,3 +400,3 @@ function facebook_status_link($type, $st
 /**
- * Implementation of hook_theme().
+ * Implements hook_theme().
  */
@@ -357,3 +405,3 @@ function facebook_status_theme($existing
     'facebook_status_item' => array(
-      'arguments' => array(
+      'variables' => array(
         'status' => NULL,
@@ -365,3 +413,3 @@ function facebook_status_theme($existing
     'facebook_status_form_display' => array(
-      'arguments' => array(
+      'variables' => array(
         'recipient' => NULL,
@@ -373,4 +421,4 @@ function facebook_status_theme($existing
     'facebook_status_time' => array(
-      'arguments' => array(
-        'time' => time(),
+      'variables' => array(
+        'time' => REQUEST_TIME,
       ),
@@ -378,5 +426,3 @@ function facebook_status_theme($existing
     'facebook_status_admin_contexts' => array(
-      'arguments' => array(
-        'form' => NULL,
-      ),
+      'render element' => 'form',
       'file' => 'includes/utility/facebook_status.admin.inc',
@@ -401,4 +447,2 @@ function facebook_status_theme($existing
  *   - cacheable: Whether the themed text will be stored
- *   - extras: Whether to show extra information (like comments and
- *     attachments) if applicable
  * @return
@@ -420,3 +464,4 @@ function facebook_status_show($status, $
  */
-function theme_facebook_status_time($time) {
+function theme_facebook_status_time($variables) {
+  $time = $variables['time'];
   if (!$time) {
@@ -424,10 +469,10 @@ function theme_facebook_status_time($tim
   }
-  if (time() - $time < 60) {
+  if (REQUEST_TIME - $time < 60) {
     return t('a moment ago');
   }
-  elseif (time() - $time < 60 * 60 * 24 * 3) {
-    return t('!time ago', array('!time' => format_interval(time() - $time, 1)));
+  elseif (REQUEST_TIME - $time < 60 * 60 * 24 * 3) {
+    return t('!time ago', array('!time' => format_interval(REQUEST_TIME - $time, 1)));
   }
   else {
-    return format_date($time, 'small');
+    return format_date($time, 'short');
   }
@@ -467,3 +512,2 @@ function theme_facebook_status_time($tim
  *       the current user)
- *   - 'generate': (no other parameters)
  * @return
@@ -486,6 +530,6 @@ function facebook_status_user_access($op
  *   A user ID of the sender of status updates, or an array of User IDs for
- *   users who posted statuses. If empty, all users are considered.
+ *   users whose profile was posted on. If empty, all users are considered.
  * @param $recipients
- *   An ID of the recipient of status updates, or an array of IDs for
- *   recipients of status updates. If empty, all users are considered.
+ *   An array of User IDs for users who posted statuses. If empty,
+ *   all users are considered.
  * @param $total
@@ -494,11 +538,5 @@ function facebook_status_user_access($op
  * @return
- *   An array of status objects matching the relevant criteria.
+ *   An array of status objects.
  */
 function facebook_status_get_statuses($senders = array(), $recipients = array(), $type = NULL, $total = 0) {
-  if (is_numeric($senders)) {
-    $senders = array($senders);
-  }
-  if (is_numeric($recipients)) {
-    $recipients = array($recipients);
-  }
   $statuses = array();
@@ -513,4 +551,4 @@ function facebook_status_get_statuses($s
   $query .= " ORDER BY created DESC, sid DESC";
-  $result = ($total > 0 ? db_query_range($query, $args, 0, $total) : db_query($query, $args));
-  while ($status = db_fetch_object($result)) {
+  $result = ($total > 0 ? $fn($query, $args, 0, $total) : $fn($query, $args));
+  while ($status = $result->fetchObject()) {
     $statuses[] = $status;
@@ -538,5 +576,5 @@ function facebook_status_has_status($rec
   if (!empty($sender_id)) {
-    return db_result(db_query("SELECT COUNT(sid) FROM {facebook_status} WHERE type = '%s' AND recipient = %d AND sender = %d", $type, $recipient_id, $sender_id));
+    return db_query("SELECT COUNT(sid) FROM {facebook_status} WHERE type = :type AND recipient = :recipient AND sender = :sender", array(':type' => $type, ':recipient' => $recipient_id, ':sender' => $sender_id))->fetchField();
   }
-  return db_result(db_query("SELECT COUNT(sid) FROM {facebook_status} WHERE type = '%s' AND recipient = %d", $type, $recipient_id));
+  return db_query("SELECT COUNT(sid) FROM {facebook_status} WHERE type = :type AND recipient = :recipient", array(':type' => $type, ':recipient' => $recipient_id))->fetchField();
 }
@@ -552,10 +590,3 @@ function facebook_status_has_status($rec
 function facebook_status_load($sid) {
-  return db_fetch_object(db_query("SELECT * FROM {facebook_status} WHERE sid = %d", $sid));
-}
-
-/**
- * Helps load a context array from a URL.
- */
-function facebook_status_context_load($type) {
-  return facebook_status_determine_context($type);
+  return db_query("SELECT * FROM {facebook_status} WHERE sid = :sid", array(':sid' => $sid))->fetchObject();  
 }
@@ -569,35 +600,11 @@ function facebook_status_context_load($t
  * @return
- *   An associative array of associative arrays. The outer array keys indicate
- *   the context type (machine name). Inner arrays have these elements:
- *   - title: The "friendly" name of the context type.
- *   - description (optional): An explanation of who owns the recipient stream
- *     if this context is used. This will be displayed in a "title" attribute,
- *     so do not use double quotes.
- *   - handler: The name of a class that extends facebook_status_context (and
- *     thus defines useful methods to describe the context).
- *   - parent (optional): The name of the parent context type (not the
- *     parent handler).
- *   - dependencies (optional): An array containing the names of modules that
- *     must be enabled for that context type to be used.
- *   - selectors (optional): A string containing CSS selectors separated by
- *     newlines. Each selector will be automatically updated via AJAX when a
- *     new status of the relevant type is saved. Do not include selectors that
- *     include the status update form.
- *   - view (optional): The default view to use as the context stream.
- *   - visibility (optional): Flag to indicate how to apply contexts on pages.
- *     - -1: Use module default settings
- *     - 0: Show on all pages except listed pages
- *     - 1: Show only on listed pages
- *     - 2: Use custom PHP code to determine visibility
- *     - 3: Use the conditions from a Context from the Context module
- *   - pages (optional): Either a list of paths on which to include/exclude the
- *     context or PHP code, depending on "visibility" setting. Visibility and
- *     pages provide a user-facing way of overriding the is_applicable()
- *     function of the context handler.
- *   - context (optional): A Context defined by the Context module whose
- *     conditions should be used to determine whether the stream context
- *     applies on this page if the "visibility" flag is set appropriately.
- *     Overrides the is_applicable() function of the context handler.
- *   - weight (optional): The default precedence of the context type.
- *   - file (optional): A file to load before loading the context handler.
+ *   An associative array containing these elements:
+ *   - title: The "friendly" name of the context.
+ *   - description: An explanation of who owns the stream that the context
+ *     defines.
+ *   - handler: A context handler object. See facebook_status.contexts.inc to
+ *     see the default context handlers and their properties.
+ *   - weight: The precedence of the context type.
+ *   - file: A file that will be included before any of the associated
+ *     functions are run.
  */
@@ -610,3 +617,3 @@ function facebook_status_determine_conte
       if (!empty($context['file']) && file_exists($context['file'])) {
-        require_once $context['file'];
+        require_once DRUPAL_ROOT . '/' . $context['file'];
       }
@@ -620,3 +627,3 @@ function facebook_status_determine_conte
       $context['handler'] = new $context['handler']();
-      if (_facebook_status_context_applies($context)) {
+      if ($context['handler']->is_applicable()) {
         break;
@@ -628,3 +635,3 @@ function facebook_status_determine_conte
     if (!empty($context['file']) && file_exists($context['file'])) {
-      require_once $context['file'];
+      require_once DRUPAL_ROOT . '/' . $context['file'];
     }
@@ -647,6 +654,2 @@ function facebook_status_determine_conte
     'view' => '',
-    'selectors' => '',
-    'visibility' => -1,
-    'pages' => '',
-    'context' => '',
     'weight' => 0,
@@ -670,3 +673,4 @@ function facebook_status_all_contexts()
   $contexts = module_invoke_all('facebook_status_context_info');
-  while ($c = db_fetch_array($result)) {
+  #echo '<pre>'.print_r($result->fetchAssoc(), true).'</pre>'; die();
+  while ($c = $result->fetchAssoc()) {
     $contexts[$c['type']]['in_db'] = TRUE;
@@ -675,5 +679,2 @@ function facebook_status_all_contexts()
     $contexts[$c['type']]['selectors'] = $c['selectors'];
-    $contexts[$c['type']]['visibility'] = $c['visibility'];
-    $contexts[$c['type']]['pages'] = $c['pages'];
-    $contexts[$c['type']]['context'] = $c['context'];
   }
@@ -696,27 +697,17 @@ function facebook_status_all_contexts()
  *
- * @param $status
+ * @param $sid
  *   The Status ID or a status object.
- * @param $meta
- *   An array of metadata that affects what behaviors are triggered from this
- *   function. There are no default options, but other modules may use them.
- *   For example, the Facebook-style Micropublisher module makes use of a
- *   "has attachment" option, which denotes whether the status that is being
- *   deleted has attached media.
- */
-function facebook_status_delete_status($status, $meta = array()) {
-  if (!is_object($status)) {
-    $status = facebook_status_load($status);
+ */
+function facebook_status_delete_status($sid) {
+  if (is_object($sid)) {
+    $sid = $sid->sid;
   }
   // Trigger integration.
-  // Don't call if there is an attachment (from the FBSMP module) because there is a separate trigger for that.
-  if (module_exists('trigger') && empty($options['has attachment'])) {
-    module_invoke_all('facebook_status', 'fbss_deleted', $status);
-    $type = $status->type;
-    if ($type == 'user') {
-      $type .= ($status->sender == $status->recipient ? '_self' : '_other');
-    }
-    module_invoke_all('facebook_status', 'fbss_deleted_'. $type, $status);
-  }
-  module_invoke_all('facebook_status_delete', $status, $meta);
-  db_query("DELETE FROM {facebook_status} WHERE sid = %d", $status->sid);
+  /* i have to close this out, caus some things aren't implemented correct yet. <---
+  if (module_exists('trigger')) {
+    module_invoke_all('facebook_status', 'fbss_deleted', $sid);
+  }
+  <--- leave !!! */
+  module_invoke_all('facebook_status_delete', $sid);
+  db_query('DELETE FROM {facebook_status} WHERE sid = :sid', array(':sid' => $sid));
 }
@@ -740,3 +731,3 @@ function facebook_status_delete_status($
  *     'discard duplicates' => TRUE,
- *     'timed override' => FALSE,
+ *     'timed override' => TRUE,
  *     'discard blank statuses' => TRUE,
@@ -750,3 +742,3 @@ function facebook_status_save_status($re
   $recipient_id = $context['handler']->recipient_id($recipient);
-  $time = time();
+  $time = REQUEST_TIME;
   $message = trim($message);
@@ -755,7 +747,8 @@ function facebook_status_save_status($re
     'discard duplicates' => TRUE,
-    'timed override' => FALSE,
+    'timed override' => TRUE,
     'discard blank statuses' => TRUE,
   );
-  // Calls hook_facebook_status_save_options_alter(&$options, $edit).
-  drupal_alter('facebook_status_save_options', $options, FALSE);
+ 
+  // 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.
@@ -770,2 +764,3 @@ function facebook_status_save_status($re
   );
+  #echo '<pre>'.print_r($status, true).'</pre>'; die();
   if ($message != $status->message || $type != $status->type || $recipient_id != $status->recipient || !$options['discard duplicates']) {
@@ -776,19 +771,28 @@ function facebook_status_save_status($re
     if ($time - $status->created < FACEBOOK_STATUS_OVERRIDE_TIMER && $type = 'user' && $sender->uid == $recipient_id && $options['timed override']) {
-      $sql = "UPDATE {facebook_status} SET message = '%s', created = %d WHERE sid = %d ORDER BY sid DESC";
-      db_query($sql, $message, $time, $status->sid);
-      $object->sid = $status->sid;
+      
+      /* db_query($sql, $message, $time, $status->sid) */
+      db_update('facebook_status')
+        ->fields(array(
+          'message' => $message,
+          'created' => $time,
+        ))
+        ->condition('sid', $status->sender)
+        //->condition('ORDER BY sender DESC', '')
+        ->execute();
+      $object->sender = $status->sender;
       $edit = TRUE;
+      return object; // --->
     }
     else {
-      // Avoid saving blank statuses except on a user's own profile if this is explicitly allowed.
+      // 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);
+        return $object; // killer
       }
     }
-    // Invokes hook_facebook_status_save($status, $context, $edit, $options).
-    module_invoke_all('facebook_status_save', $object, $context, $edit, $options);
-    // Trigger integration.
-    // Don't call if the status is blank because usually nothing interesting is happening.
-    // Also don't call if there is an attachment (from the FBSMP module) because there is a separate trigger for that.
-    if (module_exists('trigger') && !empty($message) && empty($options['has attachment'])) {
+    // 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.
+    if (module_exists('trigger') && !empty($message)) {
       $op = 'fbss_submitted_'. $type;
@@ -798,7 +802,6 @@ function facebook_status_save_status($re
       module_invoke_all('facebook_status', $op, $object, $context);
-      module_invoke_all('facebook_status', 'fbss_submitted', $object, $context);
     }
   }
-  elseif ($message == $status->status) {
-    $object->sid = $status->sid;
+  elseif ($message == $status->message) {
+    $object->sender = $status->sender;
   }
@@ -807,65 +810,2 @@ function facebook_status_save_status($re
 
-/**
- * Update a status.
- *
- * @param $status
- *   The status object to be edited.
- * @param $new_message
- *   The new text of the status.
- * @param $options
- *   An array of options that affects what behaviors this function uses. These
- *   are the defaults, used if no option is specified for the relevant keys:
- *   array(
- *     'discard duplicates' => TRUE,
- *     'timed override' => TRUE,
- *     'discard blank statuses' => TRUE,
- *     'update timestamp' => FALSE,
- *   );
- *   The first three options have little meaning if the status is being edited,
- *   but other modules are free to add their own options that should be
- *   respected here.
- */
-function facebook_status_edit_status($status, $new_message, $options = array()) {
-  $context = facebook_status_determine_context($status->type);
-  $new_message = trim($new_message);
-  // Merge in defaults.
-  $options += array(
-    'discard duplicates' => TRUE,
-    'timed override' => TRUE,
-    'discard blank statuses' => TRUE,
-    'update timestamp' => FALSE,
-  );
-  // Calls hook_facebook_status_save_options_alter(&$options, $edit).
-  drupal_alter('facebook_status_save_options', $options, TRUE);
-  $time = time();
-  global $user;
-  // Pretend to have set a new status if the submitted status is exactly the same as the old one.
-  if ($new_message != $status->message) {
-    if ($options['update timestamp']) {
-      $sql = "UPDATE {facebook_status} SET message = '%s', created = %d WHERE sid = %d";
-      db_query($sql, $new_message, $time, $status->sid);
-      $status->created = $time;
-    }
-    else {
-      $sql = "UPDATE {facebook_status} SET message = '%s' WHERE sid = %d";
-      db_query($sql, $new_message, $status->sid);
-    }
-    $status->message = $new_message;
-    // Invokes hook_facebook_status_save($status, $context, $edit, $options).
-    module_invoke_all('facebook_status_save', $status, $context, TRUE, $options);
-  }
-  // Trigger integration.
-  // Don't call if the status is blank because usually nothing interesting is happening.
-  // Also don't call if there is an attachment (from the FBSMP module) because there is a separate trigger for that.
-  if (module_exists('trigger') && !empty($new_message) && empty($options['has attachment'])) {
-    $op = 'fbss_edited_'. $status->type;
-    if ($status->type == 'user') {
-      $op .= ($status->recipient == $status->sender ? '_self' : '_other');
-    }
-    module_invoke_all('facebook_status', $op, $status, $context);
-    module_invoke_all('facebook_status', 'fbss_edited', $status, $context);
-  }
-  return $status;
-}
-
 //===================
@@ -892,3 +832,3 @@ function _facebook_status_run_filter($st
   if (variable_get('facebook_status_filter', 'none') != 'none') {
-    return check_markup($status, variable_get('facebook_status_filter', 'none'), FALSE);
+    return check_markup($status, variable_get('facebook_status_filter', 'none'), $langcode = '', FALSE); /* TODO Set this variable LANGCODE. */
   }
@@ -906,5 +846,11 @@ function _facebook_status_run_filter($st
 function _facebook_status_get_status_fast($uid) {
-  $status = db_fetch_object(db_query("SELECT * FROM {facebook_status} WHERE sender = %d AND recipient = %d AND type = 'user' ORDER BY sid DESC", $uid, $uid));
+  $status = db_query("SELECT * FROM {facebook_status} WHERE sender = :sender AND recipient = :recipient AND type = :type ORDER BY sid DESC", array(':sender' => $uid, ':recipient' => $uid, ':type' => 'user'))->fetchObject();
   if (!$status) {
-    $status = (object) array('sender' => $uid, 'recipient' => $uid, 'message' => '', 'created' => 0, 'type' => 'user');
+    $status = (object) array(
+      'sender' => $uid,
+      'recipient' => $uid,
+      'message' => '',
+      'created' => 0,
+      'type' => 'user',
+    );
   }
@@ -924,3 +870,3 @@ function _facebook_status_user_load($uid
   if (!isset($accounts[$uid])) {
-    $accounts[$uid] = user_load(array('uid' => $uid));
+    $accounts[$uid] = user_load($uid);
   }
@@ -940,3 +886,3 @@ function _facebook_status_user_load_by_n
   if (!isset($accounts[$name])) {
-    $accounts[$name] = user_load(array('name' => $name));
+    $accounts[$name] = array_shift(user_load_multiple(array(), array('name' => $name), FALSE));
   }
@@ -945,46 +891,2 @@ function _facebook_status_user_load_by_n
 
-/**
- * Determine whether a context applies in the current situation.
- *
- * @param $context
- *   The context array to test for application.
- * @return
- *   TRUE if the context applies here; FALSE otherwise.
- */
-function _facebook_status_context_applies($context) {
-  $context += array(
-    'visibility' => -1,
-  );
-  if ($context['visibility'] == -1) {
-    return $context['handler']->is_applicable();
-  }
-  elseif ($context['visibility'] == 3) {
-    if (module_exists('context')) {
-      return in_array($context['context'], array_keys(context_active_contexts()));
-    }
-    return $context['handler']->is_applicable();
-  }
-  // Match path if necessary. This behavior adapted from block_list()
-  elseif (!empty($context['pages'])) {
-    if ($context['visibility'] < 2) {
-      $path = drupal_get_path_alias($_GET['q']);
-      // Compare with the internal and path alias (if any).
-      $page_match = drupal_match_path($path, $context['pages']);
-      if ($path != $_GET['q']) {
-        $page_match = $page_match || drupal_match_path($_GET['q'], $context['pages']);
-      }
-      // When $context['visibility'] has a value of 0, the block is displayed
-      // on all pages except those listed in $context['pages']. When set to 1,
-      // it is displayed only on those pages listed in $context['pages'].
-      return !($context['visibility'] xor $page_match);
-    }
-    else {
-      return drupal_eval($context['pages']);
-    }
-  }
-  else {
-    return TRUE;
-  }
-}
-
 //==========================
@@ -994,3 +896,3 @@ function _facebook_status_context_applie
 /**
- * Implementation of hook_facebook_status_context_info().
+ * Implements hook_facebook_status_context_info().
  */
@@ -1004,4 +906,4 @@ function facebook_status_facebook_status
       'handler' => 'facebook_status_user_context',
-      'view' => module_exists('user_relationships_api') ? 'fbss_ur_stream' : 'facebook_status_stream',
-      'weight' => 999,
+      'view' => 'facebook_status_stream',
+      'weight' => 9999,
       'file' => $path .'/includes/utility/facebook_status.contexts.inc',
@@ -1026,11 +928,2 @@ function facebook_status_facebook_status
     ),
-    'term' => array(
-      'title' => t('Taxonomy terms'),
-      'description' => t('The stream belongs to the currently viewed taxonomy term, if applicable.'),
-      'handler' => 'facebook_status_term_context',
-      'dependencies' => array('taxonomy'),
-      'view' => 'facebook_status_stream',
-      'weight' => 1000, // heavier than the user context, therefore disabled by default
-      'file' => $path .'/includes/utility/facebook_status.contexts.inc',
-    ),
   );
@@ -1043,29 +936,19 @@ function facebook_status_facebook_status
 /**
- * Implementation of hook_hook_info().
+ * Implements hook_trigger_info().
  */
-function facebook_status_hook_info() {
+function facebook_status_trigger_info() {
   $info = array(
     'facebook_status' => array(
-      'facebook_status' => array(
-        'fbss_deleted' => array(
-          'runs when' => t('A status has been deleted'),
+      'facebook_status_fbss_deleted' => array(
+        'label' => t('A status has been deleted'),
         ),
-        'fbss_deleted_user_self' => array(
-          'runs when' => t('A user has deleted their status'),
+      'facebook_status_fbss_edited' => array(
+        'label' => t('A status has been edited'),
         ),
-        'fbss_deleted_user_other' => array(
-          'runs when' => t('A user has deleted a status message to another user'),
-        ),
-        'fbss_edited' => array(
-          'runs when' => t('A status has been edited'),
-        ),
-        'fbss_edited_user_self' => array(
-          'runs when' => t('A user has edited their own status'),
-        ),
-        'fbss_edited_user_other' => array(
-          'runs when' => t('A user has edited a status message to another user'),
-        ),
-        'fbss_submitted' => array(
-          'runs when' => t('A status has been submitted'),
         ),
+  );
+  /*
+  foreach (facebook_status_all_contexts() as $type => $details) {
+    if ($type == 'user') {
+      $info['facebook_status']['facebook_status'] += array(
         'fbss_submitted_user_self' => array(
@@ -1076,13 +959,5 @@ function facebook_status_hook_info() {
         ),
-      ),
-    ),
-  );
-  foreach (facebook_status_all_contexts() as $type => $details) {
-    if ($type != 'user') {
-      $info['facebook_status']['facebook_status']['fbss_deleted_'. $type] = array(
-        'runs when' => t('A user has deleted a status message to a stream of type %type', array('%type' => $type)),
-      );
-      $info['facebook_status']['facebook_status']['fbss_edited_'. $type] = array(
-        'runs when' => t('A user has edited a status message to a stream of type %type', array('%type' => $type)),
       );
+    }
+    else {
       $info['facebook_status']['facebook_status']['fbss_submitted_'. $type] = array(
@@ -1092,2 +967,3 @@ function facebook_status_hook_info() {
   }
+  */
   return $info;
@@ -1096,8 +973,10 @@ function facebook_status_hook_info() {
 /**
- * Implementation of hook_facebook_status().
+ * Implements hook_facebook_status().
  * or
- * Implementation of hook_trigger_name().
+ * Implements hook_trigger_name().
  */
-function facebook_status_facebook_status($op, $status, $context = NULL) {
-  if (strpos($op, 'fbss_deleted') !== 0 && strpos($op, 'fbss_submitted') !== 0 && strpos($op, 'fbss_edited') !== 0) {
+/*  'facebook_status', 'fbss_deleted', $sid  */
+
+function facebook_status_facebook_status($op, $a1, $context = NULL) {
+  if (!in_array($op, array('fbss_deleted', 'fbss_edited')) && strpos($op, 'fbss_submitted') !== 0) {
     return;
@@ -1105,2 +984,9 @@ function facebook_status_facebook_status
   $aids = _trigger_get_hook_aids('facebook_status', $op);
+  print_r($aids) . "983"; die();
+  if ($op == 'fbss_deleted' || $op == 'fbss_edited') {
+    $status = facebook_status_load($a1);
+  }
+  elseif (strpos($op, 'fbss_submitted') === 0) {
+    $status = $a1;
+  }
   $context = facebook_status_determine_context($status->type);
@@ -1130,3 +1016,3 @@ function facebook_status_facebook_status
 /**
- * Implementation of hook_token_list().
+ * Implements hook_token_list().
  */
@@ -1145,4 +1031,4 @@ function facebook_status_token_list($typ
       'recipient-id' => t('The ID of the recipient of the status message.'),
-      'message-unformatted' => t('The status text, with HTML escaped but no filters or anything run over it.'),
-      'message-formatted' => t('The status text completely themed.'),
+      'message-unformatted' => t('The new status text, with HTML escaped but no filters or anything run over it.'),
+      'message-formatted' => t('The new status text completely themed.'),
       'message-raw' => t('The completely unfiltered status text. WARNING: raw user input.'),
@@ -1150,3 +1036,2 @@ function facebook_status_token_list($typ
       'status-id' => t('The Status ID.'),
-      'status-url' => t('The URL of the status message.'),
       'status-edit' => t('Edit status link.'),
@@ -1164,3 +1049,3 @@ function facebook_status_token_list($typ
 /**
- * Implementation of hook_token_values().
+ * Implements hook_token_values().
  */
@@ -1188,3 +1073,3 @@ function facebook_status_token_values($t
   $values = array(
-    'sender-themed' => theme('username', $sender),
+    'sender-themed' => theme('username', array('account' => $sender)),
     'sender-name' => check_plain($sender->name),
@@ -1201,5 +1086,4 @@ function facebook_status_token_values($t
     'message-raw' => $status->message,
-    'status-themed' => facebook_status_show($status),
+    'status-themed' => theme('facebook_status_item', array('status' => $status)),
     'status-id' => $status->sid,
-    'status-url' => url('statuses/'. $status->sid, array('absolute' => TRUE)),
     'status-edit' => $edit,
@@ -1207,3 +1091,3 @@ function facebook_status_token_values($t
     'status-comment-count' => (module_exists('fbss_comments')) ? fbss_comments_count_comments($status->sid) : 0,
-    'created' => format_date($status->created, 'small'),
+    'created' => format_date($status->created, 'short'),
   );
@@ -1218,3 +1102,3 @@ function facebook_status_token_values($t
 /**
- * Implementation of hook_views_api().
+ * Implements hook_views_api().
  */
@@ -1222,3 +1106,3 @@ function facebook_status_views_api() {
   return array(
-    'api' => 2,
+    'api' => 3,
     'path' => drupal_get_path('module', 'facebook_status') .'/includes/views',
@@ -1233,17 +1117,3 @@ function facebook_status_display_user_pi
   drupal_add_css(drupal_get_path('module', 'facebook_status') .'/resources/facebook_status.css');
-  return theme('user_picture', $account);
-}
-
-/**
- * Implementation of hook_views_query_alter().
- */
-function facebook_status_views_query_alter(&$view, &$query) {
-  if ($view->base_table == 'users') {
-    foreach ($query->table_queue as $alias => $info) {
-      if ($info['table'] == 'facebook_status') {
-        $query->add_groupby($info['alias'] .'.sid');
-        return;
-      }
-    }
-  }
+  return theme('user_picture', array('account' => $account));
 }
@@ -1255,3 +1125,3 @@ function facebook_status_views_query_alt
 /**
- * Implementation of hook_sms_incoming().
+ * Implements hook_sms_incoming().
  */
@@ -1274,3 +1144,3 @@ function facebook_status_sms_incoming($o
 /**
- * Implementation of hook_views_bulk_operations_object_info().
+ * Implements hook_views_bulk_operations_object_info().
  */
@@ -1282,3 +1152,3 @@ function facebook_status_views_bulk_oper
       'load' => 'facebook_status_load',
-      'title' => 'message',
+      'title' => 'status',
     ),
@@ -1292,3 +1162,3 @@ function facebook_status_views_bulk_oper
 /**
- * Implementation of hook_ctools_plugin_directory().
+ * Implements hook_ctools_plugin_directory().
  */
diff -u -p1 -r -N -b -B -w facebook_status_6_3/includes/ctools/content_types/facebook_status_stream.inc screamwork_fbss7/includes/ctools/content_types/facebook_status_stream.inc
--- facebook_status_6_3/includes/ctools/content_types/facebook_status_stream.inc	2011-04-09 19:23:26.524616700 -0400
+++ screamwork_fbss7/includes/ctools/content_types/facebook_status_stream.inc	2011-05-25 20:53:28.000000000 -0400
@@ -8,3 +8,3 @@
 /**
- * Implementation of hook_ctools_content_types().
+ * Implements hook_ctools_content_types().
  */
@@ -22,6 +22,6 @@ function facebook_status_facebook_status
 /**
- * Implementation of hook_content_type_render().
+ * Implements hook_content_type_render().
  */
 function facebook_status_facebook_status_stream_content_type_render($subtype, $conf, $panel_args, $context) {
-  $account = isset($context->data) ? drupal_clone($context->data) : NULL;
+  $account = isset($context->data) ? clone $context->data : NULL;
   $block = new stdClass();
@@ -30,2 +30,3 @@ function facebook_status_facebook_status
     $block->title = t("Stream");
+    // TODO Please change this theme call to use an associative array for the $variables parameter.
     $block->content = theme('facebook_status_form_display');
@@ -36,3 +37,3 @@ function facebook_status_facebook_status
 /**
- * Implementation of hook_content_type_admin_title().
+ * Implements hook_content_type_admin_title().
  */
diff -u -p1 -r -N -b -B -w facebook_status_6_3/includes/facebook_status.preprocess.inc screamwork_fbss7/includes/facebook_status.preprocess.inc
--- facebook_status_6_3/includes/facebook_status.preprocess.inc	2011-06-05 00:45:00.294465500 -0400
+++ screamwork_fbss7/includes/facebook_status.preprocess.inc	2011-05-25 20:53:28.000000000 -0400
@@ -13,3 +13,3 @@ function template_preprocess_facebook_st
   $vars['self'] = $status->type == 'user' && $status->sender == $status->recipient;
-  $vars['page'] = $options['page'];
+  $vars['page'] = isset($options['page']) ? $options['page'] : '';
   $vars['type'] = $status->type;
@@ -20,4 +20,7 @@ function template_preprocess_facebook_st
   $vars += array(
-    'recipient' => '', 'recipient_name' => '', 'recipient_picture' => '',
-    'meta' => '', 'links' => '',
+    'recipient' => '',
+    'recipient_name' => '',
+    'recipient_picture' => '',
+    'meta' => '',
+    'links' => '',
   );
@@ -27,3 +30,3 @@ function template_preprocess_facebook_st
   if ($status->type == 'user') {
-    $vars['recipient_picture'] = theme('user_picture', $vars['recipient']);
+    $vars['recipient_picture'] = theme('user_picture', array('account' => $vars['recipient']));
   }
@@ -31,12 +34,12 @@ function template_preprocess_facebook_st
   $vars['sender_name'] = check_plain($vars['sender']->name);
-  $vars['sender_link'] = theme('username', $vars['sender']);
-  $vars['sender_picture'] = theme('user_picture', $vars['sender']);
-  if ($options['cacheable']) {
-    $vars['created'] = format_date($status->created, 'small');
+  $vars['sender_link'] = theme('username', array('account' => $vars['sender']));
+  $vars['sender_picture'] = theme('user_picture', array('account' => $vars['sender']));
+  if (isset($options['cacheable'])) {
+    $vars['created'] = format_date($status->created, 'short');
   }
   else {
-    $vars['created'] = theme('facebook_status_time', $status->created);
+    $vars['created'] = theme('facebook_status_time', array('time' => $status->created));
     if ($status->type == 'user') {
-      if ($status->sender != $status->recipient) {
-        $vars['meta'] = t('to !recipient', array('!recipient' => $vars['recipient_link']));
+      if ($status->sender != $status->recipient || strpos($status->message, '@') === 0 || strpos($status->message, '[@') === 0) {
+        $vars['meta'] = t('To @recipient', array('@recipient' => $vars['recipient_name']));
       }
@@ -44,6 +47,6 @@ function template_preprocess_facebook_st
     elseif (!empty($vars['recipient_name'])) {
-      $vars['meta'] = t('on !entity', array('!entity' => $vars['recipient_link']));
+      $vars['meta'] = t('Posted on %entity', array('%entity' => $vars['recipient_name']));
     }
-    if ($options['links']) {
-      $vars['links'] = !empty($status->links) ? theme('links', $status->links, array('class' => 'links inline')) : '';
+    if (isset($options['links'])) {
+      $vars['links'] = !empty($status->links) ? theme('links', array('links' => $node->links, 'attributes' => array('class' => array('links inline')))) : '';
     }
@@ -64,11 +68,9 @@ function _facebook_status_show($status,
     'cacheable' => FALSE,
-    'extras' => TRUE,
   );
-  if ($options['links']) {
+  if (isset($links)) {
     $status->links = module_invoke_all('link', 'facebook_status', $status);
     drupal_alter('facebook_status_link', $status->links, $status);
-    uasort($status->links, '_facebook_status_links_sort');
   }
   $message = trim($status->message);
-  if ($options['page']) {
+  if (isset($options['page'])) {
     $title = '';
@@ -83,8 +85,7 @@ function _facebook_status_show($status,
     else {
-      $context = facebook_status_determine_context($status->type);
-      $recipient = $context['handler']->load_recipient($status->recipient);
-      $recipient_name = $context['handler']->recipient_name($recipient);
+     
+      $recipient = _facebook_status_user_load($status->recipient);
       //"\xC2\xBB" is the unicode escape sequence for the HTML entity &raquo; (a double right angle bracket)
       $title = t("@sender \xC2\xBB @recipient: @message",
-        array('@sender' => $sender->name, '@recipient' => $recipient_name, '@message' => $message)
+        array('@sender' => $sender->name, '@recipient' => $recipient->name, '@message' => $message)
       );
@@ -98,16 +101,3 @@ function _facebook_status_show($status,
   drupal_add_css(drupal_get_path('module', 'facebook_status') .'/resources/facebook_status.css');
-  return theme('facebook_status_item', $status, $options);
-}
-
-/**
- * Helps sort links by weight.
- */
-function _facebook_status_links_sort($a, $b) {
-  if (!isset($a['weight'])) {
-    $a['weight'] = 0;
-  }
-  if (!isset($b['weight'])) {
-    $b['weight'] = 0;
-  }
-  return $a['weight'] > $b['weight'] ? 1 : ($a['weight'] < $b['weight'] ? -1 : 0);
+  return theme('facebook_status_item', array('status' => $status, 'options' => $options));
 }
diff -u -p1 -r -N -b -B -w facebook_status_6_3/includes/utility/facebook_status.access.inc screamwork_fbss7/includes/utility/facebook_status.access.inc
--- facebook_status_6_3/includes/utility/facebook_status.access.inc	2011-05-24 15:36:13.021412400 -0400
+++ screamwork_fbss7/includes/utility/facebook_status.access.inc	2011-05-25 20:53:28.000000000 -0400
@@ -24,5 +24,4 @@
 function facebook_status_user_access_add($recipient = NULL, $type = 'user', $sender = NULL) {
-  global $user;
-  $recipient = (empty($recipient) ? $user : $recipient);
-  $sender = (empty($sender) ? $user : $sender);
+  $recipient = (empty($recipient) ? $GLOBALS['user'] : $recipient);
+  $sender = (empty($sender) ? $GLOBALS['user'] : $sender);
   $context = facebook_status_determine_context($type);
@@ -120,5 +119,4 @@ function facebook_status_user_access_vie
 function facebook_status_user_access_view_stream($recipient = NULL, $type = 'user', $account = NULL) {
-  global $user;
-  $account = (empty($account) ? $user : $account);
-  $recipient = (empty($recipient) ? $user : $recipient);
+  $account = (empty($account) ? $GLOBALS['user'] : $account);
+  $recipient = (empty($recipient) ? $GLOBALS['user'] : $recipient);
   $context = facebook_status_determine_context($type);
@@ -126,11 +124 @@ function facebook_status_user_access_vie
 }
-
-/**
- * Checks permission to generate status updates via Devel Generate.
- */
-function facebook_status_user_access_generate() {
-  return user_access('delete all statuses') &&
-    user_access('post status messages to other streams') &&
-    user_access('send messages to all users at once') &&
-    user_access('administer Facebook-style Statuses settings');
-}
diff -u -p1 -r -N -b -B -w facebook_status_6_3/includes/utility/facebook_status.admin.inc screamwork_fbss7/includes/utility/facebook_status.admin.inc
--- facebook_status_6_3/includes/utility/facebook_status.admin.inc	2011-06-10 12:18:22.638599900 -0400
+++ screamwork_fbss7/includes/utility/facebook_status.admin.inc	2011-05-25 20:53:28.000000000 -0400
@@ -10,14 +10,5 @@
  */
-function facebook_status_admin($form_state) {
-  $form['facebook_status_length'] = array(
-    '#type' => 'textfield',
-    '#title' => t('Maximum status length'),
-    '#description' => t('Must be a positive integer, or zero for no maximum length.'),
-    '#default_value' => variable_get('facebook_status_length', 140),
-    '#size' => 3,
-    '#maxlength' => 5,
-    '#required' => TRUE,
-    '#weight' => -40,
-  );
-  $formats = filter_formats();
+function facebook_status_admin($form, &$form_state) {
+  global $user;
+  $formats = filter_formats($user);
   $options = array('none' => t('None (HTML escaped)'));
@@ -38,4 +29,4 @@ function facebook_status_admin($form_sta
     '#description' => t('The format of the default message when users click a link to re-post a status.') .' '.
-      t("@name will be replaced with the poster's name and @message will be replaced with the status text."),
-    '#default_value' => variable_get('facebook_status_repost', 'Re: @name @message '),
+      t("@name will be replaced with the poster's name and @status will be replaced with the status text."),
+    '#default_value' => variable_get('facebook_status_repost', 'Re: @name @status '),
     '#weight' => -20,
@@ -45,3 +36,3 @@ function facebook_status_admin($form_sta
   foreach ($views as $name => $view) {
-    if ($view->disabled == 0) {
+    if (!isset($view->disabled) || $view->disabled != TRUE) {
       $list[$name] = $name;
@@ -53,3 +44,3 @@ function facebook_status_admin($form_sta
     '#description' => t('The default facebook_status_stream view is recommended.'),
-    '#default_value' => variable_get('facebook_status_share_view', $list['facebook_status_stream']),
+    '#default_value' => variable_get('facebook_status_share_view', $list['facebook_status_mystream']),
     '#options' => $list,
@@ -64,6 +55,2 @@ function facebook_status_admin($form_sta
 function facebook_status_admin_validate($form, &$form_state) {
-  $size = $form_state['values']['facebook_status_length'];
-  if (!is_numeric($size) || $size < 0 || $size != round($size)) {
-    form_set_error('facebook_status_length', t('The maximum status length must be a positive integer, or zero for no maximum length.'));
-  }
 }
@@ -73,3 +60,3 @@ function facebook_status_admin_validate(
  */
-function facebook_status_admin_advanced($form_state) {
+function facebook_status_admin_advanced($form, &$form_state) {
   $form['facebook_status_box_rows'] = array(
@@ -84,15 +71,2 @@ function facebook_status_admin_advanced(
   );
-  $form['facebook_status_hide_length'] = array(
-    '#type' => 'textfield',
-    '#title' => t('Show "Read more" after'),
-    '#field_suffix' => t('characters'),
-    '#description' => t('If a status message is longer than this number of characters and the viewing user has JavaScript enabled, the message will be truncated to this length and a "Read more" link will be appended.') .' '.
-      t('When clicked, the "Read more" link will reveal the rest of the status message.') .' '.
-      t('Must be a positive integer less than the maximum status message length, or zero to ignore this option.'),
-    '#default_value' => variable_get('facebook_status_hide_length', 0),
-    '#size' => 3,
-    '#maxlength' => 5,
-    '#required' => TRUE,
-    '#weight' => -70,
-  );
   $form['facebook_status_nl2br'] = array(
@@ -106,12 +80,2 @@ function facebook_status_admin_advanced(
   );
-  $form['facebook_status_refresh'] = array(
-    '#type' => 'checkbox',
-    '#title' => t('Show AJAX "Refresh" link after status update views'),
-    '#description' => t('Display a "Refresh" link under content that will be automatically refreshed when the status update form is submitted.') .' '.
-      t('Clicking the link will similarly update the related content via JavaScript, without refreshing the page.') .' '.
-      t('Obviously, the "Refresh" link will only appear when there is something that can be refreshed.') .' '.
-      t('If you disable AHAH refreshing below or if you have no views attached to your status update forms, this setting is useless.'),
-    '#default_value' => variable_get('facebook_status_refresh', 0),
-    '#weight' => -50,
-  );
   $form['facebook_status_profile'] = array(
@@ -142,9 +106,2 @@ function facebook_status_admin_advanced(
   );
-  $form['facebook_status_ahah'] = array(
-    '#type' => 'checkbox',
-    '#title' => t('Use AHAH to refresh the status update form without refreshing the page'),
-    '#description' => t("You should leave this checked unless you know what you're doing."),
-    '#default_value' => variable_get('facebook_status_ahah', 1),
-    '#weight' => -10,
-  );
   return system_settings_form($form);
@@ -160,7 +117,2 @@ function facebook_status_admin_advanced_
   }
-  $length = $form_state['values']['facebook_status_hide_length'];
-  if (!is_numeric($length) || $length < 0 || ($length >= variable_get('facebook_status_length', 140) && variable_get('facebook_status_length', 140) != 0) || $length != round($length)) {
-    form_set_error('facebook_status_hide_length',
-      t('The "Read more after" option requires that the number of characters specified is a positive integer less than the maximum status message length, or zero to ignore this option.'));
-  }
 }
@@ -170,3 +122,3 @@ function facebook_status_admin_advanced_
  */
-function facebook_status_admin_contexts(&$form_state) {
+function facebook_status_admin_contexts($form, &$form_state) {
   $data = facebook_status_all_contexts();
@@ -179,3 +132,4 @@ function facebook_status_admin_contexts(
   foreach ($views as $name => $view) {
-    if (empty($view->disabled)) {
+    //if (empty($view->disabled)) {
+    if (!isset($view->disabled) || $view->disabled != TRUE) {
       $options[$name] = $name;
@@ -185,5 +139,6 @@ function facebook_status_admin_contexts(
     $form['components'][$type]['title'] = array(
-      '#prefix' => '<div title="'. (isset($values['description']) ? $values['description'] : '') .'">',
-      '#value' => $values['title'],
-      '#suffix' => '</div>',
+      //'#prefix' => '<div title="' . (isset($values['description']) ? $values['description'] : '') . '">',
+      //'#value' => $values['title'],
+      '#markup' => $values['title'],
+      //'#suffix' => '</div>',
     );
@@ -194,8 +149,6 @@ function facebook_status_admin_contexts(
     );
-    $form['components'][$type]['link'] = array(
-      '#value' => l(
-        t('Configure'),
-        'admin/settings/facebook_status/contexts/'. $type,
-        array('query' => array('destination' => 'admin/settings/facebook_status/contexts'))
-      ),
+    $form['components'][$type]['selectors'] = array(
+      '#type' => 'textarea',
+      '#rows' => 2,
+      '#default_value' => isset($values['selectors']) ? $values['selectors'] : '',
     );
@@ -215,17 +168,2 @@ function facebook_status_admin_contexts(
   }
-  // The user context has 2 views.
-  $self = $options[isset($data['user']['view']) ? $data['user']['view'] : ''];
-  $other = variable_get('facebook_status_user_other_view', 'facebook_status_stream');
-  if ($self != $other) {
-    $form['components']['user']['view'] = array(
-      '#value' => t('%self and %other - view configuration to change', array(
-        '%self' => $self,
-        '%other' => $other,
-      )),
-    );
-  }
-  $form['components']['user']['view_value'] = array(
-    '#type' => 'hidden',
-    '#value' => $self,
-  );
   $form['submit'] = array(
@@ -241,14 +179,3 @@ function facebook_status_admin_contexts(
 function facebook_status_admin_contexts_submit($form, &$form_state) {
-  $self = $form_state['values']['components']['user']['view_value'];
-  $other = variable_get('facebook_status_user_other_view', 'facebook_status_stream');
-  // If we are using the same view for the user "self" and "other" cases, save any changes to both places.
-  if ($self == $other) {
-    variable_set('facebook_status_user_other_view', $form_state['values']['components']['user']['view']);
-  }
-  // If not, we didn't expose the view option in the form, so make sure nothing changes.
-  else {
-    $form_state['values']['components']['user']['view'] = $self;
-  }
-  // Save the usual data.
-  foreach ($form_state['values']['components'] as $type => $item) {
+  foreach ($form_state['values']['components'] as $item) {
     $record = array(
@@ -257,2 +184,3 @@ function facebook_status_admin_contexts_
       'view' => $item['view'],
+      'selectors' => $item['selectors'],
     );
@@ -270,5 +198,6 @@ function facebook_status_admin_contexts_
  */
-function theme_facebook_status_admin_contexts($form) {
+function theme_facebook_status_admin_contexts($variables) {
+  $form = $variables['form'];
   drupal_add_tabledrag('facebook-status-admin-contexts-table', 'order', 'sibling', 'weight-group');
-  $header = array(t('Title'), t('View'), t('Actions'), t('Weight'), '', '');
+  $header = array(t('Title'), t('View'), t('Refreshable DOM selectors'), t('Weight'), '', '');
   $rows = array();
@@ -276,70 +205,16 @@ function theme_facebook_status_admin_con
     $element = &$form['components'][$key];
-    $element['title']['#attributes']['class']         = 'title-group';
-    $element['view']['#attributes']['class']          = 'view-group';
-    $element['link']['#attributes']['class']          = 'link-group';
-    $element['weight']['#attributes']['class']        = 'weight-group';
-    $element['type']['#attributes']['class']          = 'type';
-    $element['already_saved']['#attributes']['class'] = 'already-saved';
     $row = array();
-    $row[] = drupal_render($element['title']);
-    $row[] = drupal_render($element['view']);
-    $row[] = drupal_render($element['link']);
-    $row[] = drupal_render($element['weight']);
-    $row[] = drupal_render($element['type']);
-    $row[] = drupal_render($element['already_saved']);
-    $rows[] = array('data' => $row, 'class' => 'draggable');
-  }
-  $output = '<p>'. t('The view assigned to the "User profiles" context does not affect the view shown on conversation pages.') .'</p>';
-  $output .= theme('table', $header, $rows, array('id' => 'facebook-status-admin-contexts-table'));
-  $output .= drupal_render($form);
-  return $output;
-}
-
-/**
- * The individual context settings form.
- */
-function facebook_status_admin_context_settings($form_state, $context) {
-  drupal_set_title(t('Context settings: !type', array('!type' => $context['title'])));
-  $type = $context['handler']->type();
-  $form = array();
-
-  if ($type == 'user') {
-    $form['notice'] = array(
-      '#value' => '<p>'. t('The view assigned to the "User profiles" context does not affect the view shown on conversation pages.') .'</p>',
+    $row[] = drupal_render($element['title'], array('#attributes' => array('class' => 'title-group')));
+    $row[] = drupal_render($element['view'], array('#attributes' => array('class' => 'view-group')));
+    $row[] = drupal_render($element['selectors'], array('#attributes' => array('class' => 'selectors-group')));
+    $row[] = drupal_render($element['weight'], array('#attributes' => array('class' => 'weight-group')));
+    $row[] = drupal_render($element['type'], array('#attributes' => array('class' => 'type')));
+    $row[] = drupal_render($element['already_saved'], array('#attributes' => array('class' => 'already-saved')));
+    $rows[] = array(
+      'data' => $row,
+      'class' => array('class' => 'draggable'),
     );
   }
-
-  $views = views_get_all_views();
-  $options = array('' => t('None'));
-  foreach ($views as $name => $view) {
-    if (empty($view->disabled)) {
-      $options[$name] = $name;
-    }
-  }
-  $form['view'] = array(
-    '#type' => 'select',
-    '#title' => t('View'),
-    '#description' => t('Show this view for !type streams.', array('@type' => $context['title'])) .' '. t('The "default" display will be used.'),
-    '#default_value' => isset($context['view']) ? $context['view'] : '',
-    '#options' => $options,
-  );
-  if ($type == 'user') {
-    $form['view']['#title'] = t('View for "my stream"');
-    $form['view']['#description'] = t('Show this view for user streams when a user is looking at their own stream.') .' '. t('The "default" display will be used.');
-    $form['other_view'] = array(
-      '#type' => 'select',
-      '#title' => t("View for others users' streams"),
-      '#description' => t("Show this view for user streams when a user is looking at another user's stream.") .' '. t('The "default" display will be used.'),
-      '#default_value' => variable_get('facebook_status_user_other_view', 'facebook_status_stream'),
-      '#options' => $options,
-    );
-  }
-
-  $form['selectors'] = array(
-    '#type' => 'textarea',
-    '#rows' => 2,
-    '#default_value' => isset($context['selectors']) ? $context['selectors'] : '',
-    '#title' => t('Refreshable DOM selectors'),
-    '#description' => '<p>'.
-      t('Enter CSS selectors that specify sections of the page that should be automatically refreshed via AJAX when a status of that type is submitted.') .' '.
+  $output = '<p>' .
+    t('In the "Refreshable DOM selectors" column, enter CSS selectors that specify sections of the page that should be automatically refreshed via AJAX when a status of that type is submitted.') . ' ' .
       t('For example, to automatically update all &lt;div&gt; elements with class "myclass", enter "div.myclass" in the box (without the quotes).') .' '.
@@ -347,113 +222,8 @@ function facebook_status_admin_context_s
       t('Enter each selector on a separate line.') .
-      '</p>',
-  );
-
-  // adapted from block_admin_configure()
-  $form['page_vis_settings'] = array(
-    '#type' => 'fieldset', 
-    '#title' => t('Advanced: change where this context applies'), 
-    '#collapsible' => TRUE,
-    '#collapsed' => TRUE,
-  );
-  $access = user_access('use PHP for context visibility');
-  if ($edit['visibility'] == 2 && !$access) {
-    $form['page_vis_settings'] = array();
-    $form['page_vis_settings']['visibility'] = array(
-      '#type' => 'value',
-      '#value' => 2,
-    );
-    $form['page_vis_settings']['pages'] = array(
-      '#type' => 'value',
-      '#value' => $edit['pages'],
-    );
-  }
-  else {
-    $form['page_vis_settings']['warning'] = array(
-      '#value' => '<p><strong>'. t('Changing these values could break your site. Only change these settings if you know what you are doing.') .'</strong></p>
-        <p>'. t('Specifically, most contexts make assumptions about what pages they are enabled on in order to identify the correct recipient of status messages.') .' '.
-          t('Enabling a context on an unsupported page will cause that context to fail.') .' '.
-          t('Additionally, the User context should apply on all pages as a fallback. If no context applies on a given page, errors will occur.') .'</p>',
-    );
-    $options = array(-1 => t('Use module default settings.'), 0 => t('Show on every page except the listed pages.'), 1 => t('Show on only the listed pages.'));
-    $description = t("Enter one page per line as Drupal paths. The '*' character is a wildcard. Example paths are %blog for the blog page and %blog-wildcard for every personal blog. %front is the front page.", array('%blog' => 'blog', '%blog-wildcard' => 'blog/*', '%front' => '<front>'));
-    if ($access) {
-      $options[2] = t('Show if the following PHP code returns <code>TRUE</code> (PHP-mode, experts only).');
-      $description .= ' '. t('If the PHP-mode is chosen, enter PHP code between %php. Note that executing incorrect PHP-code can break your Drupal site.', array('%php' => '<?php ?>'));
-    }
-    if (module_exists('context')) {
-      $options[3] = t('Use the conditions from a Context from the Context module');
-      drupal_add_js(drupal_get_path('module', 'facebook_status') .'/resources/facebook_status_admin.js');
-    }
-    $form['page_vis_settings']['visibility'] = array(
-      '#type' => 'radios',
-      '#title' => t('Apply context on specific pages'), 
-      '#options' => $options, 
-      '#default_value' => isset($context['visibility']) ? ($context['visibility'] == 3 && !module_exists('context') ? -1 : $context['visibility']) : -1,
-    );
-    if (module_exists('context')) {
-      $form['page_vis_settings']['context'] = array(
-        '#type' => 'select',
-        '#title' => t('Context'),
-        '#description' => t('Choose a context provided by the Context module whose conditions should be evaluated to determine whether the stream context applies.'),
-        '#default_value' => isset($context['context']) ? $context['context'] : '',
-        '#options' => drupal_map_assoc(array_keys(context_enabled_contexts())),
-      );
-    }
-    else {
-      $form['page_vis_settings']['context'] = array(
-        '#type' => 'value',
-        '#value' => isset($context['context']) ? $context['context'] : '',
-      );
-    }
-    $form['page_vis_settings']['pages'] = array(
-      '#type' => 'textarea', 
-      '#title' => t('Pages'), 
-      '#default_value' => isset($context['pages']) ? $context['pages'] : '', 
-      '#description' => $description,
-    );
-  }
-
-  $form['submit'] = array(
-    '#type' => 'submit',
-    '#value' => t('Save'),
-  );
-  $form['type'] = array(
-    '#type' => 'hidden',
-    '#value' => $type,
-  );
-  $form['already_saved'] = array(
-    '#type' => 'hidden',
-    '#value' => isset($context['in_db']) ? $context['in_db'] : FALSE,
-  );
-  $form['weight'] = array(
-    '#type' => 'hidden',
-    '#default_value' => isset($context['weight']) ? $context['weight'] : 0,
-  );
-  return $form;
-}
-
-/**
- * The submit callback for the individual stream context configuration form.
- */
-function facebook_status_admin_context_settings_submit($form, &$form_state) {
-  $v = $form_state['values'];
-  $record = array(
-    'type' => $v['type'],
-    'weight' => intval($v['weight']),
-    'view' => $v['view'],
-    'selectors' => $v['selectors'],
-    'visibility' => intval($v['visibility']),
-    'pages' => $v['pages'],
-    'context' => $v['context'],
-  );
-  if ($v['already_saved']) {
-    drupal_write_record('facebook_status_contexts', $record, 'type');
-  }
-  else {
-    drupal_write_record('facebook_status_contexts', $record);
-  }
-  if (isset($v['other_view'])) {
-    variable_set('facebook_status_user_other_view', $v['other_view']);
-  }
-  drupal_set_message(t('The configuration options have been saved.'));
+    '</p><p>' .
+    t('Also note that the view assigned to the "User profiles" context does not affect the view shown on conversation pages.') .
+    '</p>';
+  $output .= theme('table', array('header' => $header, 'rows' => $rows, 'attributes' => array('id' => 'facebook-status-admin-contexts-table')));
+  $output .= drupal_render_children($form);
+  return $output;
 }
diff -u -p1 -r -N -b -B -w facebook_status_6_3/includes/utility/facebook_status.ahah.inc screamwork_fbss7/includes/utility/facebook_status.ahah.inc
--- facebook_status_6_3/includes/utility/facebook_status.ahah.inc	2011-04-09 19:23:26.533617200 -0400
+++ screamwork_fbss7/includes/utility/facebook_status.ahah.inc	1969-12-31 19:00:00.000000000 -0500
@@ -1,58 +0,0 @@
-<?php
-
-/**
- * @file
- *   Utility functions for handling the AHAH callback for the status update form.
- */
-
-/**
- * Saves statuses via AHAH.
- */
-function facebook_status_save_js() {
-  //Make sure we have form stuff available.
-  module_load_include('inc', 'facebook_status', 'includes/utility/facebook_status.form');
-  $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) {
-    watchdog('facebook_status', 'Someone tried to access the JavaScript processing page for Facebook-style Statuses directly.', array(), WATCHDOG_DEBUG);
-    drupal_goto('user');
-    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['slider']      = $form['slider'];
-  $new_form['fbss-status'] = $form['fbss-status'];
-  $new_form['chars']       = $form['chars'];
-  $new_form['fbss-submit'] = $form['fbss-submit'];
-  $new_form['sdefault']    = $form['sdefault'];
-  //Clear the status form after it's already been submitted once to prevent confusion.
-  unset($new_form['status']['#default_value']);
-  //Calls hook_facebook_status_form_ahah_alter(&$new_form, $form).
-  drupal_alter('facebook_status_form_ahah', $new_form, $form);
-  //If the $form['fbss-submit']['#ahah']['wrapper'] div was found in a #prefix or #suffix of a form element that we re-rendered here,
-  //then we would have to unset() it to prevent duplicate wrappers. However, we have a somewhat unique implementation in which the wrappers
-  //are actually their own elements, so this is not an issue.
-  $output = theme('status_messages') . drupal_render($new_form);
-
-  //Return the results.
-  //The standard way is drupal_json(array('status' => TRUE, 'data' => $output));
-  //However, this doesn't work with file uploading and re-attaching AHAH behaviors to form elements.
-  //This version does work for these things.
-  //From the AHAH Helper module, see http://drupal.org/node/331941
-  //And from the Filefield module.
-  $javascript = drupal_add_js(NULL, NULL, 'header');
-  $GLOBALS['devel_shutdown'] = FALSE; //Still not really sure what the point of this is.
-  echo drupal_to_js(array(
-    'status' => TRUE,
-    'data' => $output,
-    'settings' => call_user_func_array('array_merge_recursive', $javascript['setting']),
-  ));
-  exit;
-}
diff -u -p1 -r -N -b -B -w facebook_status_6_3/includes/utility/facebook_status.announce.inc screamwork_fbss7/includes/utility/facebook_status.announce.inc
--- facebook_status_6_3/includes/utility/facebook_status.announce.inc	2011-04-09 19:23:26.534617300 -0400
+++ screamwork_fbss7/includes/utility/facebook_status.announce.inc	2011-05-25 20:53:28.000000000 -0400
@@ -10,6 +10,6 @@
  */
-function facebook_status_announce_admin(&$form_state) {
+function facebook_status_announce_admin($form, &$form_state) {
   $form = array();
   $form['info'] = array(
-    '#value' => t('Warning: this can be very slow on sites with lots of users.'),
+    '#markup' => t('Warning: this can be very slow on sites with lots of users.'),
   );
@@ -57,3 +59,3 @@ function facebook_status_announce_admin_
 
-  $count = db_result(db_query("SELECT COUNT(*) FROM {users} WHERE status = 1"));
+  $count = db_query("SELECT COUNT(DISTINCT uid) FROM {users} WHERE status = :status", array(':status' => 1))->fetchField();
   $batch = array(
@@ -64,3 +66,3 @@ function facebook_status_announce_admin_
     'title' => t('Sending message to all users'),
-    'file' => drupal_get_path('module', 'facebook_status') .'/facebook_status.announce.inc',
+    'file' => drupal_get_path('module', 'facebook_status') . '/includes/utility/facebook_status.announce.inc',
   );
@@ -82,15 +85,40 @@ function facebook_status_announce_admin_
 function facebook_status_announce_generate_status($message, $from, $count, $format, &$context) {
+  // because of userid = 1, admin doesn't send himself.
+  $count = $count - 1;
   if (!isset($context['sandbox']['progress'])) {
     $context['sandbox']['progress'] = 0;
+    $context['sandbox']['current_userid'] = 1;
+    $context['sandbox']['max'] = $count;
   }
-  $uid = db_result(db_query_range("SELECT uid FROM {users} WHERE status = 1", $context['sandbox']['progress'], 1));
-  // Caching here is actually slower than not caching because we should only load each user once.
-  // So we use user_load() instead of _facebook_status_user_load().
-  $to = user_load(array('uid' => $uid));
+  $limit = $count;
+  
+  $result = db_select('users', 'uid')
+    ->fields('uid')
+    ->condition('uid', $context['sandbox']['current_userid'], '>')
+    ->condition('status', 1)
+    ->orderBy('uid')
+    ->range(0, $limit)
+    ->execute();
+  
+  foreach ($result as $row) {
+
+    $to = user_load($row->uid);
+    //$context['message'] = check_plain($to->name);
+    
+    $context['message'] = t('Sending message to @user (@current of @total)',
+    array('@user' => $to->name, '@current' => $context['sandbox']['progress'], '@total' => $count));
+    
   facebook_status_save_status($to, 'user', $message, $from);
-  $context['message'] = t('Sending message to %user (@current of @total)',
-    array('%user' => $to->name, '@current' => $context['sandbox']['progress'], '@total' => $count));
-  $context['sandbox']['progress']++;
+    
   $context['results'][] = check_plain($to->name);
-  $context['finished'] = $context['sandbox']['progress'] / $count;
+    
+    $context['sandbox']['current_userid'] = $to->uid;
+    
+	  if ($context['sandbox']['progress'] != $context['sandbox']['max']) {
+	    $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];
+	  }
+	  $context['sandbox']['progress']++;
+    
+  }
+  
 }
@@ -107,3 +136,3 @@ function facebook_status_announce_batch_
         'Sent message to @count users: !list',
-        array('!list' => theme('item_list', $results))
+        array('!list' => theme('item_list', array('items' => $results)))
       ));
@@ -119,3 +148,3 @@ function facebook_status_announce_batch_
         '%error_operation' => $error_operation[0],
-        '@arguments' => print_r($error_operation[1], TRUE)
+      '@arguments' => print_r($error_operation[1], TRUE),
       )
diff -u -p1 -r -N -b -B -w facebook_status_6_3/includes/utility/facebook_status.contexts.inc screamwork_fbss7/includes/utility/facebook_status.contexts.inc
--- facebook_status_6_3/includes/utility/facebook_status.contexts.inc	2011-06-30 00:55:51.802139200 -0400
+++ screamwork_fbss7/includes/utility/facebook_status.contexts.inc	2011-05-25 20:53:28.000000000 -0400
@@ -19,2 +19,4 @@ class facebook_status_context {
    * The context type.
+   * Used to automatically determine several values, but not required by
+   * subclasses if those values are overridden.
    */
@@ -137,20 +139,2 @@ class facebook_status_user_context exten
   function find_recipient() {
-    global $user;
-    // On the conversation page, the active user is actually the *other* user.
-    if (arg(0) == 'statuses' && arg(1) == 'conversation') {
-      $args = explode(',', arg(2));
-      $count = count($args);
-      if ($count === 1) {
-        return is_numeric($args[0]) ? _facebook_status_user_load($args[0]) : $user;
-      }
-      elseif ($count == 2) {
-        if ($args[0] == $user->uid) {
-          return is_numeric($args[1]) ? _facebook_status_user_load($args[1]) : $user;
-        }
-        elseif ($args[1] == $user->uid) {
-          return is_numeric($args[0]) ? _facebook_status_user_load($args[0]) : $user;
-        }
-      }
-      return $user;
-    }
     return arg(0) == 'user' && is_numeric(arg(1)) ? /* menu_get_object('user') */ _facebook_status_user_load(arg(1)) : $GLOBALS['user'];
@@ -162,7 +146,11 @@ class facebook_status_user_context exten
   function load_random_recipient() {
-    $uid = db_result(db_query_range("SELECT uid FROM {users} WHERE status = 1 ORDER BY RAND() ASC", 0, 1));
-    return $this->load_recipient($uid);
+    $uids = devel_get_users();
+    if (!empty($uids)) {
+      $uid = $uids[array_rand($uids)];
+      return $this->load_recipient($id);
+    }
+    return user_load(0);
   }
   function recipient_link($recipient) {
-    return theme('username', $recipient);
+    return theme('username', array('account' => $recipient));
   }
@@ -196,4 +184,4 @@ class facebook_status_node_context exten
   function load_random_recipient() {
-    $nid = db_result(db_query_range("SELECT nid FROM {node} ORDER BY RAND() ASC", 0, 1));
-    return node_load(array('nid' => $nid));
+    $nid = db_query_range("SELECT nid FROM {node} ORDER BY RAND() ASC")->fetchField();
+    return node_load($nid);
   }
@@ -236,4 +224,3 @@ class facebook_status_og_context extends
   function access_add($recipient, $sender) {
-    // Only group members can add content of any kind.
-    return parent::access_add($recipient, $sender) &&
+    return parent::access_add($recipient, $sender) ||
       og_is_group_member($recipient->nid, TRUE, $sender->uid);
@@ -245,47 +232,8 @@ class facebook_status_og_context extends
   function access_view($status, $account) {
-    // Only group members can view group statuses if the group is private.
-    return parent::access_view($status, $account) &&
-      (og_is_group_member($status->recipient, TRUE, $account->uid) || empty($this->load_recipient($status->recipient)->og_private));
-  }
-  function access_stream($recipient, $account) {
-    // Only group members can view group statuses if the group is private.
-    return parent::access_stream($recipient, $account) &&
-      (og_is_group_member($recipient->nid, TRUE, $account->uid) || empty($recipient->og_private));
-  }
-}
-
-/**
- * The taxonomy term context.
- */
-class facebook_status_term_context extends facebook_status_context {
-  function type() {
-    return 'term';
-  }
-  function is_applicable() {
-    return arg(0) == 'taxonomy' && arg(1) == 'term' && is_numeric(arg(2));
-  }
-  function find_recipient() {
-    return $this->is_applicable() ? taxonomy_get_term(arg(2)) : new stdClass();
-  }
-  function load_recipient($id) {
-    return taxonomy_get_term($id);
-  }
-  function load_random_recipient() {
-    $tid = db_result(db_query_range("SELECT tid FROM {term_data} ORDER BY RAND() ASC", 0, 1));
-    return taxonomy_get_term($tid);
-  }
-  function recipient_id($recipient) {
-    return isset($recipient->tid) ? $recipient->tid : 0;
-  }
-  function recipient_url($recipient) {
-    return 'taxonomy/term/'. $this->recipient_id($recipient);
-  }
-  function recipient_name($recipient) {
-    return isset($recipient->name) ? $recipient->name : '';
-  }
-  function access_view($status, $account) {
-    return parent::access_view($status, $account) || user_access('administer taxonomy', $account);
+    return parent::access_view($status, $account) ||
+      og_is_group_member($status->recipient, TRUE, $account->uid);
   }
   function access_stream($recipient, $account) {
-    return parent::access_stream($recipient, $account) || user_access('administer taxonomy', $account);
+    return parent::access_stream($recipient, $account) ||
+      og_is_group_member($recipient->nid, TRUE, $account->uid);
   }
diff -u -p1 -r -N -b -B -w facebook_status_6_3/includes/utility/facebook_status.conversation.inc screamwork_fbss7/includes/utility/facebook_status.conversation.inc
--- facebook_status_6_3/includes/utility/facebook_status.conversation.inc	2011-04-09 19:23:26.535617300 -0400
+++ screamwork_fbss7/includes/utility/facebook_status.conversation.inc	2011-05-25 20:53:28.000000000 -0400
@@ -42,4 +43,3 @@ function _facebook_status_conversation()
   if ($count > 2 || $count < 1 || ($count == 1 && $args[0] == $user->uid) || !is_numeric($args[0]) || ($count == 2 && !is_numeric($args[1]))) {
-    drupal_not_found();
-    return;
+    return drupal_not_found();
   }
@@ -50,4 +50,6 @@ function _facebook_status_conversation()
     }
-    $arg = implode(',', $args);
-    return views_embed_view('facebook_status_conversation', 'default', $arg, $arg);
+    $arg = implode('/', $args);
+    #print_R($arg); die();
+    //return views_embed_view('facebook_status_conversation', 'default', $arg, $arg);
+    return views_embed_view('facebook_status_conversation', 'default', $args[0], $args[1]);
   }
@@ -56,5 +58,5 @@ function _facebook_status_conversation()
   if (facebook_status_user_access('converse') && !empty($recipient->uid)) {
-    return theme('facebook_status_form_display', $recipient, 'user');
+    return theme('facebook_status_form_display', array('recipient' => $recipient, 'type' => 'user'));
   }
-  drupal_not_found();
+  return drupal_not_found();
 }
diff -u -p1 -r -N -b -B -w facebook_status_6_3/includes/utility/facebook_status.edit.inc screamwork_fbss7/includes/utility/facebook_status.edit.inc
--- facebook_status_6_3/includes/utility/facebook_status.edit.inc	2011-06-08 16:17:35.559958200 -0400
+++ screamwork_fbss7/includes/utility/facebook_status.edit.inc	2011-05-25 20:53:28.000000000 -0400
@@ -10,11 +10,7 @@
  */
-function facebook_status_edit(&$form_state, $status) {
+function facebook_status_edit($form, &$form_state, $status) {
   $context = facebook_status_determine_context($status->type);
-  $maxlength = variable_get('facebook_status_length', 140);
-  $path = drupal_get_path('module', 'facebook_status') .'/resources';
-  drupal_add_js($path .'/facebook_status.js');
-  drupal_add_css($path .'/facebook_status.css');
-  if (module_exists('modalframe')) {
-    modalframe_child_js();
-  }
+  //$path = drupal_get_path('module', 'facebook_status') . '/resources';
+  //drupal_add_js($path . '/facebook_status.js');
+  //drupal_add_css($path . '/facebook_status.css');
   $intro = _facebook_status_get_edit_intro($status, $context);
@@ -26,4 +22,6 @@ function facebook_status_edit(&$form_sta
   $form['intro'] = array(
-    '#value' => '<div class="clear-block facebook-status-update facebook-status-form-type-'. $status->type . $self .'">'.
-      '<span class="facebook-status-intro">'. $intro .'</span>',
+    '#type' => 'markup',
+    '#markup' => '<span class="facebook-status-intro">' . $intro . '</span>',
+    '#prefix' => '<div class="clear-block facebook-status-update facebook-status-form-type-' . $status->type . $self . '>',
+    '#suffix' => '</div>',
     '#weight' => -45,
@@ -34,3 +32,2 @@ function facebook_status_edit(&$form_sta
     '#default_value' => $status->message,
-    '#attributes' => array('class' => 'facebook-status-text'),
     '#resizable' => FALSE,
@@ -38,10 +35,4 @@ function facebook_status_edit(&$form_sta
   );
-  if ($maxlength > 0) {
-    $form['chars'] = array(
-      '#value' => '<span class="facebook-status-chars">'. t('%chars characters allowed', array('%chars' => $maxlength)) .'</span>',
-      '#weight' => -38,
-    );
-  }
   $form['sid'] = array(
-    '#type' => 'value',
+    '#type' => 'hidden',
     '#value' => $status->sid,
@@ -52,8 +43,4 @@ function facebook_status_edit(&$form_sta
     '#value' => t('Save'),
-    '#attributes' => array('class' => 'facebook-status-submit'),
-    '#suffix' => '</div>',
     '#weight' => -25,
   );
-  // @todo: This is bad. It should be in the CSS but that doesn't seem to be working.
-  $form['#attributes'] = array('style' => 'margin-bottom: 0;');
   return $form;
@@ -65,6 +52,3 @@ function facebook_status_edit(&$form_sta
 function facebook_status_edit_validate($form, &$form_state) {
-  $maxlen = variable_get('facebook_status_length', 140);
-  if (drupal_strlen($form_state['values']['fbss-status']) > $maxlen && $maxlen != 0) {
-    form_set_error('status', t('The status must be no longer than %chars characters.', array('%chars' => $maxlen)));
-  }
+	return;
 }
@@ -75,8 +59,31 @@ function facebook_status_edit_validate($
 function facebook_status_edit_submit($form, &$form_state) {
-  facebook_status_edit_status(facebook_status_load($form_state['values']['sid']), $form_state['values']['fbss-status']);
-  $form_state['redirect'] = empty($_GET['destination']) ? array('statuses/share') : array($_GET['destination']);
+  $status_old = facebook_status_load($form_state['values']['sid']);
+  $context = facebook_status_determine_context($status_old->type);
+  $new_status = trim($form_state['values']['fbss-status']);
+  $time = REQUEST_TIME;
+  //global $user;
+  //Pretend to have set a new status if the submitted status is exactly the same as the old one.
+  if ($new_status != $status_old->message) {
+    db_update('facebook_status')
+		  ->fields(array(
+		    'message' => $new_status,
+		    'created' => $time,
+		  ))
+		  ->condition('sid', $status_old->sid)
+		  ->execute();
+    //Invokes hook_facebook_status_save($status, $edit).
+    $status_old->message = $new_status;
+    $status_old->created = $time;
+    module_invoke_all('facebook_status_save', $status_old, $context, TRUE);
+  }
+  $form_state['redirect'] = isset($_GET['destination']) ? $_GET['destination'] : 'statuses/share';
   drupal_set_message(t('Status has been successfully edited.'));
-  // Modal Frame integration.
-  if (module_exists('modalframe')) {
-    modalframe_close_dialog();
+  
+  //Trigger integration. Don't call if the status is blank because usually nothing interesting is happening.
+  if (module_exists('trigger') && !empty($new_status)) {
+    $op = 'fbss_edited_' . $status_old->type;
+    if ($status_old->type == 'user') {
+      $op .= ($status_old->recipient == $status_old->sender ? '_self' : '_other');
+    }
+    module_invoke_all('facebook_status', $op, $status_old, $context);
   }
@@ -87,7 +94,7 @@ function facebook_status_edit_submit($fo
  */
-function _facebook_status_delete(&$form_state, $status) {
-  if (module_exists('modalframe')) {
-    modalframe_child_js();
-  }
-  $form['infotext'] = array('#value' => '<p>'. t('Are you sure you want to permanently delete the status %status?', array('%status' => $status->message)) .'</p>');
+function _facebook_status_delete($form, &$form_state, $status) {
+  $form['infotext'] = array(
+    '#type' => 'markup',
+    '#markup' => '<p>' . t('Are you sure you want to permanently delete the status !status?', array('!status' => $status->message)) . '</p>'
+  );
   $form['confirm'] = array(
@@ -103,3 +110,3 @@ function _facebook_status_delete(&$form_
   $form['status-sid'] = array(
-    '#type' => 'value',
+    '#type' => 'hidden',
     '#value' => $status->sid,
@@ -114,5 +121,6 @@ function _facebook_status_delete_confirm
   $status = facebook_status_load($form_state['values']['status-sid']);
-  facebook_status_delete_status($status);
+  facebook_status_delete_status($status->sid);
   drupal_set_message(t('Status deleted.'));
-  if ($_GET['destination']) {
+  
+  if (isset($_GET['destination'])) {
     $form_state['redirect'] = $_GET['destination'];
@@ -120,6 +128,3 @@ function _facebook_status_delete_confirm
   else {
-    $form_state['redirect'] = ($status->type == 'user' ? 'user' : '<front>');
-  }
-  if (module_exists('modalframe')) {
-    modalframe_close_dialog();
+    $form_state['redirect'] = $status->type == 'user' ? 'user' : '<front>';
   }
@@ -132,3 +137,3 @@ function _facebook_status_delete_cancel(
   $status = facebook_status_load($form_state['values']['status-sid']);
-  if ($_GET['destination']) {
+  if (isset($_GET['destination'])) {
     $form_state['redirect'] = $_GET['destination'];
@@ -136,6 +141,3 @@ function _facebook_status_delete_cancel(
   else {
-    $form_state['redirect'] = ($status->type == 'user' ? 'user' : '<front>');
-  }
-  if (module_exists('modalframe')) {
-    modalframe_close_dialog();
+    $form_state['redirect'] = $status->type == 'user' ? 'user' : '<front>';
   }
@@ -162,4 +164,4 @@ function _facebook_status_get_edit_intro
       $intro = '<strong>'. t('Original message from you to !recipient: !status', array(
-        '!recipient' => theme('username', _facebook_status_user_load($status->recipient)),
-        '!status' => $orig
+        '!recipient' => theme('username', array('account' => _facebook_status_user_load($status->recipient))),
+        '!status' => $orig,
       )) .'</strong>';
@@ -168,4 +170,4 @@ function _facebook_status_get_edit_intro
       $intro = '<strong>'. t('Original message from !sender to you: !status', array(
-        '!sender' => theme('username', _facebook_status_user_load($status->sender)),
-        '!status' => $orig
+        '!sender' => theme('username', array('account' => _facebook_status_user_load($status->sender))),
+        '!status' => $orig,
       )) .'</strong>';
@@ -174,4 +176,4 @@ function _facebook_status_get_edit_intro
       $intro = '<strong>'. t('Original status by !creator: !status', array(
-        '!creator' => theme('username', _facebook_status_user_load($status->sender)),
-        '!status' => $orig
+        '!creator' => theme('username', array('account' => _facebook_status_user_load($status->sender))),
+        '!status' => $orig,
       )) .'</strong>';
@@ -180,5 +182,5 @@ function _facebook_status_get_edit_intro
       $intro = '<strong>'. t('Original message from !sender to !recipient: !status', array(
-        '!sender' => theme('username', _facebook_status_user_load($status->sender)),
-        '!recipient' => theme('username', _facebook_status_user_load($status->recipient)),
-        '!status' => $orig
+        '!sender' => theme('username', array('account' => _facebook_status_user_load($status->sender))),
+        '!recipient' => theme('username', array('account' => _facebook_status_user_load($status->recipient))),
+        '!status' => $orig,
       )) .'</strong>';
@@ -190,3 +192,3 @@ function _facebook_status_get_edit_intro
         '!recipient' => $context['handler']->recipient_link($context['handler']->load_recipient($status->recipient)),
-        '!status' => $orig
+        '!status' => $orig,
       )) .'</strong>';
@@ -195,5 +197,5 @@ function _facebook_status_get_edit_intro
       $intro = '<strong>'. t('Original message from !sender to !recipient: !status', array(
-        '!sender' => theme('username', _facebook_status_user_load($status->sender)),
+        '!sender' => theme('username', array('account' => _facebook_status_user_load($status->sender))),
         '!recipient' => $context['handler']->recipient_link($context['handler']->load_recipient($status->recipient)),
-        '!status' => $orig
+        '!status' => $orig,
       )) .'</strong>';
diff -u -p1 -r -N -b -B -w facebook_status_6_3/includes/utility/facebook_status.form.inc screamwork_fbss7/includes/utility/facebook_status.form.inc
--- facebook_status_6_3/includes/utility/facebook_status.form.inc	2011-06-14 11:33:45.496250500 -0400
+++ screamwork_fbss7/includes/utility/facebook_status.form.inc	2011-05-25 20:53:28.000000000 -0400
@@ -22,9 +22,4 @@
  *   requested by the context.
- * @param $display
- *   The machine name of the view display. This is not used internally but
- *   provided in case any external applications need it. There is no error
- *   checking on this parameter; it is the caller's responsibility to ensure
- *   that the specified display is valid and belongs to the relevant view.
  * @return
- *   HTML to display the status update form, or FALSE if:
+ *   $build Array display the status update form, or FALSE if:
  *   - The current user has no access to both the form and the associated
@@ -34,3 +29,6 @@
  */
-function theme_facebook_status_form_display($context = NULL, $type = NULL, $view = NULL, $display = 'default') {
+function theme_facebook_status_form_display($variables) {
+  $context = $variables['recipient'];
+  $type = $variables['type'];
+  $view = $variables['view'];
   global $user;
@@ -54,10 +52,9 @@ function theme_facebook_status_form_disp
     $view = $context['view'];
-    // Special case, user context has 2 default views
-    if ($type == 'user' && $user->uid != $context['handler']->recipient_id($recipient)) {
-      $view = variable_get('facebook_status_user_other_view', 'facebook_status_stream');
     }
-  }
-  $selectors = module_invoke_all('facebook_status_refresh_selectors', $recipient, $type) + explode("\n", $context['selectors']);
+  
+  $selectors = module_invoke_all('facebook_status_refresh_selectors', $recipient, $type) + explode("\n", isset($context['selectors']));
   $conversation = (arg(0) == 'statuses' && arg(1) == 'conversation' && $type == 'user');
-  $output = '';
+  
+  $build = array();
+  
   if (facebook_status_user_access('add', $recipient, $type, $user)) {
@@ -71,4 +68,5 @@ function theme_facebook_status_form_disp
     }
-    $output .= '<div class="clear-block facebook-status-update facebook-status-update-main facebook-status-form-type-'. $type . $self . $converse .'">'.
-      drupal_get_form('facebook_status_box', $recipient, $type) .'</div>';
+    $build['form'] = drupal_get_form('facebook_status_box', $recipient, $type);
+    $build['form']['#prefix'] = '<div class="clear-block facebook-status-update facebook-status-update-main facebook-status-form-type-' . $type . $self . $converse . '">';
+    $build['form']['#suffix'] = '</div>';
   }
@@ -81,3 +79,4 @@ function theme_facebook_status_form_disp
       }
-      $output .= views_embed_view('facebook_status_conversation', $display, $args[0], $args[1]);
+      //$arg = implode(',', $args);
+      $build['view']['#markup'] = views_embed_view('facebook_status_conversation', 'default', $args[0], $args[1]);
       $selectors[] = '.view-id-facebook_status_conversation';
@@ -85,4 +84,4 @@ function theme_facebook_status_form_disp
   }
-  elseif (!empty($view) && facebook_status_user_access('view_stream', $recipient, $type, $user)) {
-    $output .= views_embed_view($view, $display, $context['handler']->recipient_id($recipient), $type);
+  elseif (!empty($view)) {
+    $build['view']['#markup'] = views_embed_view($view, 'default', $context['handler']->recipient_id($recipient), $type);
     $selectors[] = '.view-id-'. $view;
@@ -92,6 +91,6 @@ function theme_facebook_status_form_disp
     drupal_add_js(array('facebook_status' => array(
-      'refreshIDs' => array_unique($selectors)
-    )), 'setting');
+        'refreshIDs' => array_unique($selectors),
+      )), array('type' => 'setting', 'scope' => JS_DEFAULT));
   }
-  return $output;
+  return drupal_render($build);
 }
@@ -108,5 +107,11 @@ function theme_facebook_status_form_disp
  */
-function facebook_status_box(&$form_state, $recipient, $type = 'user') {
+function facebook_status_box($form, &$form_state, $recipient, $type = 'user') {
   global $user;
   _facebook_status_use_autogrow();
+  
+  drupal_add_js('jQuery(document).ready(function () { 
+    jQuery(".facebook-status-text").autogrow();
+  });', 
+  array('type' => 'inline', 'scope' => 'footer', 'weight' => 5));
+  
   if (isset($form_state['facebook_status'])) {
@@ -119,2 +124,4 @@ function facebook_status_box(&$form_stat
     $context = facebook_status_determine_context($type);
+    $type = $context['handler']->type();
+    $recipient = $context['handler']->find_recipient();
     $rid = $context['handler']->recipient_id($recipient);
@@ -124,3 +130,3 @@ function facebook_status_box(&$form_stat
   $intro = '';
-  if (arg(0) == 'statuses' && (arg(1) == 'share' || arg(1) == 'conversation')) {
+  if (arg(0) == 'statuses' && arg(1) == 'share') {
     // This page is autofocused. We don't want default text there since the user would have to manually remove it.
@@ -138,3 +144,3 @@ function facebook_status_box(&$form_stat
     $rs = facebook_status_load($_GET['sid']);
-    $sender = _facebook_status_user_load($rs->sender);
+    $sender = user_load($rs->sender);
     if ($sender->uid != $user->uid && $rs->message) {
@@ -145,3 +151,3 @@ function facebook_status_box(&$form_stat
       }
-      $default = str_replace(array('@name', '@message'), array($name, $rs->message), variable_get('facebook_status_repost', 'Re: @name @message '));
+      $default = str_replace(array('@name', '@status'), array($name, $rs->message), variable_get('facebook_status_repost', 'Re: @name @status '));
       $intro = '';
@@ -152,3 +158,3 @@ function facebook_status_box(&$form_stat
     if ($status->sid) {
-      $sender = user_load(array('uid' => $status->sender));
+      $sender = user_load($status->sender);
       if ($sender->uid != $user->uid) {
@@ -159,5 +165,5 @@ function facebook_status_box(&$form_stat
         }
-        $default = $name .' ';
+        $default = $name;
       }
-      $intro = t('In response to: !status', array('!status' => facebook_status_show($status, array('links' => FALSE, 'extras' => FALSE))));
+      $intro = t('In response to !status', array('!status' => theme('facebook_status_item', array('status' => $status, 'options' => array('links' => FALSE)))));  
     }
@@ -165,15 +171,6 @@ function facebook_status_box(&$form_stat
 
-  $path = drupal_get_path('module', 'facebook_status') .'/resources';
-  drupal_add_js($path .'/facebook_status.js');
-  drupal_add_js($path .'/facebook_status_ahah.js', 'module', 'footer');
-  drupal_add_css($path .'/facebook_status.css');
-  $form = array('#cache' => TRUE);
-  // Form elements between ['opendiv'] and ['closediv'] will be refreshed via AHAH on form submission.
-  $form['opendiv'] = array(
-    '#value' => '<div id="facebook-status-replace">',
-    '#weight' => -50,
-  );
   if (!empty($intro)) {
     $form['intro'] = array(
-      '#value' => '<span class="facebook-status-intro">'. $intro .'</span>',
+      '#type' => 'markup',
+      '#markup' => '<span class="facebook-status-intro">' . $intro . '</span>',
       '#weight' => -45,
@@ -181,8 +178,2 @@ function facebook_status_box(&$form_stat
   }
-  if (variable_get('facebook_status_length', 140) > 0) {
-    $form['chars'] = array(
-      '#value' => '<span class="facebook-status-chars">'. t('%chars characters allowed', array('%chars' => variable_get('facebook_status_length', 140))) .'</span>',
-      '#weight' => module_exists('fbss_privacy') ? -41 : -24,
-    );
-  }
   $form['fbss-status'] = array(
@@ -191,35 +182,8 @@ function facebook_status_box(&$form_stat
     '#default_value' => $default,
-    '#attributes' => array('class' => 'facebook-status-text facebook-status-text-main'),
-    '#resizable' => FALSE,
     '#weight' => -40,
-    '#prefix' => '<div style="clear: both;">',
-    '#suffix' => '</div>',
-  );
-  $form['fbss-submit'] = array(
-    '#type' => 'submit',
-    '#value' => t('Share'),
-    '#submit' => array('facebook_status_box_submit'),
-    '#attributes' => array('class' => 'facebook-status-submit'),
-    '#weight' => -25,
-  );
-  if (variable_get('facebook_status_ahah', 1)) {
-    $form['fbss-submit']['#ahah'] = array(
-      'path' => 'facebook_status/js',
-      'wrapper' => 'facebook-status-replace',
-      'effect' => 'fade',
-      'method' => 'replace',
-    );
-  }
-  $form['sdefault'] = array(
-    '#type' => 'value',
-    '#value' => $default,
-    '#weight' => -10,
-  );
-  // Form elements between ['opendiv'] and ['closediv'] will be refreshed via AHAH on form submission.
-  $form['closediv'] = array(
-    '#value' => '</div>',
-    '#weight' => -1,
+    '#attributes' => array('class' => array('facebook-status-text facebook-status-text-main')), 
+    '#prefix' => '<div id="facebook-status-replace">',
   );
   $form['recipient'] = array(
-    '#type' => 'value',
+    '#type' => 'hidden',
     '#value' => $context['handler']->recipient_id($recipient),
@@ -228,3 +192,3 @@ function facebook_status_box(&$form_stat
   $form['type'] = array(
-    '#type' => 'value',
+    '#type' => 'hidden',
     '#value' => $type,
@@ -232,5 +196,26 @@ function facebook_status_box(&$form_stat
   );
+  $form['sdefault'] = array(
+    '#type' => 'hidden',
+    '#value' => $default,
+    '#weight' => -10,
+  );
+  $form['fbss-submit'] = array(
+    '#type' => 'submit',
+    '#value' => t('Share'),
+    '#submit' => array('facebook_status_box_submit'),
+    '#weight' => -25,
+    '#attributes' => array('class' => array('facebook-status-submit')),
+    '#suffix' => '</div>',
+    /*
+    '#ajax' => array(
+      'callback' => 'fb_cb',
+      'wrapper' => 'facebook-status-replace',
+      'method' => 'replace',
+    ),
+    */
+  );
   if (arg(0) == 'statuses' && arg(1) == 'share' && !empty($_GET['destination']) && $_GET['destination'] != $_GET['q']) {
     $form['back'] = array(
-      '#value' => l(t('Back'), $_GET['destination'], array('attributes' => array('class' => 'facebook-status-back'))),
+      '#type' => 'markup',
+      '#markup' => l(t('Back'), $_GET['destination'], array('attributes' => array('class' => 'facebook-status-back'), 'html' => 'true')),
       '#weight' => 20,
@@ -245,9 +230,2 @@ function facebook_status_box(&$form_stat
 function facebook_status_box_validate($form, &$form_state) {
-  $maxlen = variable_get('facebook_status_length', 140);
-  $len = drupal_strlen($form_state['values']['fbss-status']);
-  if ($len > $maxlen && $maxlen != 0) {
-    form_set_error('status',
-      t('You may use a maximum of %maxchars characters, but you are using %chars characters.',
-      array('%maxchars' => $maxlen, '%chars' => $len)));
-  }
 }
@@ -264,3 +242,2 @@ function facebook_status_box_submit($for
   $default = $form_state['values']['sdefault'];
-  $form_state['facebook_status'] = array();
   // Don't save the status if it wasn't changed from the default.
@@ -269,11 +246,4 @@ function facebook_status_box_submit($for
     if (isset($new_status_obj->sid)) {
-      $form_state['facebook_status']['sid'] = $new_status_obj->sid;
-    }
+      module_invoke('facebook_status_tags', 'facebook_status_save', $new_status_obj, $context, FALSE);
   }
-  $form_state['facebook_status']['type'] = $type;
-  $form_state['facebook_status']['recipient'] = $rid;
-  $form_state['rebuild'] = TRUE;
-  if (!variable_get('facebook_status_ahah', 1)) {
-    $form_state['redirect'] = array($_GET['q']);
-    $form_state['rebuild'] = FALSE;
   }
@@ -285,18 +255,8 @@ function facebook_status_box_submit($for
 function _facebook_status_use_autogrow() {
-  $path = cache_get('fbss:autogrow');
-  if (!empty($path)) {
-    drupal_add_js($path->data);
-    return;
-  }
   if (module_exists('libraries')) {
-    $path = libraries_get_path('autogrow') .'/jquery.autogrow.js';
-    if (file_exists($path)) {
-      drupal_add_js($path);
-      cache_set('fbss:autogrow', $path);
+    drupal_add_js(libraries_get_path('autogrow') . '/jquery.autogrow.js');
       return;
     }
-  }
-  if (file_exists('sites/all/libraries/jquery.autogrow.js')) {
-    drupal_add_js('sites/all/libraries/jquery.autogrow.js');
-    cache_set('fbss:autogrow', 'sites/all/libraries/jquery.autogrow.js');
+  if (file_exists('sites/all/libraries/autogrow/jquery.autogrow.js')) {
+    drupal_add_js('sites/all/libraries/autogrow/jquery.autogrow.js');
   }
@@ -304,10 +264,2 @@ function _facebook_status_use_autogrow()
     drupal_add_js('libraries/jquery.autogrow.js');
-    cache_set('fbss:autogrow', 'libraries/jquery.autogrow.js');
-  }
-  else {
-    $path = drupal_get_path('profile', $GLOBALS['profile']) .'/libraries/jquery.autogrow.js';
-    if (file_exists($path)) {
-      drupal_add_js($path);
-      cache_set('fbss:autogrow', $path);
-    }
   }
diff -u -p1 -r -N -b -B -w facebook_status_6_3/includes/utility/facebook_status.generate.inc screamwork_fbss7/includes/utility/facebook_status.generate.inc
--- facebook_status_6_3/includes/utility/facebook_status.generate.inc	2011-06-15 02:38:58.896741100 -0400
+++ screamwork_fbss7/includes/utility/facebook_status.generate.inc	2011-05-25 20:53:28.000000000 -0400
@@ -8,2 +8,12 @@
 /**
+ * Access callback for the Generate statuses page.
+ */
+function _facebook_status_generate_access() {
+  return user_access('delete all statuses') &&
+    user_access('post status messages to other streams') &&
+    user_access('send messages to all users at once') &&
+    user_access('administer Facebook-style Statuses settings');
+}
+
+/**
  * The Generate statuses form.
@@ -85,3 +95,3 @@ function facebook_status_generate_form_s
       'finished' => 'facebook_status_generate_finished',
-      'file' => drupal_get_path('module', 'facebook_status') .'/includes/utility/facebook_status.generate.inc',
+      'file' => drupal_get_path('module', 'facebook_status') . '/facebook_status.generate.inc',
     ));
@@ -93,3 +103,3 @@ function facebook_status_generate_form_s
     }
-    facebook_status_generate_finished(TRUE, $context['results'], array());
+    facebook_status_generate_finished(TRUE, $context, array());
   }
@@ -129,3 +139,3 @@ function facebook_status_generate_status
   module_load_include('inc', 'devel', 'devel_generate');
-  $stime = time() - mt_rand(0, $time);
+  $stime = REQUEST_TIME - mt_rand(0, $time);
   $uids = devel_get_users();
@@ -155,3 +165,3 @@ function facebook_status_generate_status
   // Mentions.
-  if (module_exists('facebook_status_tags') && $tags && $type == 'user' && mt_rand(0, 1)) {
+  if (module_exists('facebook_status_tags') && $tags && $type == 'user' && $uid == $recipient->uid && mt_rand(0, 1)) {
     $rid = 0;
@@ -218,3 +228,3 @@ function facebook_status_generate_finish
   if ($success && $results['num']) {
-    $message = format_plural($results['num'], 'Finished creating 1 status successfully.', 'Finished creating @count statuses successfully.');
+    $message = t('Finished creating @num statuses sucessfully.', array('@num' => $results['num']));
   }
diff -u -p1 -r -N -b -B -w facebook_status_6_3/includes/views/facebook_status.views.inc screamwork_fbss7/includes/views/facebook_status.views.inc
--- facebook_status_6_3/includes/views/facebook_status.views.inc	2011-06-10 10:34:47.910137800 -0400
+++ screamwork_fbss7/includes/views/facebook_status.views.inc	2011-05-25 20:53:28.000000000 -0400
@@ -16,3 +16,3 @@ function facebook_status_views_data() {
       'left_field' => 'uid',
-      'field' => 'recipient',
+      'field' => 'sender',
       'type' => 'INNER',
@@ -102,3 +101,3 @@ function facebook_status_views_data() {
     'filter' => array(
-      'handler' => 'facebook_status_views_handler_filter_type',
+      'handler' => 'views_handler_filter_string',
     ),
@@ -254,3 +253,3 @@ function facebook_status_views_data() {
       'handler' => 'facebook_status_views_handler_argument_participant',
-      'label' => t('User is participant'),
+      'label' => t('User is sender'),
     ),
@@ -287,51 +286,18 @@ function facebook_status_views_data() {
 
-  // Limits users by who they have communicated with.
-  $data['users']['communicated'] = array(
-    'title' => t('Users have communicated with current user'),
-    'help' => t('Shows only users who have sent status messages to or received status messages from the current user.'),
+  if (module_exists('flag')) {
+    $data['facebook_status']['user-flag-plus-current'] = array(
+      'title' => t('Content from flagged users or the current user'),
     'filter' => array(
-      'field' => 'uid',
-      'handler' => 'facebook_status_views_handler_filter_communicated',
-      'label' => t('Users communicated'),
-    ),
-  );
-  $data['users']['communicate'] = array(
-    'title' => t('Users have communicated with argument user'),
-    'help' => t('Shows only users who have sent status messages to or received status messages from the argument user.'),
-    'argument' => array(
-      'field' => 'uid',
-      'handler' => 'facebook_status_views_handler_argument_communicated',
-      'label' => t('Users communciated'),
-    ),
-  );
-
-  // Last status to current user from user.
-  $data['users']['last_status'] = array(
-    'title' => t('Last status to current user'),
-    'help' => t('Shows the last status each user sent to the current user, if any.'),
-    'field' => array(
-      'field' => 'uid',
-      'handler' => 'facebook_status_views_handler_field_last',
-    ),
-  );
-
-  // Current user's UID.
-  $data['users']['current_uid'] = array(
-    'title' => t("Current user's User ID"),
-    'help' => t('Shows the User ID of the current user.'),
-    'field' => array(
-      'field' => 'uid',
-      'handler' => 'facebook_status_views_handler_field_current_uid',
+        'field' => 'sender',
+        'handler' => 'facebook_status_views_handler_filter_flagged_user',
     ),
   );
-
-  // Expose data from a user's friends AND that user.
-  $data['user_relationships']['rels_and_me'] = array(
-    'title' => t('Requestee or Requester or Argument user'),
-    'help' => t('Filters results to show content for the requestee, requester, or argument user.'),
+    $data['facebook_status']['user-flag-plus-arg'] = array(
+      'title' => t('Content from flagged users or the argument user'),
     'argument' => array(
-      'field' => 'requestee_id',
-      'handler' => 'facebook_status_views_handler_argument_rels_and_me',
+        'field' => 'sender',
+        'handler' => 'facebook_status_views_handler_argument_flagged_user',
     ),
   );
+  }
 
@@ -349,3 +315,3 @@ function facebook_status_views_handlers(
     'handlers' => array(
-      'facebook_status_views_handler_argument_communicated' => array(
+      'facebook_status_views_handler_argument_flagged_user' => array(
         'parent' => 'views_handler_argument',
@@ -355,5 +321,2 @@ function facebook_status_views_handlers(
       ),
-      'facebook_status_views_handler_argument_rels_and_me' => array(
-        'parent' => 'views_handler_argument',
-      ),
       'facebook_status_views_handler_field_created' => array(
@@ -367,5 +330,2 @@ function facebook_status_views_handlers(
       ),
-      'facebook_status_views_handler_field_current_uid' => array(
-        'parent' => 'views_handler_field',
-      ),
       'facebook_status_views_handler_field_delete' => array(
@@ -376,5 +336,2 @@ function facebook_status_views_handlers(
       ),
-      'facebook_status_views_handler_field_last' => array(
-        'parent' => 'views_handler_field',
-      ),
       'facebook_status_views_handler_field_message' => array(
@@ -397,3 +354,3 @@ function facebook_status_views_handlers(
       ),
-      'facebook_status_views_handler_filter_communicated' => array(
+      'facebook_status_views_handler_filter_participant' => array(
         'parent' => 'views_handler_filter',
@@ -403,3 +360,3 @@ function facebook_status_views_handlers(
       ),
-      'facebook_status_views_handler_filter_participant' => array(
+      'facebook_status_views_handler_filter_flagged_user' => array(
         'parent' => 'views_handler_filter',
@@ -412,5 +369,2 @@ function facebook_status_views_handlers(
       ),
-      'facebook_status_views_handler_filter_type' => array(
-        'parent' => 'views_handler_filter_in_operator',
-      ),
     ),
@@ -438,8 +392,2 @@ function facebook_status_views_plugins()
     ),
-    'argument validator' => array(
-      'status' => array(
-        'title' => t('Status'),
-        'handler' => 'facebook_status_plugin_argument_validate',
-      ),
-    ),
   );
diff -u -p1 -r -N -b -B -w facebook_status_6_3/includes/views/facebook_status.views_default.inc screamwork_fbss7/includes/views/facebook_status.views_default.inc
--- facebook_status_6_3/includes/views/facebook_status.views_default.inc	2011-06-12 16:55:17.905627400 -0400
+++ screamwork_fbss7/includes/views/facebook_status.views_default.inc	2011-05-25 20:53:28.000000000 -0400
@@ -21,3 +21,3 @@ function facebook_status_views_default_v
   $view->is_cacheable = FALSE;
-  $view->api_version = 2;
+  $view->api_version = 3;
   $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
@@ -25,3 +25,3 @@ function facebook_status_views_default_v
   $handler->override_option('fields', array(
-    'sid' => array(
+    'user_contextual_pic' => array(
       'label' => '',
@@ -49,8 +49,8 @@ function facebook_status_views_default_v
       'exclude' => 1,
-      'id' => 'sid',
+      'id' => 'user_contextual_pic',
       'table' => 'facebook_status',
-      'field' => 'sid',
+      'field' => 'user_contextual_pic',
       'relationship' => 'none',
     ),
-    'user_contextual_pic' => array(
+    'message' => array(
       'label' => '',
@@ -78,8 +78,8 @@ function facebook_status_views_default_v
       'exclude' => 1,
-      'id' => 'user_contextual_pic',
+      'id' => 'message',
       'table' => 'facebook_status',
-      'field' => 'user_contextual_pic',
+      'field' => 'message',
       'relationship' => 'none',
     ),
-    'message' => array(
+    'edit' => array(
       'label' => '',
@@ -107,8 +107,8 @@ function facebook_status_views_default_v
       'exclude' => 1,
-      'id' => 'message',
+      'id' => 'edit',
       'table' => 'facebook_status',
-      'field' => 'message',
+      'field' => 'edit',
       'relationship' => 'none',
     ),
-    'edit' => array(
+    'delete' => array(
       'label' => '',
@@ -136,8 +136,8 @@ function facebook_status_views_default_v
       'exclude' => 1,
-      'id' => 'edit',
+      'id' => 'delete',
       'table' => 'facebook_status',
-      'field' => 'edit',
+      'field' => 'delete',
       'relationship' => 'none',
     ),
-    'delete' => array(
+    'respond' => array(
       'label' => '',
@@ -165,5 +165,5 @@ function facebook_status_views_default_v
       'exclude' => 1,
-      'id' => 'delete',
+      'id' => 'respond',
       'table' => 'facebook_status',
-      'field' => 'delete',
+      'field' => 'respond',
       'relationship' => 'none',
@@ -205,4 +205,4 @@ function facebook_status_views_default_v
         'text' => '',
-        'make_link' => 1,
-        'path' => 'statuses/[sid]',
+        'make_link' => 0,
+        'path' => '',
         'link_class' => '',
@@ -236,3 +236,3 @@ function facebook_status_views_default_v
 
-<div class="facebook-status-details">[created] [edit] [delete] [repost]</div>',
+<div>[created] [edit] [delete] [respond] [repost]</div>',
         'make_link' => 0,
@@ -263,2 +263,9 @@ function facebook_status_views_default_v
   $handler->override_option('sorts', array(
+    'created' => array(
+      'order' => 'DESC',
+      'id' => 'created',
+      'table' => 'facebook_status',
+      'field' => 'created',
+      'relationship' => 'none',
+    ),
     'sid' => array(
@@ -289,4 +296,4 @@ function facebook_status_views_default_v
   $handler->override_option('access', array(
-    'type' => 'perm',
-    'perm' => 'view all statuses',
+    'type' => 'permission',
+    'permission' => 'view all statuses',
   ));
@@ -358,3 +365,3 @@ function facebook_status_views_default_v
   $view->is_cacheable = FALSE;
-  $view->api_version = 2;
+  $view->api_version = 3;
   $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
@@ -362,31 +369,2 @@ function facebook_status_views_default_v
   $handler->override_option('fields', array(
-    'sid' => 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,
-        'html' => 0,
-        'strip_tags' => 0,
-      ),
-      'empty' => '',
-      'hide_empty' => 0,
-      'empty_zero' => 0,
-      'exclude' => 1,
-      'id' => 'sid',
-      'table' => 'facebook_status',
-      'field' => 'sid',
-      'relationship' => 'none',
-    ),
     'picture' => array(
@@ -423,4 +401,4 @@ function facebook_status_views_default_v
       'alter' => array(
-        'alter_text' => 1,
-        'text' => '<span class="facebook-status-sender">[name]</span>',
+        'alter_text' => 0,
+        'text' => '',
         'make_link' => 0,
@@ -544,4 +522,4 @@ function facebook_status_views_default_v
         'text' => '',
-        'make_link' => 1,
-        'path' => 'statuses/[sid]',
+        'make_link' => 0,
+        'path' => '',
         'link_class' => '',
@@ -575,3 +553,3 @@ function facebook_status_views_default_v
 
-<div class="facebook-status-details">[created] [edit] [delete]</div>',
+<div>[created] [edit] [delete]</div>',
         'make_link' => 0,
@@ -602,2 +580,9 @@ function facebook_status_views_default_v
   $handler->override_option('sorts', array(
+    'created' => array(
+      'order' => 'DESC',
+      'id' => 'created',
+      'table' => 'facebook_status',
+      'field' => 'created',
+      'relationship' => 'none',
+    ),
     'sid' => array(
@@ -708,4 +693,4 @@ function facebook_status_views_default_v
   $handler->override_option('access', array(
-    'type' => 'perm',
-    'perm' => 'view all statuses',
+    'type' => 'permission',
+    'permission' => 'view all statuses',
   ));
@@ -720,345 +706,249 @@ function facebook_status_views_default_v
   /*
-   * View 'facebook_status_stream'
+   * View 'facebook_status_mystream'
    */
   $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->view_php = '';
+  $view->name = 'facebook_status_mystream';
+  $view->description = '';
+  $view->tag = 'default';
   $view->base_table = 'facebook_status';
-  $view->is_cacheable = FALSE;
-  $view->api_version = 2;
+  $view->human_name = 'facebook_status_mystream';
+  $view->core = 7;
+  $view->api_version = '3.0-alpha1';
   $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
-  $handler = $view->new_display('default', 'Defaults', 'default');
-  $handler->override_option('fields', array(
-    'sid' => 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,
-        'html' => 0,
-        'strip_tags' => 0,
-      ),
-      'empty' => '',
-      'hide_empty' => 0,
-      'empty_zero' => 0,
-      'exclude' => 1,
-      'id' => 'sid',
-      'table' => 'facebook_status',
-      'field' => 'sid',
-      'relationship' => 'none',
-    ),
-    'picture' => 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,
-        'html' => 0,
-        'strip_tags' => 0,
-      ),
-      'empty' => '',
-      'hide_empty' => 0,
-      'empty_zero' => 0,
-      'exclude' => 1,
-      'id' => 'picture',
-      'table' => 'users',
-      'field' => 'picture',
-      'relationship' => 'none',
-    ),
-    'name' => array(
-      'label' => '',
-      'alter' => array(
-        'alter_text' => 1,
-        'text' => '<span class="facebook-status-sender">[name]</span>',
-        '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,
-      'link_to_user' => 1,
-      'overwrite_anonymous' => 0,
-      'anonymous_text' => '',
-      'exclude' => 1,
-      'id' => 'name',
-      'table' => 'users',
-      'field' => 'name',
-      'relationship' => 'none',
+
+  /* Display: Master */
+  $handler = $view->new_display('default', 'Master', 'default');
+  $handler->display->display_options['access']['type'] = 'none';
+  $handler->display->display_options['cache']['type'] = 'none';
+  $handler->display->display_options['query']['type'] = 'views_query';
+  $handler->display->display_options['exposed_form']['type'] = 'basic';
+  $handler->display->display_options['pager']['type'] = 'full';
+  $handler->display->display_options['style_plugin'] = 'table';
+  $handler->display->display_options['style_options']['columns'] = array(
+    'user_contextual_pic' => 'user_contextual_pic',
+    'message' => 'message',
+    'created' => 'created',
+    'edit' => 'edit',
+    'delete' => 'delete',
+    'comment-box' => 'comment-box',
+    'nothing' => 'nothing',
+  );
+  $handler->display->display_options['style_options']['default'] = '-1';
+  $handler->display->display_options['style_options']['info'] = array(
+    'user_contextual_pic' => array(
+      'align' => '',
+      'separator' => '',
     ),
     'message' => 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,
-        'html' => 0,
-        'strip_tags' => 0,
+      'sortable' => 0,
+      'default_sort_order' => 'asc',
+      'align' => '',
+      'separator' => '',
       ),
-      'empty' => '',
-      'hide_empty' => 0,
-      'empty_zero' => 0,
-      'exclude' => 1,
-      'id' => 'message',
-      'table' => 'facebook_status',
-      'field' => 'message',
-      'relationship' => 'none',
+    'created' => array(
+      'sortable' => 0,
+      'default_sort_order' => 'asc',
+      'align' => '',
+      'separator' => '',
     ),
     'edit' => 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,
-        'html' => 0,
-        'strip_tags' => 0,
-      ),
-      'empty' => '',
-      'hide_empty' => 0,
-      'empty_zero' => 0,
-      'exclude' => 1,
-      'id' => 'edit',
-      'table' => 'facebook_status',
-      'field' => 'edit',
-      'relationship' => 'none',
+      'align' => '',
+      'separator' => '',
     ),
     'delete' => 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,
-        'html' => 0,
-        'strip_tags' => 0,
-      ),
-      'empty' => '',
-      'hide_empty' => 0,
-      'empty_zero' => 0,
-      'exclude' => 1,
-      'id' => 'delete',
-      'table' => 'facebook_status',
-      'field' => 'delete',
-      'relationship' => 'none',
-    ),
-    'repost' => 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,
-        'html' => 0,
-        'strip_tags' => 0,
-      ),
-      'empty' => '',
-      'hide_empty' => 0,
-      'empty_zero' => 0,
-      'repost_text' => 'Share',
-      'exclude' => 1,
-      'id' => 'repost',
-      'table' => 'facebook_status',
-      'field' => 'repost',
-      'relationship' => 'none',
-    ),
-    'created' => array(
-      'label' => '',
-      'alter' => array(
-        'alter_text' => 0,
-        'text' => '',
-        'make_link' => 1,
-        'path' => 'statuses/[sid]',
-        'link_class' => '',
-        'alt' => '',
-        'prefix' => '',
-        'suffix' => '',
-        'target' => '',
-        'help' => '',
-        'trim' => 0,
-        'max_length' => '',
-        'word_boundary' => 1,
-        'ellipsis' => 1,
-        'html' => 0,
-        'strip_tags' => 0,
+      'align' => '',
+      'separator' => '',
       ),
-      'empty' => '',
-      'hide_empty' => 0,
-      'empty_zero' => 0,
-      'date_format' => 'themed',
-      'custom_date_format' => '',
-      'exclude' => 1,
-      'id' => 'created',
-      'table' => 'facebook_status',
-      'field' => 'created',
-      'relationship' => 'none',
+    'comment-box' => array(
+      'align' => '',
+      'separator' => '',
     ),
     'nothing' => array(
-      'label' => '',
-      'alter' => array(
-        'text' => '<div>[picture] [name] [message]</div>
-
-<div class="facebook-status-details">[created] [edit] [delete] [repost]</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,
+      'align' => '',
+      'separator' => '',
       ),
-      'empty' => '',
-      'hide_empty' => 0,
-      'empty_zero' => 0,
-      'exclude' => 0,
-      'id' => 'nothing',
-      'table' => 'views',
-      'field' => 'nothing',
-      'relationship' => 'none',
-    ),
-  ));
-  $handler->override_option('sorts', array(
-    'sid' => array(
-      'order' => 'DESC',
-      'id' => 'sid',
-      'table' => 'facebook_status',
-      'field' => 'sid',
-      'relationship' => 'none',
-    ),
-  ));
-  $handler->override_option('filters', array(
-    'message' => array(
-      'operator' => '!=',
-      'value' => '',
-      'group' => '0',
-      'exposed' => FALSE,
-      'expose' => array(
-        'operator' => FALSE,
-        'label' => '',
-      ),
-      'case' => 1,
-      'id' => 'message',
-      'table' => 'facebook_status',
-      'field' => 'message',
-      'relationship' => 'none',
-    ),
-    'auto-type' => array(
-      'operator' => '=',
-      'value' => '',
-      'group' => '0',
-      'exposed' => FALSE,
-      'expose' => array(
-        'operator' => FALSE,
-        'label' => '',
-      ),
-      'id' => 'auto-type',
-      'table' => 'facebook_status',
-      'field' => 'auto-type',
-      'relationship' => 'none',
-    ),
-  ));
-  $handler->override_option('access', array(
-    'type' => 'perm',
-    'perm' => 'view all statuses',
-  ));
-  $handler->override_option('cache', array(
-    'type' => 'none',
-  ));
-  $handler->override_option('use_ajax', TRUE);
-  $handler->override_option('use_pager', '1');
-  $handler->override_option('style_plugin', 'table');
-  $handler = $view->new_display('block', 'Block', 'block_1');
-  $handler->override_option('use_pager', 'mini');
-  $handler->override_option('block_description', 'Facebook-style Statuses: Context-sensitive stream');
-  $handler->override_option('block_caching', -1);
+  );
+  $handler->display->display_options['style_options']['override'] = 1;
+  $handler->display->display_options['style_options']['sticky'] = 0;
+  $handler->display->display_options['style_options']['empty_table'] = 0;
+  /* Field: Facebook-style Statuses: Users with Pictures */
+  $handler->display->display_options['fields']['user_contextual_pic']['id'] = 'user_contextual_pic';
+  $handler->display->display_options['fields']['user_contextual_pic']['table'] = 'facebook_status';
+  $handler->display->display_options['fields']['user_contextual_pic']['field'] = 'user_contextual_pic';
+  $handler->display->display_options['fields']['user_contextual_pic']['label'] = '';
+  $handler->display->display_options['fields']['user_contextual_pic']['exclude'] = TRUE;
+  $handler->display->display_options['fields']['user_contextual_pic']['alter']['alter_text'] = 0;
+  $handler->display->display_options['fields']['user_contextual_pic']['alter']['make_link'] = 0;
+  $handler->display->display_options['fields']['user_contextual_pic']['alter']['absolute'] = 0;
+  $handler->display->display_options['fields']['user_contextual_pic']['alter']['external'] = 0;
+  $handler->display->display_options['fields']['user_contextual_pic']['alter']['replace_spaces'] = 0;
+  $handler->display->display_options['fields']['user_contextual_pic']['alter']['trim'] = 0;
+  $handler->display->display_options['fields']['user_contextual_pic']['alter']['nl2br'] = 0;
+  $handler->display->display_options['fields']['user_contextual_pic']['alter']['word_boundary'] = 1;
+  $handler->display->display_options['fields']['user_contextual_pic']['alter']['ellipsis'] = 1;
+  $handler->display->display_options['fields']['user_contextual_pic']['alter']['strip_tags'] = 0;
+  $handler->display->display_options['fields']['user_contextual_pic']['alter']['html'] = 0;
+  $handler->display->display_options['fields']['user_contextual_pic']['element_label_colon'] = 0;
+  $handler->display->display_options['fields']['user_contextual_pic']['element_default_classes'] = 1;
+  $handler->display->display_options['fields']['user_contextual_pic']['hide_empty'] = 0;
+  $handler->display->display_options['fields']['user_contextual_pic']['empty_zero'] = 0;
+  /* Field: Facebook-style Statuses: Status message */
+  $handler->display->display_options['fields']['message']['id'] = 'message';
+  $handler->display->display_options['fields']['message']['table'] = 'facebook_status';
+  $handler->display->display_options['fields']['message']['field'] = 'message';
+  $handler->display->display_options['fields']['message']['label'] = '';
+  $handler->display->display_options['fields']['message']['exclude'] = TRUE;
+  $handler->display->display_options['fields']['message']['alter']['alter_text'] = 0;
+  $handler->display->display_options['fields']['message']['alter']['make_link'] = 0;
+  $handler->display->display_options['fields']['message']['alter']['absolute'] = 0;
+  $handler->display->display_options['fields']['message']['alter']['external'] = 0;
+  $handler->display->display_options['fields']['message']['alter']['replace_spaces'] = 0;
+  $handler->display->display_options['fields']['message']['alter']['trim'] = 0;
+  $handler->display->display_options['fields']['message']['alter']['nl2br'] = 0;
+  $handler->display->display_options['fields']['message']['alter']['word_boundary'] = 1;
+  $handler->display->display_options['fields']['message']['alter']['ellipsis'] = 1;
+  $handler->display->display_options['fields']['message']['alter']['strip_tags'] = 0;
+  $handler->display->display_options['fields']['message']['alter']['html'] = 0;
+  $handler->display->display_options['fields']['message']['element_label_colon'] = 0;
+  $handler->display->display_options['fields']['message']['element_default_classes'] = 1;
+  $handler->display->display_options['fields']['message']['hide_empty'] = 0;
+  $handler->display->display_options['fields']['message']['empty_zero'] = 0;
+  /* Field: User: Created date */
+  $handler->display->display_options['fields']['created']['id'] = 'created';
+  $handler->display->display_options['fields']['created']['table'] = 'users';
+  $handler->display->display_options['fields']['created']['field'] = 'created';
+  $handler->display->display_options['fields']['created']['label'] = '';
+  $handler->display->display_options['fields']['created']['exclude'] = TRUE;
+  $handler->display->display_options['fields']['created']['alter']['alter_text'] = 0;
+  $handler->display->display_options['fields']['created']['alter']['make_link'] = 0;
+  $handler->display->display_options['fields']['created']['alter']['absolute'] = 0;
+  $handler->display->display_options['fields']['created']['alter']['external'] = 0;
+  $handler->display->display_options['fields']['created']['alter']['replace_spaces'] = 0;
+  $handler->display->display_options['fields']['created']['alter']['trim'] = 0;
+  $handler->display->display_options['fields']['created']['alter']['nl2br'] = 0;
+  $handler->display->display_options['fields']['created']['alter']['word_boundary'] = 1;
+  $handler->display->display_options['fields']['created']['alter']['ellipsis'] = 1;
+  $handler->display->display_options['fields']['created']['alter']['strip_tags'] = 0;
+  $handler->display->display_options['fields']['created']['alter']['html'] = 0;
+  $handler->display->display_options['fields']['created']['element_label_colon'] = 0;
+  $handler->display->display_options['fields']['created']['element_default_classes'] = 1;
+  $handler->display->display_options['fields']['created']['hide_empty'] = 0;
+  $handler->display->display_options['fields']['created']['empty_zero'] = 0;
+  $handler->display->display_options['fields']['created']['date_format'] = 'time ago';
+  /* Field: Facebook-style Statuses: Edit */
+  $handler->display->display_options['fields']['edit']['id'] = 'edit';
+  $handler->display->display_options['fields']['edit']['table'] = 'facebook_status';
+  $handler->display->display_options['fields']['edit']['field'] = 'edit';
+  $handler->display->display_options['fields']['edit']['label'] = '';
+  $handler->display->display_options['fields']['edit']['exclude'] = TRUE;
+  $handler->display->display_options['fields']['edit']['alter']['alter_text'] = 0;
+  $handler->display->display_options['fields']['edit']['alter']['make_link'] = 0;
+  $handler->display->display_options['fields']['edit']['alter']['absolute'] = 0;
+  $handler->display->display_options['fields']['edit']['alter']['external'] = 0;
+  $handler->display->display_options['fields']['edit']['alter']['replace_spaces'] = 0;
+  $handler->display->display_options['fields']['edit']['alter']['trim'] = 0;
+  $handler->display->display_options['fields']['edit']['alter']['nl2br'] = 0;
+  $handler->display->display_options['fields']['edit']['alter']['word_boundary'] = 1;
+  $handler->display->display_options['fields']['edit']['alter']['ellipsis'] = 1;
+  $handler->display->display_options['fields']['edit']['alter']['strip_tags'] = 0;
+  $handler->display->display_options['fields']['edit']['alter']['html'] = 0;
+  $handler->display->display_options['fields']['edit']['element_label_colon'] = 0;
+  $handler->display->display_options['fields']['edit']['element_default_classes'] = 1;
+  $handler->display->display_options['fields']['edit']['hide_empty'] = 0;
+  $handler->display->display_options['fields']['edit']['empty_zero'] = 0;
+  /* Field: Facebook-style Statuses: Delete */
+  $handler->display->display_options['fields']['delete']['id'] = 'delete';
+  $handler->display->display_options['fields']['delete']['table'] = 'facebook_status';
+  $handler->display->display_options['fields']['delete']['field'] = 'delete';
+  $handler->display->display_options['fields']['delete']['label'] = '';
+  $handler->display->display_options['fields']['delete']['exclude'] = TRUE;
+  $handler->display->display_options['fields']['delete']['alter']['alter_text'] = 0;
+  $handler->display->display_options['fields']['delete']['alter']['make_link'] = 0;
+  $handler->display->display_options['fields']['delete']['alter']['absolute'] = 0;
+  $handler->display->display_options['fields']['delete']['alter']['external'] = 0;
+  $handler->display->display_options['fields']['delete']['alter']['replace_spaces'] = 0;
+  $handler->display->display_options['fields']['delete']['alter']['trim'] = 0;
+  $handler->display->display_options['fields']['delete']['alter']['nl2br'] = 0;
+  $handler->display->display_options['fields']['delete']['alter']['word_boundary'] = 1;
+  $handler->display->display_options['fields']['delete']['alter']['ellipsis'] = 1;
+  $handler->display->display_options['fields']['delete']['alter']['strip_tags'] = 0;
+  $handler->display->display_options['fields']['delete']['alter']['html'] = 0;
+  $handler->display->display_options['fields']['delete']['element_label_colon'] = 0;
+  $handler->display->display_options['fields']['delete']['element_default_classes'] = 1;
+  $handler->display->display_options['fields']['delete']['hide_empty'] = 0;
+  $handler->display->display_options['fields']['delete']['empty_zero'] = 0;
+  /* Field: Facebook-style Statuses: Status comment box */
+  $handler->display->display_options['fields']['comment-box']['id'] = 'comment-box';
+  $handler->display->display_options['fields']['comment-box']['table'] = 'facebook_status';
+  $handler->display->display_options['fields']['comment-box']['field'] = 'comment-box';
+  $handler->display->display_options['fields']['comment-box']['label'] = '';
+  $handler->display->display_options['fields']['comment-box']['exclude'] = TRUE;
+  $handler->display->display_options['fields']['comment-box']['alter']['alter_text'] = 0;
+  $handler->display->display_options['fields']['comment-box']['alter']['make_link'] = 0;
+  $handler->display->display_options['fields']['comment-box']['alter']['absolute'] = 0;
+  $handler->display->display_options['fields']['comment-box']['alter']['external'] = 0;
+  $handler->display->display_options['fields']['comment-box']['alter']['replace_spaces'] = 0;
+  $handler->display->display_options['fields']['comment-box']['alter']['trim'] = 0;
+  $handler->display->display_options['fields']['comment-box']['alter']['nl2br'] = 0;
+  $handler->display->display_options['fields']['comment-box']['alter']['word_boundary'] = 1;
+  $handler->display->display_options['fields']['comment-box']['alter']['ellipsis'] = 1;
+  $handler->display->display_options['fields']['comment-box']['alter']['strip_tags'] = 0;
+  $handler->display->display_options['fields']['comment-box']['alter']['html'] = 0;
+  $handler->display->display_options['fields']['comment-box']['element_label_colon'] = 0;
+  $handler->display->display_options['fields']['comment-box']['element_default_classes'] = 1;
+  $handler->display->display_options['fields']['comment-box']['hide_empty'] = 0;
+  $handler->display->display_options['fields']['comment-box']['empty_zero'] = 0;
+  /* Field: Global: Custom text */
+  $handler->display->display_options['fields']['nothing']['id'] = 'nothing';
+  $handler->display->display_options['fields']['nothing']['table'] = 'views';
+  $handler->display->display_options['fields']['nothing']['field'] = 'nothing';
+  $handler->display->display_options['fields']['nothing']['label'] = '';
+  $handler->display->display_options['fields']['nothing']['alter']['text'] = '<div>[user_contextual_pic] [message]</div>
+
+<div>[created] [edit] [delete] [comment-box]</div>';
+  $handler->display->display_options['fields']['nothing']['alter']['make_link'] = 0;
+  $handler->display->display_options['fields']['nothing']['alter']['absolute'] = 0;
+  $handler->display->display_options['fields']['nothing']['alter']['external'] = 0;
+  $handler->display->display_options['fields']['nothing']['alter']['replace_spaces'] = 0;
+  $handler->display->display_options['fields']['nothing']['alter']['trim'] = 0;
+  $handler->display->display_options['fields']['nothing']['alter']['nl2br'] = 0;
+  $handler->display->display_options['fields']['nothing']['alter']['word_boundary'] = 1;
+  $handler->display->display_options['fields']['nothing']['alter']['ellipsis'] = 1;
+  $handler->display->display_options['fields']['nothing']['alter']['strip_tags'] = 0;
+  $handler->display->display_options['fields']['nothing']['alter']['html'] = 0;
+  $handler->display->display_options['fields']['nothing']['element_label_colon'] = 0;
+  $handler->display->display_options['fields']['nothing']['element_default_classes'] = 1;
+  $handler->display->display_options['fields']['nothing']['hide_empty'] = 0;
+  $handler->display->display_options['fields']['nothing']['empty_zero'] = 0;
+  /* Sort criterion: Facebook-style Statuses: Created time */
+  $handler->display->display_options['sorts']['created']['id'] = 'created';
+  $handler->display->display_options['sorts']['created']['table'] = 'facebook_status';
+  $handler->display->display_options['sorts']['created']['field'] = 'created';
+  $handler->display->display_options['sorts']['created']['order'] = 'DESC';
+  /* Filter criterion: Facebook-style Statuses: Only own statuses */
+  $handler->display->display_options['filters']['only_own']['id'] = 'only_own';
+  $handler->display->display_options['filters']['only_own']['table'] = 'facebook_status';
+  $handler->display->display_options['filters']['only_own']['field'] = 'only_own';
+  $handler->display->display_options['filters']['only_own']['value'] = '0';
+  /* Filter criterion: Facebook-style Statuses: Use current context */
+  $handler->display->display_options['filters']['auto-type']['id'] = 'auto-type';
+  $handler->display->display_options['filters']['auto-type']['table'] = 'facebook_status';
+  $handler->display->display_options['filters']['auto-type']['field'] = 'auto-type';
+  $translatables['facebook_status_mystream'] = array(
+    t('Master'),
+    t('more'),
+    t('Apply'),
+    t('Reset'),
+    t('Sort by'),
+    t('Asc'),
+    t('Desc'),
+    t('Items per page'),
+    t('- All -'),
+    t('Offset'),
+    t('<div>[user_contextual_pic] [message]</div>
+       <div>[created] [edit] [delete] [comment-box]</div>'),
+  );
   $views[$view->name] = $view;
 
-  if (module_exists('user_relationships_api')) {
-    module_load_include('inc', 'facebook_status', 'includes/views/fbss_user_relationships.views_default');
-    $ur_views = fbss_user_relationships_views_default_views();
-    $views = array_merge($views, $ur_views);
-  }
+
 
diff -u -p1 -r -N -b -B -w facebook_status_6_3/includes/views/fbss_user_relationships.views_default.inc screamwork_fbss7/includes/views/fbss_user_relationships.views_default.inc
--- facebook_status_6_3/includes/views/fbss_user_relationships.views_default.inc	2011-06-17 12:31:23.812362200 -0400
+++ screamwork_fbss7/includes/views/fbss_user_relationships.views_default.inc	1969-12-31 19:00:00.000000000 -0500
@@ -1,396 +0,0 @@
-<?php
-
-/**
- * @file
- *   Provides Views that combine Facebook-style Statuses and User Relationships.
- */
-
-/**
- * Default FBSS UR Views.
- */
-function fbss_user_relationships_views_default_views() {
-  $views = array();
-
-  /**
-   * Show status updates of the argument user and their friends.
-   */
-  $view = new view;
-  $view->name = 'fbss_ur_stream';
-  $view->description = 'Displays status updates that match the current recipient context or that match the recipient\'s friends.';
-  $view->tag = 'Facebook-style Statuses';
-  $view->view_php = '';
-  $view->base_table = 'users';
-  $view->is_cacheable = FALSE;
-  $view->api_version = 2;
-  $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
-  $handler = $view->new_display('default', 'Defaults', 'default');
-  $handler->override_option('relationships', array(
-    'requester_id' => array(
-      'label' => 'requester',
-      'required' => 0,
-      'id' => 'requester_id',
-      'table' => 'user_relationships',
-      'field' => 'requester_id',
-      'relationship' => 'none',
-    ),
-  ));
-  $handler->override_option('fields', array(
-    'sid' => 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,
-        'html' => 0,
-        'strip_tags' => 0,
-      ),
-      'empty' => '',
-      'hide_empty' => 0,
-      'empty_zero' => 0,
-      'exclude' => 1,
-      'id' => 'sid',
-      'table' => 'facebook_status',
-      'field' => 'sid',
-      'relationship' => 'none',
-    ),
-    'user_contextual_pic' => 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,
-        'html' => 0,
-        'strip_tags' => 0,
-      ),
-      'empty' => '',
-      'hide_empty' => 0,
-      'empty_zero' => 0,
-      'imagecache_preset' => 'user_picture_meta',
-      'exclude' => 1,
-      'id' => 'user_contextual_pic',
-      'table' => 'facebook_status',
-      'field' => 'user_contextual_pic',
-      'relationship' => 'none',
-    ),
-    'message' => 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,
-        'html' => 0,
-        'strip_tags' => 0,
-      ),
-      'empty' => '',
-      'hide_empty' => 0,
-      'empty_zero' => 0,
-      'exclude' => 1,
-      'id' => 'message',
-      'table' => 'facebook_status',
-      'field' => 'message',
-      'relationship' => 'none',
-    ),
-    'edit' => 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,
-        'html' => 0,
-        'strip_tags' => 0,
-      ),
-      'empty' => '',
-      'hide_empty' => 0,
-      'empty_zero' => 0,
-      'exclude' => 1,
-      'id' => 'edit',
-      'table' => 'facebook_status',
-      'field' => 'edit',
-      'relationship' => 'none',
-    ),
-    'delete' => 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,
-        'html' => 0,
-        'strip_tags' => 0,
-      ),
-      'empty' => '',
-      'hide_empty' => 0,
-      'empty_zero' => 0,
-      'exclude' => 1,
-      'id' => 'delete',
-      'table' => 'facebook_status',
-      'field' => 'delete',
-      'relationship' => 'none',
-    ),
-    'created' => array(
-      'label' => '',
-      'alter' => array(
-        'alter_text' => 0,
-        'text' => '',
-        'make_link' => 1,
-        'path' => 'statuses/[sid]',
-        '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,
-      'date_format' => 'themed',
-      'custom_date_format' => '',
-      'exclude' => 1,
-      'id' => 'created',
-      'table' => 'facebook_status',
-      'field' => 'created',
-      'relationship' => 'none',
-    ),
-    'repost' => 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,
-        'html' => 0,
-        'strip_tags' => 0,
-      ),
-      'empty' => '',
-      'hide_empty' => 0,
-      'empty_zero' => 0,
-      'repost_text' => 'Share',
-      'exclude' => 1,
-      'id' => 'repost',
-      'table' => 'facebook_status',
-      'field' => 'repost',
-      'relationship' => 'none',
-    ),
-    'nothing' => array(
-      'label' => '',
-      'alter' => array(
-        'text' => '<div>[user_contextual_pic] [message]</div>
-
-<div class="facebook-status-details">[created] [edit] [delete] [repost]</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(
-    'sid' => array(
-      'exposed' => FALSE,
-      'order' => 'DESC',
-      'identifier' => 'unsorted',
-      'id' => 'sid',
-      'table' => 'facebook_status',
-      'field' => 'sid',
-      'relationship' => 'none',
-    ),
-  ));
-  $handler->override_option('arguments', array(
-    'rels_and_me' => array(
-      'default_action' => 'ignore',
-      'style_plugin' => 'default_summary',
-      'style_options' => array(),
-      'wildcard' => 'all',
-      'wildcard_substitution' => 'All',
-      'title' => '',
-      'breadcrumb' => '',
-      'default_argument_type' => 'fixed',
-      'default_argument' => '',
-      'validate_type' => 'none',
-      'validate_fail' => 'not found',
-      'id' => 'rels_and_me',
-      'table' => 'user_relationships',
-      'field' => 'rels_and_me',
-      'validate_user_argument_type' => 'uid',
-      'validate_user_roles' => array(
-        '2' => 0,
-        '3' => 0,
-        '4' => 0,
-        '5' => 0,
-      ),
-      'relationship' => 'none',
-      'default_options_div_prefix' => '',
-      'default_argument_fixed' => '',
-      'default_argument_user' => 0,
-      'default_argument_php' => '',
-      'validate_argument_node_type' => array(
-        'blog' => 0,
-        'poll' => 0,
-        'discussion' => 0,
-        'document' => 0,
-        'event' => 0,
-        'wiki' => 0,
-        'group' => 0,
-        'notice' => 0,
-        'page' => 0,
-      ),
-      'validate_argument_node_access' => 0,
-      'validate_argument_nid_type' => 'nid',
-      'validate_argument_vocabulary' => array(
-        '4' => 0,
-        '2' => 0,
-        '3' => 0,
-      ),
-      'validate_argument_type' => 'tid',
-      'validate_argument_transform' => 0,
-      'validate_user_restrict_roles' => 0,
-      'validate_argument_node_flag_name' => '*relationship*',
-      'validate_argument_node_flag_test' => 'flaggable',
-      'validate_argument_node_flag_id_type' => 'id',
-      'validate_argument_user_flag_name' => '*relationship*',
-      'validate_argument_user_flag_test' => 'flaggable',
-      'validate_argument_user_flag_id_type' => 'id',
-      'validate_argument_is_member' => 'OG_VIEWS_DO_NOT_VALIDATE_MEMBERSHIP',
-      'validate_argument_group_node_type' => array(
-        'group' => 0,
-      ),
-      'validate_argument_php' => '',
-    ),
-  ));
-  $handler->override_option('filters', array(
-    'message' => array(
-      'operator' => '!=',
-      'value' => '',
-      'group' => '0',
-      'exposed' => FALSE,
-      'expose' => array(
-        'operator' => FALSE,
-        'label' => '',
-      ),
-      'case' => 1,
-      'id' => 'message',
-      'table' => 'facebook_status',
-      'field' => 'message',
-      'relationship' => 'none',
-    ),
-    'type' => array(
-      'operator' => 'in',
-      'value' => array(
-        'user' => 'user',
-      ),
-      'group' => '0',
-      'exposed' => FALSE,
-      'expose' => array(
-        'operator' => FALSE,
-        'label' => '',
-      ),
-      'id' => 'type',
-      'table' => 'facebook_status',
-      'field' => 'type',
-      'relationship' => 'none',
-    ),
-  ));
-  $handler->override_option('access', array(
-    'type' => 'perm',
-    'perm' => 'view all statuses',
-  ));
-  $handler->override_option('cache', array(
-    'type' => 'none',
-  ));
-  $handler->override_option('use_ajax', TRUE);
-  $handler->override_option('use_pager', '1');
-  $handler->override_option('style_plugin', 'table');
-  $handler->override_option('style_options', NULL);
-  $views[$view->name] = $view;
-
-  return $views;
-}
diff -u -p1 -r -N -b -B -w facebook_status_6_3/includes/views/handlers/facebook_status_plugin_argument_validate.inc screamwork_fbss7/includes/views/handlers/facebook_status_plugin_argument_validate.inc
--- facebook_status_6_3/includes/views/handlers/facebook_status_plugin_argument_validate.inc	2011-06-04 23:11:49.541692700 -0400
+++ screamwork_fbss7/includes/views/handlers/facebook_status_plugin_argument_validate.inc	1969-12-31 19:00:00.000000000 -0500
@@ -1,16 +0,0 @@
-<?php
-
-/**
- * @file
- *   Adds an option to validate arguments as statuses.
- */
-
-/**
- * Validate whether an argument represents a status or not.
- */
-class facebook_status_plugin_argument_validate extends views_plugin_argument_validate {
-  var $option_name = 'validate_argument_status';
-  function validate_argument($argument) {
-    return (bool) db_result(db_query("SELECT COUNT(sid) FROM {facebook_status} WHERE sid = %d", $argument));
-  }
-}
diff -u -p1 -r -N -b -B -w facebook_status_6_3/includes/views/handlers/facebook_status_views_handler_argument_communicated.inc screamwork_fbss7/includes/views/handlers/facebook_status_views_handler_argument_communicated.inc
--- facebook_status_6_3/includes/views/handlers/facebook_status_views_handler_argument_communicated.inc	2011-06-06 01:41:18.508716100 -0400
+++ screamwork_fbss7/includes/views/handlers/facebook_status_views_handler_argument_communicated.inc	1969-12-31 19:00:00.000000000 -0500
@@ -1,20 +0,0 @@
-<?php
-
-/**
- * @file
- *   Shows only users who have sent status messages to or received status messages from the argument user.
- */
-
-/**
- * Shows only users who have sent status messages to or received status messages from the argument user.
- */
-class facebook_status_views_handler_argument_communicated extends views_handler_argument {
-  function query() {
-    $this->ensure_my_table();
-    $this->query->add_where(0, db_prefix_tables("
-        ({users}.uid IN (SELECT sender FROM {facebook_status} WHERE type = 'user' AND recipient = %d) OR
-        {users}.uid IN (SELECT recipient FROM {facebook_status} WHERE type = 'user' AND sender = %d))
-        AND {users}.uid <> %d
-    "), $this->argument, $this->argument, $this->argument);
-  }
-}
diff -u -p1 -r -N -b -B -w facebook_status_6_3/includes/views/handlers/facebook_status_views_handler_argument_flagged_user.inc screamwork_fbss7/includes/views/handlers/facebook_status_views_handler_argument_flagged_user.inc
--- facebook_status_6_3/includes/views/handlers/facebook_status_views_handler_argument_flagged_user.inc	1969-12-31 19:00:00.000000000 -0500
+++ screamwork_fbss7/includes/views/handlers/facebook_status_views_handler_argument_flagged_user.inc	2011-05-25 20:53:28.000000000 -0400
@@ -0,0 +1,57 @@
+<?php
+
+/**
+ * @file
+ *   Allow only statuses from friends/followed + argument user.
+ */
+
+/**
+ * Argument handler to select statuses from friends/followed + argument user.
+ */
+class facebook_status_views_handler_argument_flagged_user extends views_handler_argument {
+  function option_definition() {
+    $options = parent::option_definition();
+    $flag = array_shift(flag_get_flags($content_type));
+    $default = $flag ? $flag->fid : NULL;
+    $options['facebook_status_flag_type'] = array(
+      'default' => $default,
+      'translatable' => FALSE,
+    );
+    return $options;
+  }
+  function options_form(&$form, &$form_state) {
+    parent::options_form($form, $form_state);
+    $flags = flag_get_flags('user');
+    $options = array();
+    foreach ($flags as $flag) {
+      $options[$flag->fid] = $flag->get_title();
+    }
+    $form['warning'] = array(
+      '#value' => t('Warning: this argument can be slow.'),
+      '#weight' => -100,
+    );
+    $form['facebook_status_flag_type'] = array(
+      '#type' => 'radios',
+      '#title' => t('Flag'),
+      '#options' => $options,
+      '#default_value' => $this->options['facebook_status_flag_type'],
+      '#required' => TRUE,
+    );
+  }
+  
+  function query() {
+    $argument = $this->argument;
+    $field = "$this->table.$this->real_field";
+    $query = db_prefix_tables("$field IN (SELECT content_id FROM {flag_content} WHERE fid = :d AND uid = :d) OR $field = :d");
+    $this->query->add_where_expression(0, $query, $this->options['facebook_status_flag_type'], array(':d' => $argument));
+  }
+  
+  /*
+  function query() {
+    $argument = $this->argument;
+    $field = "$this->table.$this->real_field";
+    $query = db_prefix_tables("$field IN (SELECT content_id FROM {flag_content} WHERE fid = %d AND uid = %d) OR $field = %d");
+    $this->query->add_where(0, $query, $this->options['facebook_status_flag_type'], $argument, $argument);
+  }
+  */
+}
diff -u -p1 -r -N -b -B -w facebook_status_6_3/includes/views/handlers/facebook_status_views_handler_argument_participant.inc screamwork_fbss7/includes/views/handlers/facebook_status_views_handler_argument_participant.inc
--- facebook_status_6_3/includes/views/handlers/facebook_status_views_handler_argument_participant.inc	2011-04-09 19:23:26.539617600 -0400
+++ screamwork_fbss7/includes/views/handlers/facebook_status_views_handler_argument_participant.inc	2011-05-25 20:53:28.000000000 -0400
@@ -12,4 +13,9 @@ class facebook_status_views_handler_argu
   function query() {
-    $argument = $this->argument;
-    $this->query->add_where(0, "($this->table.sender = %d OR $this->table.recipient = %d) AND $this->table.type = 'user'", $argument, $argument);
+    $this->ensure_my_table();
+    #echo '<pre>'.print_r($this, true).'</pre>'; die();
+    $xx = $this->view->args;
+    $arg1 = $xx[0];
+    $arg2 = $xx[1];
+    // views_plugin_query_default.inc - line 844
+    $this->query->add_where_expression(0, "($this->table_alias.sender = $arg1 AND $this->table_alias.recipient = $arg2) OR ($this->table_alias.sender = $arg2 AND $this->table_alias.recipient = $arg1)", array());
   }
diff -u -p1 -r -N -b -B -w facebook_status_6_3/includes/views/handlers/facebook_status_views_handler_argument_rels_and_me.inc screamwork_fbss7/includes/views/handlers/facebook_status_views_handler_argument_rels_and_me.inc
--- facebook_status_6_3/includes/views/handlers/facebook_status_views_handler_argument_rels_and_me.inc	2011-06-10 10:07:05.749067600 -0400
+++ screamwork_fbss7/includes/views/handlers/facebook_status_views_handler_argument_rels_and_me.inc	1969-12-31 19:00:00.000000000 -0500
@@ -1,21 +0,0 @@
-<?php
-
-/**
- * @file
- *   Allow only statuses from a user and that user's friends.
- */
-
-/**
- * Argument handler to select statuses relevant to a user and that user's friends.
- */
-class facebook_status_views_handler_argument_rels_and_me extends views_handler_argument {
-  function query() {
-    $this->ensure_my_table();
-    $this->query->ensure_table('users');
-    $argument = $this->argument;
-    // Argument user is in an approved relationship
-    $this->query->add_where($this->options['group'], db_prefix_tables("
-      (($this->table_alias.requestee_id = %d OR $this->table_alias.requester_id = %d) AND $this->table_alias.approved = 1) OR {users}.uid = %d
-    "), $argument, $argument, $argument);
-  }
-}
diff -u -p1 -r -N -b -B -w facebook_status_6_3/includes/views/handlers/facebook_status_views_handler_field_created.inc screamwork_fbss7/includes/views/handlers/facebook_status_views_handler_field_created.inc
--- facebook_status_6_3/includes/views/handlers/facebook_status_views_handler_field_created.inc	2011-06-02 15:32:40.129353400 -0400
+++ screamwork_fbss7/includes/views/handlers/facebook_status_views_handler_field_created.inc	2011-05-25 20:53:28.000000000 -0400
@@ -25,3 +25,2 @@ class facebook_status_views_handler_fiel
     $custom_format = '';
-    $output = '<span class="facebook-status-time">';
     if (in_array($format, array('custom', 'raw time ago', 'time ago', 'raw time span', 'time span'))) {
@@ -30,16 +29,14 @@ class facebook_status_views_handler_fiel
     if (!$value) {
-      $output .= theme('views_nodate');
+      // TODO Please change this theme call to use an associative array for the $variables parameter.
+      return theme('views_nodate');
     }
     else {
-      $time_diff = time() - $value; // will be positive for a datetime in the past (ago), and negative for a datetime in the future (hence)
+      $time_diff = REQUEST_TIME - $value; // will be positive for a datetime in the past (ago), and negative for a datetime in the future (hence)
       switch ($format) {
         case 'raw time ago':
-          $output .= format_interval($time_diff, is_numeric($custom_format) ? $custom_format : 2);
-          break;
+          return format_interval($time_diff, is_numeric($custom_format) ? $custom_format : 2);
         case 'time ago':
-          $output .= t('%time ago', array('%time' => format_interval($time_diff, is_numeric($custom_format) ? $custom_format : 2)));
-          break;
+          return t('%time ago', array('%time' => format_interval($time_diff, is_numeric($custom_format) ? $custom_format : 2)));
         case 'raw time span':
-          $output .= ($time_diff < 0 ? '-' : '') . format_interval(abs($time_diff), is_numeric($custom_format) ? $custom_format : 2);
-          break;
+          return ($time_diff < 0 ? '-' : '') . format_interval(abs($time_diff), is_numeric($custom_format) ? $custom_format : 2);
         case 'time span':
@@ -47,19 +44,13 @@ class facebook_status_views_handler_fiel
           if ($time_diff < 0) {
-            $output .= t('%time hence', $args);
-            break;
+            return t('%time hence', $args);
           }
-          $output .= t('%time ago', $args);
-          break;
+          return t('%time ago', $args);
         case 'custom':
-          $output .= format_date($value, $format, $custom_format);
-          break;
+          return format_date($value, $format, $custom_format);
         case 'themed':
-          $output .= theme('facebook_status_time', $value);
-          break;
+          return theme('facebook_status_time', array('time' => $value));
         default:
-          $output .= format_date($value, $format);
-          break;
+          return format_date($value, $format);
       }
     }
-    return $output .'</span>';
   }
diff -u -p1 -r -N -b -B -w facebook_status_6_3/includes/views/handlers/facebook_status_views_handler_field_cross.inc screamwork_fbss7/includes/views/handlers/facebook_status_views_handler_field_cross.inc
--- facebook_status_6_3/includes/views/handlers/facebook_status_views_handler_field_cross.inc	2011-06-12 16:22:22.306629600 -0400
+++ screamwork_fbss7/includes/views/handlers/facebook_status_views_handler_field_cross.inc	2011-05-25 20:53:28.000000000 -0400
@@ -22,3 +22,3 @@ class facebook_status_views_handler_fiel
     if ($sender_id == $recipient_id && $type == 'user') {
-      return theme('username', _facebook_status_user_load($sender_id));
+      return theme('username', array('account' => _facebook_status_user_load($sender_id)));
     }
@@ -28,4 +28,4 @@ class facebook_status_views_handler_fiel
       $args = array(
-        '!sender' => '<span class="facebook-status-sender">'. theme('username', _facebook_status_user_load($sender_id)) .'</span>',
-        '!recipient' => '<span class="facebook-status-recipient">'. $context['handler']->recipient_link($recipient) .'</span>',
+        '!sender' => theme('username', array('account' => _facebook_status_user_load($sender_id))),
+        '!recipient' => $context['handler']->recipient_link($recipient),
       );
diff -u -p1 -r -N -b -B -w facebook_status_6_3/includes/views/handlers/facebook_status_views_handler_field_cross_pic.inc screamwork_fbss7/includes/views/handlers/facebook_status_views_handler_field_cross_pic.inc
--- facebook_status_6_3/includes/views/handlers/facebook_status_views_handler_field_cross_pic.inc	2011-06-12 16:27:05.959853600 -0400
+++ screamwork_fbss7/includes/views/handlers/facebook_status_views_handler_field_cross_pic.inc	2011-05-25 20:53:28.000000000 -0400
@@ -55,6 +55,3 @@ class facebook_status_views_handler_fiel
       }
-      return t('!picture !user', array(
-        '!picture' => '<span class="facebook-status-sender-picture">'. facebook_status_display_user_picture($sender) .'</span>',
-        '!user' => '<span class="facebook-status-sender">'. theme('username', $sender) .'</span>'
-      ));
+      return t('!picture !user', array('!picture' => facebook_status_display_user_picture($sender), '!user' => theme('username', array('account' => $sender))));
     }
@@ -67,7 +64,7 @@ class facebook_status_views_handler_fiel
       $args = array(
-        '!sender' => '<span class="facebook-status-sender">'. theme('username', $sender) .'</span>',
-        '!recipient' => '<span class="facebook-status-recipient">'. theme('username', $recipient) .'</span>',
-        '!sender-picture' => '<span class="facebook-status-sender-picture">'. facebook_status_display_user_picture($sender) .'</span>',
-        '!recipient-picture' => '<span class="facebook-status-recipient-picture">'. facebook_status_display_user_picture($recipient) .'</span>',
+        '!sender' => theme('username', array('account' => $sender)),
+        '!recipient' => theme('username', array('account' => $recipient)),
       );
+      $args['!sender-picture'] = facebook_status_display_user_picture($sender);
+      $args['!recipient-picture'] = facebook_status_display_user_picture($recipient);
       return t('!sender-picture !sender &raquo; !recipient-picture !recipient', $args);
@@ -82,5 +79,5 @@ class facebook_status_views_handler_fiel
       $args = array(
-        '!sender' => '<span class="facebook-status-sender">'. theme('username', $sender) .'</span>',
-        '!recipient' => '<span class="facebook-status-recipient">'. $context['handler']->recipient_link($recipient) .'</span>',
-        '!sender-picture' => '<span class="facebook-status-sender-picture">'. facebook_status_display_user_picture($sender) .'</span>',
+        '!sender' => theme('username', array('account' => $sender)),
+        '!recipient' => $context['handler']->recipient_link($recipient),
+        '!sender-picture' => facebook_status_display_user_picture($sender),
       );
diff -u -p1 -r -N -b -B -w facebook_status_6_3/includes/views/handlers/facebook_status_views_handler_field_current_uid.inc screamwork_fbss7/includes/views/handlers/facebook_status_views_handler_field_current_uid.inc
--- facebook_status_6_3/includes/views/handlers/facebook_status_views_handler_field_current_uid.inc	2011-06-06 02:06:27.050999800 -0400
+++ screamwork_fbss7/includes/views/handlers/facebook_status_views_handler_field_current_uid.inc	1969-12-31 19:00:00.000000000 -0500
@@ -1,15 +0,0 @@
-<?php
-
-/**
- * @file
- *   Shows the User ID of the current user.
- */
-
-/**
- * Field handler to show the User ID of the current user.
- */
-class facebook_status_views_handler_field_current_uid extends views_handler_field {
-  function render($values) {
-    return $GLOBALS['user']->uid;
-  }
-}
diff -u -p1 -r -N -b -B -w facebook_status_6_3/includes/views/handlers/facebook_status_views_handler_field_delete.inc screamwork_fbss7/includes/views/handlers/facebook_status_views_handler_field_delete.inc
--- facebook_status_6_3/includes/views/handlers/facebook_status_views_handler_field_delete.inc	2011-04-13 23:30:07.884535500 -0400
+++ screamwork_fbss7/includes/views/handlers/facebook_status_views_handler_field_delete.inc	2011-05-25 20:53:28.000000000 -0400
@@ -24,5 +24,2 @@ class facebook_status_views_handler_fiel
     if (facebook_status_user_access('delete', $status)) {
-      if (module_exists('modalframe')) {
-        modalframe_parent_js();
-      }
       drupal_add_css(drupal_get_path('module', 'facebook_status') .'/resources/facebook_status.css');
diff -u -p1 -r -N -b -B -w facebook_status_6_3/includes/views/handlers/facebook_status_views_handler_field_edit.inc screamwork_fbss7/includes/views/handlers/facebook_status_views_handler_field_edit.inc
--- facebook_status_6_3/includes/views/handlers/facebook_status_views_handler_field_edit.inc	2011-04-13 23:30:16.668037900 -0400
+++ screamwork_fbss7/includes/views/handlers/facebook_status_views_handler_field_edit.inc	2011-05-25 20:53:28.000000000 -0400
@@ -24,5 +24,2 @@ class facebook_status_views_handler_fiel
     if (facebook_status_user_access('edit', $status)) {
-      if (module_exists('modalframe')) {
-        modalframe_parent_js();
-      }
       drupal_add_css(drupal_get_path('module', 'facebook_status') .'/resources/facebook_status.css');
diff -u -p1 -r -N -b -B -w facebook_status_6_3/includes/views/handlers/facebook_status_views_handler_field_last.inc screamwork_fbss7/includes/views/handlers/facebook_status_views_handler_field_last.inc
--- facebook_status_6_3/includes/views/handlers/facebook_status_views_handler_field_last.inc	2011-06-06 01:58:08.681494700 -0400
+++ screamwork_fbss7/includes/views/handlers/facebook_status_views_handler_field_last.inc	1969-12-31 19:00:00.000000000 -0500
@@ -1,24 +0,0 @@
-<?php
-
-/**
- * @file
- *   Shows the last status each user sent to the current user, if any.
- */
-
-/**
- * Field handler to show the last status sent to the current user.
- */
-class facebook_status_views_handler_field_last extends views_handler_field {
-  function render($values) {
-    global $user;
-    $uid = $values->{$this->field_alias};
-    $message = db_result(db_query_range("SELECT message FROM {facebook_status} WHERE type = 'user' AND message <> '' AND
-      ((sender = %d AND recipient = %d) OR (sender = %d AND recipient = %d))
-    ORDER BY sid DESC", $user->uid, $uid, $uid, $user->uid, 0, 1));
-    $message = _facebook_status_run_filter($message);
-    if (variable_get('facebook_status_nl2br', 0)) {
-      $message = nl2br($message);
-    }
-    return '<span class="facebook-status-content">'. $message .'</span>';
-  }
-}
diff -u -p1 -r -N -b -B -w facebook_status_6_3/includes/views/handlers/facebook_status_views_handler_field_recipient.inc screamwork_fbss7/includes/views/handlers/facebook_status_views_handler_field_recipient.inc
--- facebook_status_6_3/includes/views/handlers/facebook_status_views_handler_field_recipient.inc	2011-06-12 16:21:31.046697700 -0400
+++ screamwork_fbss7/includes/views/handlers/facebook_status_views_handler_field_recipient.inc	2011-05-25 20:53:28.000000000 -0400
@@ -36,5 +36,5 @@ class facebook_status_views_handler_fiel
     if (!empty($this->options['link_to'])) {
-      return '<span class="facebook-status-recipient">'. $context['handler']->recipient_link($recipient) .'</span>';
+      return $context['handler']->recipient_link($recipient);
     }
-    return '<span class="facebook-status-recipient">'. check_plain($context['handler']->recipient_name($recipient)) .'</span>';
+    return check_plain($context['handler']->recipient_name($recipient));
   }
diff -u -p1 -r -N -b -B -w facebook_status_6_3/includes/views/handlers/facebook_status_views_handler_field_recipient_pic.inc screamwork_fbss7/includes/views/handlers/facebook_status_views_handler_field_recipient_pic.inc
--- facebook_status_6_3/includes/views/handlers/facebook_status_views_handler_field_recipient_pic.inc	2011-06-12 16:27:37.272644600 -0400
+++ screamwork_fbss7/includes/views/handlers/facebook_status_views_handler_field_recipient_pic.inc	2011-05-25 20:53:28.000000000 -0400
@@ -50,3 +50,3 @@ class facebook_status_views_handler_fiel
       }
-      return '<span class="facebook-status-recipient-picture">'. facebook_status_display_user_picture($account) .'</span>';
+      return facebook_status_display_user_picture($account);
     }
diff -u -p1 -r -N -b -B -w facebook_status_6_3/includes/views/handlers/facebook_status_views_handler_field_repost.inc screamwork_fbss7/includes/views/handlers/facebook_status_views_handler_field_repost.inc
--- facebook_status_6_3/includes/views/handlers/facebook_status_views_handler_field_repost.inc	2011-06-17 14:27:56.764336200 -0400
+++ screamwork_fbss7/includes/views/handlers/facebook_status_views_handler_field_repost.inc	2011-05-25 20:53:28.000000000 -0400
@@ -28,10 +28,4 @@ class facebook_status_views_handler_fiel
   }
-  function construct() {
-    parent::construct();
-    $this->additional_fields['sender'] = 'sender';
-  }
   function render($values) {
-    $sender_uid = $values->{$this->aliases['sender']};
-    // Don't allow sharing your own status.
-    if (facebook_status_user_access('add') && $sender_uid != $GLOBALS['user']->uid) {
+    if (facebook_status_user_access('add')) {
       drupal_add_css(drupal_get_path('module', 'facebook_status') .'/resources/facebook_status.css');
@@ -39,3 +33,6 @@ class facebook_status_views_handler_fiel
         'attributes' => array('class' => 'facebook-status-repost'),
-        'query' => array('sid' => $values->{$this->field_alias}, 'destination' => $_GET['q'])
+        'query' => array(
+          'sid' => $values->{$this->field_alias},
+          'destination' => $_GET['q'],
+        ),
       );
diff -u -p1 -r -N -b -B -w facebook_status_6_3/includes/views/handlers/facebook_status_views_handler_field_respond.inc screamwork_fbss7/includes/views/handlers/facebook_status_views_handler_field_respond.inc
--- facebook_status_6_3/includes/views/handlers/facebook_status_views_handler_field_respond.inc	2011-06-11 22:20:23.664579900 -0400
+++ screamwork_fbss7/includes/views/handlers/facebook_status_views_handler_field_respond.inc	2011-05-25 20:53:28.000000000 -0400
@@ -39,3 +39,7 @@ class facebook_status_views_handler_fiel
         // Evidently url() sanitizes query strings itself, so we don't have to use check_plain() here.
-        $options['query'] = array('s' => $s, 'rsid' => $values->{$this->aliases['sid']}, 'destination' => $_GET['q']);
+        $options['query'] = array(
+          's' => $s,
+          'rsid' => $values->{$this->aliases['sid']},
+          'destination' => $_GET['q'],
+        );
         return l(t('Respond'), 'statuses/share', $options);
diff -u -p1 -r -N -b -B -w facebook_status_6_3/includes/views/handlers/facebook_status_views_handler_filter_autotype.inc screamwork_fbss7/includes/views/handlers/facebook_status_views_handler_filter_autotype.inc
--- facebook_status_6_3/includes/views/handlers/facebook_status_views_handler_filter_autotype.inc	2011-04-09 19:23:26.551618200 -0400
+++ screamwork_fbss7/includes/views/handlers/facebook_status_views_handler_filter_autotype.inc	2011-05-25 20:53:28.000000000 -0400
@@ -11,2 +11,13 @@
 class facebook_status_views_handler_filter_autotype extends views_handler_filter {
+  
+  function query() {
+    $context = facebook_status_determine_context();
+    $type = $context['handler']->type();
+    $recipient = $context['handler']->find_recipient();
+    $recipient_id = $context['handler']->recipient_id($recipient);
+    $query = "$this->table.recipient = $recipient_id AND $this->table.type = '$type'";
+    $this->query->add_where_expression($this->options['group'], $query, array());
+  }
+  
+  /*
   function query() {
@@ -19,2 +30,3 @@ class facebook_status_views_handler_filt
   }
+  */
 }
diff -u -p1 -r -N -b -B -w facebook_status_6_3/includes/views/handlers/facebook_status_views_handler_filter_communicated.inc screamwork_fbss7/includes/views/handlers/facebook_status_views_handler_filter_communicated.inc
--- facebook_status_6_3/includes/views/handlers/facebook_status_views_handler_filter_communicated.inc	2011-06-06 01:41:38.163840400 -0400
+++ screamwork_fbss7/includes/views/handlers/facebook_status_views_handler_filter_communicated.inc	1969-12-31 19:00:00.000000000 -0500
@@ -1,21 +0,0 @@
-<?php
-
-/**
- * @file
- *   Shows only users who have sent status messages to or received status messages from the current user.
- */
-
-/**
- * Shows only users who have sent status messages to or received status messages from the current user.
- */
-class facebook_status_views_handler_filter_communicated extends views_handler_filter {
-  function query() {
-    global $user;
-    $this->ensure_my_table();
-    $this->query->add_where(0, db_prefix_tables("
-        ({users}.uid IN (SELECT sender FROM {facebook_status} WHERE type = 'user' AND recipient = %d) OR
-        {users}.uid IN (SELECT recipient FROM {facebook_status} WHERE type = 'user' AND sender = %d))
-        AND {users}.uid <> %d
-    "), $user->uid, $user->uid, $user->uid);
-  }
-}
diff -u -p1 -r -N -b -B -w facebook_status_6_3/includes/views/handlers/facebook_status_views_handler_filter_flagged_user.inc screamwork_fbss7/includes/views/handlers/facebook_status_views_handler_filter_flagged_user.inc
--- facebook_status_6_3/includes/views/handlers/facebook_status_views_handler_filter_flagged_user.inc	1969-12-31 19:00:00.000000000 -0500
+++ screamwork_fbss7/includes/views/handlers/facebook_status_views_handler_filter_flagged_user.inc	2011-05-25 20:53:28.000000000 -0400
@@ -0,0 +1,46 @@
+<?php
+
+/**
+ * @file
+ *   Filters to statuses posted by "followed" users plus the current user.
+ */
+
+/**
+ * Filter handler to select statuses from friends/followed + current user.
+ */
+class facebook_status_views_handler_filter_flagged_user extends views_handler_filter {
+  function option_definition() {
+    $options = parent::option_definition();
+    $flag = array_shift(flag_get_flags($content_type));
+    $default = $flag ? $flag->fid : NULL;
+    $options['facebook_status_flag_type'] = array(
+      'default' => $default,
+      'translatable' => FALSE,
+    );
+    return $options;
+  }
+  function options_form(&$form, &$form_state) {
+    parent::options_form($form, $form_state);
+    $flags = flag_get_flags('user');
+    $options = array();
+    foreach ($flags as $flag) {
+      $options[$flag->fid] = $flag->get_title();
+    }
+    $form['warning'] = array(
+      '#value' => t('Warning: this filter can be slow.'),
+      '#weight' => -100,
+    );
+    $form['facebook_status_flag_type'] = array(
+      '#type' => 'radios',
+      '#title' => t('Flag'),
+      '#options' => $options,
+      '#default_value' => $this->options['facebook_status_flag_type'],
+      '#required' => TRUE,
+    );
+  }
+  function query() {
+    $query = "({$this->table}.sender IN (SELECT content_id FROM {flag_content} WHERE fid = %d AND uid = %d) OR {$this->table}.sender = %d)";
+    $query = db_prefix_tables($query);
+    $this->query->add_where($this->options['group'], $query, $this->options['facebook_status_flag_type'], $GLOBALS['user']->uid, $GLOBALS['user']->uid);
+  }
+}
diff -u -p1 -r -N -b -B -w facebook_status_6_3/includes/views/handlers/facebook_status_views_handler_filter_latest_only.inc screamwork_fbss7/includes/views/handlers/facebook_status_views_handler_filter_latest_only.inc
--- facebook_status_6_3/includes/views/handlers/facebook_status_views_handler_filter_latest_only.inc	2011-04-09 19:23:26.554618400 -0400
+++ screamwork_fbss7/includes/views/handlers/facebook_status_views_handler_filter_latest_only.inc	2011-05-25 20:53:28.000000000 -0400
@@ -22,3 +22,3 @@ class facebook_status_views_handler_filt
       $subquery = "(SELECT MAX(sid) FROM {facebook_status} WHERE sender = recipient AND type = 'user' GROUP BY recipient)";
-      $this->query->add_where(0, db_prefix_tables("$this->table_alias.sid IN $subquery"));
+      $this->query->add_where_expression(0, db_prefix_tables("$this->table_alias.sid IN $subquery"));
     }
diff -u -p1 -r -N -b -B -w facebook_status_6_3/includes/views/handlers/facebook_status_views_handler_filter_not_own.inc screamwork_fbss7/includes/views/handlers/facebook_status_views_handler_filter_not_own.inc
--- facebook_status_6_3/includes/views/handlers/facebook_status_views_handler_filter_not_own.inc	2011-04-09 19:23:26.554618400 -0400
+++ screamwork_fbss7/includes/views/handlers/facebook_status_views_handler_filter_not_own.inc	2011-05-25 20:53:28.000000000 -0400
@@ -21,3 +21,4 @@ class facebook_status_views_handler_filt
       $this->ensure_my_table();
-      $this->query->add_where(0, db_prefix_tables("($this->table_alias.type <> 'user' OR $this->table_alias.sender <> $this->table_alias.recipient)"));
+      
+      $this->query->add_where_expression(0, "$this->table_alias.type <> 'user' OR $this->table_alias.sender <> $this->table_alias.recipient");
     }
diff -u -p1 -r -N -b -B -w facebook_status_6_3/includes/views/handlers/facebook_status_views_handler_filter_own.inc screamwork_fbss7/includes/views/handlers/facebook_status_views_handler_filter_own.inc
--- facebook_status_6_3/includes/views/handlers/facebook_status_views_handler_filter_own.inc	2011-04-09 19:23:26.555618500 -0400
+++ screamwork_fbss7/includes/views/handlers/facebook_status_views_handler_filter_own.inc	2011-05-25 20:53:28.000000000 -0400
@@ -14,3 +14,5 @@ class facebook_status_views_handler_filt
     $this->definition['label'] = t('Show only own statuses');
+    if (isset($this->definition['label'])) {
     $this->value_value = $this->definition['label'];
+    }
     parent::construct();
@@ -21,3 +23,11 @@ class facebook_status_views_handler_filt
       $this->ensure_my_table();
-      $this->query->add_where(0, db_prefix_tables("($this->table_alias.type = 'user' AND $this->table_alias.sender = $this->table_alias.recipient)"));
+      
+      $this->query->add_where_expression(0, "$this->table_alias.type = 'user' AND $this->table_alias.sender = $this->table_alias.recipient");
+      
+      /*
+	    if (isset($definition['field'])) {
+	      $this->real_field = $definition['field'];
+	    }
+      $this->query->add_where(0, $this->real_field);
+      */
     }
diff -u -p1 -r -N -b -B -w facebook_status_6_3/includes/views/handlers/facebook_status_views_handler_filter_participant.inc screamwork_fbss7/includes/views/handlers/facebook_status_views_handler_filter_participant.inc
--- facebook_status_6_3/includes/views/handlers/facebook_status_views_handler_filter_participant.inc	2011-04-09 19:23:26.555618500 -0400
+++ screamwork_fbss7/includes/views/handlers/facebook_status_views_handler_filter_participant.inc	2011-05-25 20:53:28.000000000 -0400
@@ -32,2 +32,13 @@ class facebook_status_views_handler_filt
   }
+  
+  /*
+  function query() {
+    $this->query->add_where(
+      $this->options['group'],
+      "$this->table.sender = %d OR ($this->table.recipient = %d AND $this->table.type = 'user')",
+      $this->value,
+      $this->value
+    );
+  }
+  */ 
 }
diff -u -p1 -r -N -b -B -w facebook_status_6_3/includes/views/handlers/facebook_status_views_handler_filter_type.inc screamwork_fbss7/includes/views/handlers/facebook_status_views_handler_filter_type.inc
--- facebook_status_6_3/includes/views/handlers/facebook_status_views_handler_filter_type.inc	2011-05-24 00:40:33.813126300 -0400
+++ screamwork_fbss7/includes/views/handlers/facebook_status_views_handler_filter_type.inc	1969-12-31 19:00:00.000000000 -0500
@@ -1,20 +0,0 @@
-<?php
-
-/**
- * @file
- *   Filters statuses to a certain recipient type.
- */
-
-/**
- * Filter handler to select statuses with a given recipient type.
- */
-class facebook_status_views_handler_filter_type extends views_handler_filter_in_operator {
-  function get_value_options() {
-    $contexts = facebook_status_all_contexts();
-    $options = array();
-    foreach ($contexts as $type => $info) {
-      $options[$type] = $info['title'];
-    }
-    $this->value_options = $options;
-  }
-}
diff -u -p1 -r -N -b -B -w facebook_status_6_3/includes/views/handlers/facebook_status_views_plugin_row_rss.inc screamwork_fbss7/includes/views/handlers/facebook_status_views_plugin_row_rss.inc
--- facebook_status_6_3/includes/views/handlers/facebook_status_views_plugin_row_rss.inc	2011-04-09 19:23:26.556618500 -0400
+++ screamwork_fbss7/includes/views/handlers/facebook_status_views_plugin_row_rss.inc	2011-05-25 20:53:28.000000000 -0400
@@ -48,3 +48,6 @@ class facebook_status_views_plugin_row_r
     $item->elements = array(
-      array('key' => 'pubDate', 'value' => gmdate('r', $status->created)),
+      array(
+        'key' => 'pubDate',
+        'value' => gmdate('r', $status->created),
+      ),
       array(
@@ -57,3 +60,3 @@ class facebook_status_views_plugin_row_r
         'value' => $status->sid . ' at ' . $base_url,
-        'attributes' => array('isPermaLink' => 'false')
+        'attributes' => array('isPermaLink' => 'false'),
       ),
@@ -67,2 +70,3 @@ class facebook_status_views_plugin_row_r
 
+    // TODO Please change this theme call to use an associative array for the $variables parameter.
     return theme($this->theme_functions(), $this->view, $this->options, $item);
diff -u -p1 -r -N -b -B -w facebook_status_6_3/resources/facebook_status.css screamwork_fbss7/resources/facebook_status.css
--- facebook_status_6_3/resources/facebook_status.css	2011-06-14 03:40:18.848694900 -0400
+++ screamwork_fbss7/resources/facebook_status.css	2011-05-25 20:53:28.000000000 -0400
@@ -5,7 +6,3 @@
 .facebook-status-chars {
-  float: right;
-}
-
-#facebook-status-edit .facebook-status-chars {
-  float: none;
+  margin-right: 0.5em;
 }
@@ -16,6 +13,2 @@
 
-.facebook-status-update {
-  margin-bottom: 1em;
-}
-
 .facebook-status-update form#facebook-status-box {
@@ -27,5 +20,3 @@
 .facebook-status-respond,
-.facebook-status-repost,
-.facebook-status-share,
-.facebook-status-details .flag-wrapper {
+.facebook-status-repost {
   font-size: 90%;
@@ -43,10 +34,3 @@
 input.facebook-status-submit {
-  float: right;
   margin-top: 0;
-  margin-left: 1em;
-}
-
-.facebook-status-back {
-  float: right;
-  margin: 0.5em;
 }
diff -u -p1 -r -N -b -B -w facebook_status_6_3/resources/facebook_status.js screamwork_fbss7/resources/facebook_status.js
--- facebook_status_6_3/resources/facebook_status.js	2011-06-12 17:08:15.129082000 -0400
+++ screamwork_fbss7/resources/facebook_status.js	2011-05-25 20:53:28.000000000 -0400
@@ -1,4 +1,6 @@
-var fbss_allowClickRefresh = true;
-var fbss_refreshIDs;
-Drupal.behaviors.facebookStatus = function (context) {
+(function ($) {
+  
+var allowClickRefresh = true;
+Drupal.behaviors.facebookStatus = {
+  attach: function (context, settings) {
   var initialLoad = false;
@@ -15,5 +17,3 @@ Drupal.behaviors.facebookStatus = functi
   var fbss_hidelen = parseInt(Drupal.settings.facebook_status.hideLength);
-  if (fbss_refreshIDs == undefined) {
-    fbss_refreshIDs = Drupal.settings.facebook_status.refreshIDs;
-  }
+  var refreshIDs = Drupal.settings.facebook_status.refreshIDs;
   if ($.fn.autogrow && $facebook_status_field) {
@@ -26,4 +26,4 @@ Drupal.behaviors.facebookStatus = functi
   if (Drupal.settings.facebook_status.noautoclear || Drupal.settings.facebook_status.autofocus) {
-    if ($facebook_status_field.val() && $facebook_status_field.val().length != 0 && fbss_maxlen != 0) {
-      fbss_print_remaining(fbss_maxlen - facebook_status_original_value.length, $facebook_status_field.parents('.facebook-status-update').find('.facebook-status-chars'));
+    if ($facebook_status_field.val() && $facebook_status_field.val().length != 0) {
+      fbss_print_remaining(fbss_maxlen - facebook_status_original_value.length, $facebook_status_field.parent().next());
     }
@@ -36,10 +36,7 @@ Drupal.behaviors.facebookStatus = functi
     ctxt.find('.facebook-status-text-main').one('focus', function() {
-      var th = $(this);
-      if (th.val() == facebook_status_original_value) {
-        th.val('');
-        if (fbss_maxlen != 0) {
-          fbss_print_remaining(fbss_maxlen, th.parents('.facebook-status-update').find('.facebook-status-chars'));
-        }
+      if ($(this).val() == facebook_status_original_value) {
+        $(this).val('');
+        fbss_print_remaining(fbss_maxlen, $(this).parent().next());
       }
-      th.removeClass('facebook-status-faded');
+      $(this).removeClass('facebook-status-faded');
     });
@@ -47,4 +44,5 @@ Drupal.behaviors.facebookStatus = functi
   // Truncate long status messages.
-  function fbss_truncate(i, val) {
-    var th = $(val);
+  if (fbss_hidelen > 0) {
+    ctxt.find('.facebook-status-content').each(function() {
+      var th = $(this);
     var oldMsgText = th.html();
@@ -62,6 +60,5 @@ Drupal.behaviors.facebookStatus = functi
       th.find('.facebook-status-readmore-toggle').click(function(e) {
-        var thi = $(this);
         e.preventDefault();
-        var pa = thi.parents('.facebook-status-content');
-        thi.hide();
+          var pa = $(this).parents('.facebook-status-content');
+          $(this).hide();
         pa.find('.facebook-status-hellip').hide();
@@ -70,15 +67,34 @@ Drupal.behaviors.facebookStatus = functi
     }
+    });
+  }
+  // Fix bad redirect destinations.
+  ctxt.find('.facebook-status-edit a, .facebook-status-delete a, a.facebook-status-respond, a.facebook-status-repost').each(function() {
+    var loc = $(this).attr('href').split('?'), base = loc[0], query = '';
+    if (loc[1]) {
+      var search = window.location.search;
+      if (search.indexOf('?q=') == 0) {
+        search = search.substring(3);
+      }
+      // window.location.href doesn't work for sites not in the webroot with weird server configurations.
+      var destination = escape(window.location.pathname.substring(Drupal.settings.basePath.length) + search);
+      var q = loc[1].split('&');
+      for (var i = 0; i < q.length; i++) {
+        var item = q[i].split('='), param = item[0];
+        if (i == 0) {
+          query += '?';
   }
-  if (fbss_hidelen > 0) {
-    ctxt.find('.facebook-status-content').each(fbss_truncate);
+        else {
+          query += '&';
+        }
+        query += param +'=';
+        if (param == 'destination') {
+          query += destination;
+        }
+        else if (item[1]) {
+          query += item[1];
   }
-  // Modal Frame integration.
-  if (Drupal.modalFrame) {
-    ctxt.find('.facebook-status-edit a, .facebook-status-delete a').click(function(event) {
-      event.preventDefault();
-      Drupal.modalFrame.open({url: $(this).attr('href'), onSubmit: fbss_refresh});
-    });
   }
-  // Don't show multiple loading symbols if a status is submitted via AHAH after an attached view changes pages via AJAX.
-  ctxt.find('#facebook-status-replace').unbind('ahah_success');
+      $(this).attr('href', base + query);
+    }
+  });
   // React when a status is submitted.
@@ -88,8 +104,51 @@ Drupal.behaviors.facebookStatus = functi
     }
-    fbss_refresh();
+    if (Drupal.heartbeat) {
+      Drupal.heartbeat.pollMessages();
+    }
+    // Refresh elements by re-loading the current page and replacing the old version with the updated version.
+    var loaded = {};
+    if (refreshIDs && refreshIDs != undefined) {
+      var loaded2 = {};
+      $.each(refreshIDs, function(i, val) {
+        if (val && val != undefined) {
+          if ($.trim(val) && loaded2[val] !== true) {
+            loaded2[val] = true;
+            var element = $(val);
+            element.before('<div class="fbss-remove-me ahah-progress ahah-progress-throbber" style="display: block; clear: both; float: none;"><div class="throbber">&nbsp;</div></div>');
+          }
+        }
+      });
+      // IE will cache the result unless we add an identifier (in this case, the time).
+      $.get(window.location.pathname +"?ts="+ (new Date()).getTime(), function(data, textStatus) {
+        // From load() in jQuery source. We already have the scripts we need.
+        var new_data = data.replace(/<script(.|\s)*?\/script>/g, "");
+        // From ahah.js. Apparently Safari crashes with just $().
+        var new_content = $('<div></div>').html(new_data);
+        if (textStatus != 'error' && new_content) {
+          // Replace relevant content in the viewport with the updated version.
+          $.each(refreshIDs, function(i, val) {
+            if (val && val != undefined) {
+              if ($.trim(val) != '' && loaded[val] !== true) {
+                var element = $(val);
+                var insert = new_content.find(val);
+                if (insert.get() != element.get()) {
+                  element.replaceWith(insert);
+                  //Drupal.attachBehaviors(insert);
+                }
+                loaded[val] = true;
+              }
+            }
+          });
+        }
+        $('.fbss-remove-me').remove();
+      });
+    }
+    else {
+      $('.fbss-remove-me').remove();
+    }
   });
   // On document load, add a refresh link where applicable.
-  if (initialLoad && fbss_refreshIDs && Drupal.settings.facebook_status.refreshLink) {
+  if (initialLoad && refreshIDs && Drupal.settings.facebook_status.refreshLink) {
     var loaded = {};
-    $.each(fbss_refreshIDs, function(i, val) {
+    $.each(refreshIDs, function(i, val) {
       if (val && val != undefined) {
@@ -107,7 +166,7 @@ Drupal.behaviors.facebookStatus = functi
   ctxt.find('.facebook-status-refresh-link a').click(function() {
-    if (fbss_allowClickRefresh) {
-      fbss_allowClickRefresh = false;
-      setTimeout('fbss_allowRefresh()', 2000);
+    if (allowClickRefresh) {
+      allowClickRefresh = false;
+      setTimeout('allowRefresh()', 2000);
       $(this).after('<div class="fbss-remove-me ahah-progress ahah-progress-throbber"><div class="throbber">&nbsp;</div></div>');
-      fbss_refresh();
+      $('#facebook-status-replace').trigger('ahah_success', {target: '#facebook-status-replace'});
     }
@@ -117,18 +176,15 @@ Drupal.behaviors.facebookStatus = functi
   ctxt.find('.facebook-status-intro').click(function() {
-    var th = $(this);
-    var te = th.parents('.facebook-status-update').find('.facebook-status-text');
-    if (te.val() == '') {
-      te.val(facebook_status_original_value);
-      if (fbss_maxlen != 0) {
-        fbss_print_remaining(fbss_maxlen - facebook_status_original_value.length, th.parents('.facebook-status-update').find('.facebook-status-chars'));
-      }
+    if ($(this).next().find('.facebook-status-text').val() == '') {
+      $(this).next().find('.facebook-status-text').val(facebook_status_original_value);
+      fbss_print_remaining(fbss_maxlen - facebook_status_original_value.length, $(this).parents('.facebook-status-update').find('.facebook-status-chars'));
     }
   });
-  if (fbss_maxlen != 0) {
     // Count remaining characters.
-    ctxt.find('.facebook-status-text').bind('keydown keyup', function(fbss_key) {
+  ctxt.find('.facebook-status-text').keypress(function(fbss_key) {
       var th = $(this);
       var thCC = th.parents('.facebook-status-update').find('.facebook-status-chars');
+    setTimeout(function() {
       var fbss_remaining = fbss_maxlen - th.val().length;
       fbss_print_remaining(fbss_remaining, thCC);
+    }, 10);
     });
@@ -154,71 +210,6 @@ function fbss_print_remaining(fbss_remai
 // Disallow refreshing too often or double-clicking the Refresh link.
-function fbss_allowRefresh() {
-  fbss_allowClickRefresh = !fbss_allowClickRefresh;
-}
-// Refresh parts of the page.
-function fbss_refresh() {
-  if (Drupal.heartbeat) {
-    Drupal.heartbeat.pollMessages();
-  }
-  // Refresh elements by re-loading the current page and replacing the old version with the updated version.
-  var loaded = {};
-  if (fbss_refreshIDs && fbss_refreshIDs != undefined) {
-    var loaded2 = {};
-    $.each(fbss_refreshIDs, function(i, val) {
-      if (val && val != undefined) {
-        if ($.trim(val) && loaded2[val] !== true) {
-          loaded2[val] = true;
-          var element = $(val);
-          element.before('<div class="fbss-remove-me ahah-progress ahah-progress-throbber" style="display: block; clear: both; float: none;"><div class="throbber">&nbsp;</div></div>');
-        }
-      }
-    });
-    var location = window.location.pathname +'?';
-    // Build the relative URL with query parameters.
-    var query = window.location.search.substring(1);
-    if ($.trim(query) != "") {
-      location += query +'&';
-    }
-    // IE will cache the result unless we add an identifier (in this case, the time).
-    $.get(location +"ts="+ (new Date()).getTime(), function(data, textStatus) {
-      // From load() in jQuery source. We already have the scripts we need.
-      var new_data = data.replace(/<script(.|\s)*?\/script>/g, "");
-      if (Drupal.settings.fbss_comments && Drupal.settings.fbss_comments.ahah_enabled) {
-        // EVIL BLACK MAGIC - updates Drupal.settings.ahah to reflect AHAH forms that are about to be loaded
-        var settings_script = data.match(/(<script[\s\S]*?Drupal\.settings\,\s)((.|\s)*?)\/script>/)[2];
-        eval('Drupal.settings2 = '+ settings_script.substring(0, settings_script.length-15));
-        $.extend(Drupal.settings.ahah, Drupal.settings2.ahah);
-      }
-      // From ahah.js. Apparently Safari crashes with just $().
-      var new_content = $('<div></div>').html(new_data);
-      if (textStatus != 'error' && new_content) {
-        // Replace relevant content in the viewport with the updated version.
-        $.each(fbss_refreshIDs, function(i, val) {
-          if (val && val != undefined) {
-            if ($.trim(val) != '' && loaded[val] !== true) {
-              var element = $(val);
-              var insert = new_content.find(val);
-              // If a refreshID is found multiple times on the same page, replace each one sequentially.
-              if (insert.length && insert.length > 0 && element.length && element.length >= insert.length) {
-                $.each(insert, function(j, v) {
-                  v = $(v);
-                  var el = $(element[j]);
-                  // Don't bother replacing anything if the replacement region hasn't changed.
-                  if (v.get() != el.get()) {
-                    el.replaceWith(v);
-                    Drupal.attachBehaviors(v);
-                  }
-                });
-              }
-              loaded[val] = true;
-            }
-          }
-        });
-      }
-      $('.fbss-remove-me').remove();
-    });
-  }
-  else {
-    $('.fbss-remove-me').remove();
-  }
+function allowRefresh() {
+  allowClickRefresh = !allowClickRefresh;
 }
+
+})(jQuery);
diff -u -p1 -r -N -b -B -w facebook_status_6_3/resources/facebook_status_admin.js screamwork_fbss7/resources/facebook_status_admin.js
--- facebook_status_6_3/resources/facebook_status_admin.js	2011-05-26 10:43:07.147658600 -0400
+++ screamwork_fbss7/resources/facebook_status_admin.js	1969-12-31 19:00:00.000000000 -0500
@@ -1,16 +0,0 @@
-Drupal.behaviors.facebookStatusAdmin = function (context) {
-  // Make sure we can run context.find().
-  var ctxt = $(context);
-  var handle = function() {
-    if (ctxt.find('input:radio[name=visibility]:checked').val() == '3') {
-      ctxt.find('#edit-pages-wrapper').hide();
-      ctxt.find('#edit-context-wrapper').show();
-    }
-    else {
-      ctxt.find('#edit-pages-wrapper').show();
-      ctxt.find('#edit-context-wrapper').hide();
-    }
-  };
-  handle();
-  ctxt.find('input:radio[name=visibility]').change(handle);
-}
diff -u -p1 -r -N -b -B -w facebook_status_6_3/resources/facebook_status_ahah.js screamwork_fbss7/resources/facebook_status_ahah.js
--- facebook_status_6_3/resources/facebook_status_ahah.js	2011-04-09 19:23:26.559618700 -0400
+++ screamwork_fbss7/resources/facebook_status_ahah.js	2011-05-25 20:53:28.000000000 -0400
@@ -3,5 +3,5 @@
 
-if (Drupal.jsEnabled) {
+//if (Drupal.jsEnabled) {
   $(document).ready(function() {
-    if (Drupal.ahah != undefined) {
+    //if (Drupal.ahah != undefined) {
 
@@ -10,3 +10,5 @@ if (Drupal.jsEnabled) {
  */
-Drupal.ahah.prototype.success = function (response, status) {
+//Drupal.ahah.prototype.success = function (response, status) {
+  Drupal.behaviors.facebook_status = {
+  attach: function(context, settings) {
   var wrapper = $(this.wrapper);
@@ -15,3 +17,4 @@ Drupal.ahah.prototype.success = function
   // Safari with long string lengths. http://dev.jquery.com/ticket/1152
-  var new_content = $('<div></div>').html(response.data);
+  //var new_content = $('<div></div>').html(response.data);
+  var new_content = $('<div></div>').html(settings.data);
 
@@ -61,4 +64,5 @@ Drupal.ahah.prototype.success = function
   // Merge in new and changed settings, if any.
-  if (response.settings) {
-    $.extend(Drupal.settings, response.settings);
+  if (settings) {
+    //$.extend(Drupal.settings, response.settings);
+    $.extend(Drupal.settings, settings);
   }
@@ -72,2 +76,3 @@ Drupal.ahah.prototype.success = function
   if (new_content.parents('html').length > 0) {
+    //Drupal.attachBehaviors(new_content, settings);
     Drupal.attachBehaviors(new_content);
@@ -76,7 +81,9 @@ Drupal.ahah.prototype.success = function
   Drupal.unfreezeHeight();
+  
+  } // added
 };
 
-    }
+    //}
   });
-}
+//}
 
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/facebook_status_tags/facebook_status_tags.info screamwork_fbss7/submodules/facebook_status_tags/facebook_status_tags.info
--- facebook_status_6_3/submodules/facebook_status_tags/facebook_status_tags.info	2011-04-09 19:23:26.561618800 -0400
+++ screamwork_fbss7/submodules/facebook_status_tags/facebook_status_tags.info	2011-05-25 20:53:28.000000000 -0400
@@ -4,2 +4,16 @@ dependencies[] = facebook_status
 package = Facebook-style Statuses
-core = 6.x
+core = 7.x
+
+files[] = facebook_status_tags.install
+files[] = facebook_status_tags.module
+files[] = facebook_status_tags.rules.inc
+files[] = views/facebook_status_tags.views.inc
+files[] = views/facebook_status_tags.views_default.inc
+files[] = views/facebook_status_tags_views_handler_argument_has_this_tag.inc
+files[] = views/facebook_status_tags_views_handler_argument_has_this_tag_id.inc
+files[] = views/facebook_status_tags_views_handler_field_all_terms.inc
+files[] = views/facebook_status_tags_views_handler_field_message.inc
+files[] = views/facebook_status_tags_views_handler_field_name.inc
+files[] = views/facebook_status_tags_views_handler_filter_has_tag.inc
+files[] = views/facebook_status_tags_views_handler_filter_has_this_tag.inc
+files[] = views/facebook_status_tags_views_handler_filter_string_type.inc
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/facebook_status_tags/facebook_status_tags.install screamwork_fbss7/submodules/facebook_status_tags/facebook_status_tags.install
--- facebook_status_6_3/submodules/facebook_status_tags/facebook_status_tags.install	2011-04-19 16:02:19.293058600 -0400
+++ screamwork_fbss7/submodules/facebook_status_tags/facebook_status_tags.install	2011-05-25 20:53:28.000000000 -0400
@@ -9,3 +9,3 @@
 /**
- * Implementation of hook_schema().
+ * Implements hook_schema().
  */
@@ -54,21 +54,12 @@ function facebook_status_tags_schema() {
 /**
- * Implementation of hook_install().
+ * Implements hook_install().
  */
 function facebook_status_tags_install() {
-  drupal_install_schema('facebook_status_tags');
 
   if (module_exists('taxonomy')) {
-    // Check to see if the vocabulary already existed (i.e. from a previous installation).
-    $already_exists = db_fetch_object(db_query("SELECT vid, name FROM {vocabulary} WHERE module = 'facebook_status_tags'"));
-    if ($already_exists !== FALSE) {
-      variable_set('facebook_status_tags_vid', $already_exists->vid);
-      drupal_set_message(st('The vocabulary "@name" has been configured for use with the Facebook-style Statuses Tags module.', array('@name' => $already_exists->name)));
-      return;
-    }
     // Create a default vocabulary for use with hashtags.
     $vocab = array(
-      'name' => st('Hashtags'),
-      'description' => st('Contains #hashtags used in Facebook-style Statuses.'),
-      'multiple' => '1',
-      'required' => '0',
+      'name' => t('Hashtags'),
+      'description' => t('Contains #hashtags used in Facebook-style Statuses.'),
+      'machine_name' => 'hashtags',
       'hierarchy' => '0',
@@ -79,6 +70,6 @@ function facebook_status_tags_install()
     );
-    taxonomy_save_vocabulary($vocab);
-    $vid = db_result(db_query("SELECT vid FROM {vocabulary} WHERE name = '%s' AND module = 'facebook_status_tags'", st('Hashtags')));
+    $vocabulary = (object) $vocab;
+    taxonomy_vocabulary_save($vocabulary /* TODO Vocabulary object replaces array $vocab */);
+    $vid = db_query("SELECT vid FROM {taxonomy_vocabulary} WHERE name = :name", array(':name' => t('Hashtags')))->fetchField();
     variable_set('facebook_status_tags_vid', $vid);
-    drupal_set_message(st('The vocabulary "Hashtags" has been created and configured for use with the Facebook-style Statuses Tags module.'));
   }
@@ -87,2 +78,4 @@ function facebook_status_tags_install()
   }
+
+  $message = t('Facebook-style Statuses Tags has been successfully installed.');
 }
@@ -90,23 +83,16 @@ function facebook_status_tags_install()
 /**
- * Implementation of hook_uninstall().
+ * Implements hook_uninstall().
  */
 function facebook_status_tags_uninstall() {
-  drupal_uninstall_schema('facebook_status_tags');
 
-  if (variable_get('facebook_status_tags_vid', -1) != -1) {
-    $vocabulary = taxonomy_vocabulary_load(variable_get('facebook_status_tags_vid', -1));
-    if (isset($vocabulary->nodes) && count($vocabulary->nodes) == 0) {
-      drupal_set_message(
-        st('The Facebook-style Statuses Tags module has been uninstalled.') .' '.
-        st(
-          'However, the vocabulary "@name," which was used to store #hashtags for the Facebook-style Statuses Tags module, has not been deleted.',
-          array('@name' => $vocabulary->name)
-        ) .' '.
-        st(
-          'This vocabulary was not used for any other purpose, so <a href="!delete_url">deleting it</a> is recommended.',
-          array('!delete_url' => url('admin/content/taxonomy/edit/vocabulary/2', array('absolute' => TRUE)))
-        )
-      );
-    }
-  }
+  db_drop_table('facebook_status_tags');
+  
+  $del_vid = db_query("SELECT vid FROM {taxonomy_vocabulary} WHERE name = :name", array(':name' => t('Hashtags')))->fetchField();
+  db_delete('taxonomy_term_data')
+    ->condition('vid', $del_vid)
+    ->execute();
+  
+  db_delete('taxonomy_vocabulary')
+    ->condition('vid', $del_vid)
+    ->execute();
 
@@ -119,3 +105,3 @@ function facebook_status_tags_uninstall(
   // FBSST is ever installed again.
-  //variable_del('facebook_status_tags_alt_pattern');
+  variable_del('facebook_status_tags_alt_pattern');
 }
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/facebook_status_tags/facebook_status_tags.module screamwork_fbss7/submodules/facebook_status_tags/facebook_status_tags.module
--- facebook_status_6_3/submodules/facebook_status_tags/facebook_status_tags.module	2011-06-11 21:32:46.286147200 -0400
+++ screamwork_fbss7/submodules/facebook_status_tags/facebook_status_tags.module	2011-05-25 20:53:28.000000000 -0400
@@ -19,3 +19,3 @@
 /**
- * Implementation of hook_help().
+ * Implements hook_help().
  */
@@ -29,6 +29,6 @@ function facebook_status_tags_help($path
 /**
- * Implementation of hook_block().
+ * Implements hook_block_info().
  */
-function facebook_status_tags_block($op = 'list', $delta = 0, $edit = NULL) {
-  if ($op == 'list') {
+function facebook_status_tags_block_info() {
+  if (TRUE) {
     $block['facebook_status_popular_tags']['info'] = t('Facebook-style Statuses Popular Tags');
@@ -36,8 +36,22 @@ function facebook_status_tags_block($op
   }
-  elseif ($op == 'view' && $delta == 'facebook_status_popular_tags') {
+}
+
+/**
+ * Implements hook_block_view().
+ */
+function facebook_status_tags_block_view($delta = '') {
+	switch ($delta):
+	  case 'facebook_status_popular_tags':
     $block['subject'] = t('Popular tags');
     $block['content'] = theme('facebook_status_popular_tags');
+      break;
+  endswitch;
     return $block;
   }
-  elseif ($op == 'configure' && $delta == 'facebook_status_popular_tags') {
+
+/**
+ * Implements hook_block_configure().
+ */
+function facebook_status_tags_block_configure($delta) {
+  if (TRUE && $delta == 'facebook_status_popular_tags') {
     $form['facebook_status'] = array(
@@ -67,3 +81,9 @@ function facebook_status_tags_block($op
   }
-  elseif ($op == 'save' && $delta == 'facebook_status_popular_tags') {
+}
+
+/**
+ * Implements hook_block_save().
+ */
+function facebook_status_tags_block_save($delta, $edit) {
+  if (TRUE && $delta == 'facebook_status_popular_tags') {
     variable_set('facebook_status_tags_count', $edit['facebook_status']['facebook_status_tags_count']);
@@ -84,3 +104,3 @@ function facebook_status_tags_block_vali
 /**
- * Implementation of hook_form_FORM_ID_alter().
+ * Implements hook_form_FORM_ID_alter().
  */
@@ -96,4 +116,5 @@ function facebook_status_tags_form_faceb
     $vocabularies = taxonomy_get_vocabularies();
+    //dsm($vocabularies);
     foreach ($vocabularies as $vocabulary) {
-      if ($vocabulary->tags) {
+      if (isset($vocabulary->name)) {
         $options[$vocabulary->vid] = check_plain($vocabulary->name);
@@ -104,3 +125,3 @@ function facebook_status_tags_form_faceb
         t('You must <a href="!vocab">create a free-tagging vocabulary</a> for use with #hashtags in order to take advantage of that feature.',
-          array('!vocab' => url('admin/content/taxonomy/add/vocabulary'))),
+          array('!vocab' => url('admin/structure/taxonomy/add/vocabulary'))),
         'error');
@@ -120,3 +141,3 @@ function facebook_status_tags_form_faceb
       t('However, you will not be able to use #hashtags unless you <a href="!enable">enable</a> the core Taxonomy module.',
-        array('!enable' => url('admin/build/modules'))) .' '.
+        array('!enable' => url('admin/modules'))) . ' ' .
       t('Return here after enabling the Taxonomy module to configure it to accept #hashtags.')
@@ -127,3 +148,3 @@ function facebook_status_tags_form_faceb
 /**
- * Implementation of hook_theme().
+ * Implements hook_theme().
  */
@@ -132,3 +153,3 @@ function facebook_status_tags_theme($exi
     'facebook_status_popular_tags' => array(
-      'arguments' => array(
+      'variables' => array(
         'count' => NULL,
@@ -151,3 +172,5 @@ function facebook_status_tags_theme($exi
  */
-function theme_facebook_status_popular_tags($count = NULL, $time = NULL) {
+function theme_facebook_status_popular_tags($variables) {
+  $count = $variables['count'];
+  $time = $variables['time'];
   if (!$count) {
@@ -165,4 +188,5 @@ function theme_facebook_status_popular_t
   if (!empty($items)) {
-    return theme('item_list', $items);
+    return theme('item_list', array('items' => $items));
   }
+  return;
 }
@@ -196,10 +220,10 @@ function facebook_status_tags_get_status
   if (is_int($tag)) {
-    $rid = 'rid = %d';
+    $rid = 'rid = ?';
   }
   elseif (is_string($tag)) {
-    $rid = "name = '%s'";
+    $rid = "name = ?";
   }
-  $sql = "SELECT fbst.sid FROM {facebook_status_tags} fbst INNER JOIN {facebook_status} fb ON fbst.sid = fb.sid WHERE fbst.". $rid ." AND fbst.type = '%s' AND ";
+  $sql = "SELECT fbst.sid FROM {facebook_status_tags} fbst INNER JOIN {facebook_status} fb ON fbst.sid = fb.sid WHERE fbst." . $rid . " AND fbst.type = ? AND ";
   if ($sender == 0) {
-    $sql = "SELECT sid FROM {facebook_status_tags} WHERE ". $rid ." AND type = '%s'";
+    $sql = "SELECT sid FROM {facebook_status_tags} WHERE " . $rid . " AND type = ?";
   }
@@ -207,3 +231,3 @@ function facebook_status_tags_get_status
     $params[] = $sender;
-    $sql .= 'fb.sender = %d';
+    $sql .= 'fb.sender = ?';
   }
@@ -211,3 +235,3 @@ function facebook_status_tags_get_status
     $params = array_merge($params, $sender);
-    $sql .= 'fb.sender IN ('. db_placeholders($sender) .')';
+    $sql .= 'fb.sender IN (?)';
   }
@@ -219,3 +242,3 @@ function facebook_status_tags_get_status
   if ($count) {
-    $result = db_query_range($sql, $params, 0, $count);
+    $result = db_query_range($sql, 0, $count, $params);
   }
@@ -225,5 +248,6 @@ function facebook_status_tags_get_status
   $statuses = array();
-  while ($sid = db_fetch_object($result)) {
+  while ($sid = $result->fetchObject()) {
     $statuses[] = facebook_status_load($sid->sid);
   }
+  echo '<pre>'.print_r($statuses, true).'</pre>'; die();
   return $statuses;
@@ -242,3 +266,3 @@ function facebook_status_tags_get_status
 function facebook_status_tags_has_tags($sid, $type = NULL) {
-  $sql = "SELECT COUNT(rid) FROM {facebook_status_tags} WHERE sid = %d";
+  $sql = "SELECT COUNT(rid) FROM {facebook_status_tags} WHERE sid = ?";
   $args = array($sid);
@@ -246,3 +270,3 @@ function facebook_status_tags_has_tags($
     if (is_string($type)) {
-      $sql .= " AND type = '%s'";
+      $sql .= " AND type = ?";
       $args[] = $type;
@@ -250,3 +274,3 @@ function facebook_status_tags_has_tags($
     elseif (is_array($type)) {
-      $sql .= " AND TYPE IN (". db_placeholders($type, 'text') .")";
+      $sql .= " AND TYPE IN (?)";
       $args = array_merge($args, $type);
@@ -254,3 +278,3 @@ function facebook_status_tags_has_tags($
   }
-  return db_result(db_query($sql, $args));
+  return db_query($sql, $args)->fetchField();
 }
@@ -270,3 +294,3 @@ function facebook_status_tags_has_tags($
 function facebook_status_tags_status_has_tag($sid, $rid, $type = 'term') {
-  return db_result(db_query("SELECT COUNT(*) FROM {facebook_status_tags} WHERE sid = %d AND rid = %d AND type = '%s'", $sid, $rid, $type));
+  return db_query("SELECT COUNT(*) FROM {facebook_status_tags} WHERE sid = :sid AND rid = :rid AND type = :type", array(':sid' => $sid, ':rid' => $rid, ':type' => $type))->fetchField();
 }
@@ -286,3 +310,3 @@ function facebook_status_tags_status_has
 function facebook_status_tags_status_has_tag_by_name($sid, $tag, $type = 'term') {
-  return db_result(db_query("SELECT COUNT(*) FROM {facebook_status_tags} WHERE sid = %d AND name = '%s' AND type = '%s'", $sid, $tag, $type));
+  return db_query("SELECT COUNT(*) FROM {facebook_status_tags} WHERE sid = :sid AND name = :name AND type = :type", array(':sid' => $sid, ':name' => $tag, ':type' => $type))->fetchField();
 }
@@ -300,7 +324,7 @@ function facebook_status_tags_status_has
 function facebook_status_tags_get_status_tags($sid, $type = 'term') {
-  $result = db_query("SELECT rid FROM {facebook_status_tags} WHERE sid = %d AND type = '%s'", $sid, $type);
+  $result = db_query("SELECT rid FROM {facebook_status_tags} WHERE sid = :sid AND type = :type", array(':sid' => $sid, ':type' => $type));
   $rids = array();
-  while ($rid = db_fetch_object($result)) {
+  while ($rid = $result->fetchObject()) {
     if ($type == 'term') {
-      $rids[] = taxonomy_get_term($rid->rid);
+      $rids[] = taxonomy_term_load($rid->rid);
     }
@@ -360,3 +384,4 @@ function facebook_status_tags_popular_us
 function facebook_status_tags_popular($type = 'term', $count = 5, $time = 'all', $options = array()) {
-  $now = time();
+	#print_r($options) . "388"; die();
+  $now = REQUEST_TIME;
   if (is_numeric($time)) {
@@ -399,14 +424,19 @@ function facebook_status_tags_popular($t
   if ($options['current user only']) {
-    $restrict .= "f.sender = %d AND ";
-    $args[] = $GLOBALS['user']->uid;
+    $restrict .= "f.sender = :userid AND ";
+    $args['userid'] = $GLOBALS['user']->uid;
   }
-  $args[] = $type;
-  $args[] = $time;
+  $args['type'] = $type;
+  $args['time'] = $time;
+  
   $result = db_query_range("SELECT COUNT(t.sid) count, t.rid FROM {facebook_status_tags} t INNER JOIN {facebook_status} f ON t.sid = f.sid
-    WHERE ". $restrict ."t.type = '%s' AND f.created > %d GROUP BY t.rid ORDER BY count DESC, t.sid DESC", $args, 0, $count);
+    WHERE " . $restrict . "t.type = :type AND f.created > :time GROUP BY t.rid ORDER BY count DESC, t.sid DESC",
+    0, 
+    variable_get('facebook_status_tags_count', 5),
+    $args
+  );
   $tags = array();
-  while ($tag = db_fetch_object($result)) {
+  while ($tag = $result->fetchObject()) {
     $c = $tag->count;
     if ($type == 'term') {
-      $tag = taxonomy_get_term($tag->rid);
+      $tag = taxonomy_term_load($tag->rid);
     }
@@ -426,3 +456,3 @@ function facebook_status_tags_popular($t
  *   The message to process.
- * @return
+ * @param
  *   The message text with @mentions and #hashtags replaced.
@@ -470,3 +499,6 @@ function _facebook_status_tags_filter($s
   $replace = array();
-  $items = array('@' => array(), '#' => array());
+  $items = array(
+    '@' => array(),
+    '#' => array(),
+  );
   foreach ($words as $word) {
@@ -483,4 +515,4 @@ function _facebook_status_tags_filter($s
         $account = _facebook_status_user_load_by_name($match);
-        if ($account->uid) {
-          $link = $op . theme('username', $account);
+        if (isset($account->uid)) {
+          $link = $op . theme('username', array('account' => $account));
           $items['@'][] = $account;
@@ -496,3 +528,4 @@ function _facebook_status_tags_filter($s
           );
-          taxonomy_save_term($term);
+          $term = (object) $term;
+          taxonomy_term_save($term);
         }
@@ -565,3 +599,3 @@ function _facebook_status_tags_resolve($
 function _facebook_status_tags_get_term($name) {
-  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)));
+  return db_query("SELECT tid, name FROM {taxonomy_term_data} WHERE name = :name", array(':name' => $name))->fetchObject();
 }
@@ -573,3 +607,3 @@ function _facebook_status_tags_get_term(
 /**
- * Implementation of hook_preprocess_facebook_status_item().
+ * Implements hook_preprocess_facebook_status_item().
  */
@@ -584,8 +618,10 @@ function facebook_status_tags_preprocess
 /**
- * Implementation of hook_facebook_status_save().
+ * Implements hook_facebook_status_save().
  */
-function facebook_status_tags_facebook_status_save($status, $edit = FALSE) {
+function facebook_status_tags_facebook_status_save($status, $context = NULL, $edit = FALSE) {
   // If the status was just edited, the tags could have changed, so we flush them.
   if ($edit) {
-    db_query("DELETE FROM {facebook_status_tags} WHERE sid = %d", $status->sid);
+    db_delete('facebook_status_tags')
+		  ->condition('sid', $status->sid)
+		  ->execute();
   }
@@ -593,6 +629,6 @@ function facebook_status_tags_facebook_s
   // Users.
-  $old_matches = array();
+  $old_matches_user = array();
   foreach ($matches['@'] as $account) {
-    if (!in_array($account->uid, $old_matches)) {
-      $array = array(
+    if (!in_array($account->uid, $old_matches_user)) {
+      $user_array = array(
         'sid' => $status->sid,
@@ -602,14 +638,6 @@ function facebook_status_tags_facebook_s
       );
-      drupal_write_record('facebook_status_tags', $array);
-      $old_matches[] = $account->uid;
-      if (module_exists('rules')) {
-        rules_invoke_event('facebook_status_tags_user_was_tagged', $status, $account);
+      drupal_write_record('facebook_status_tags', $user_array);
+      $old_matches_user[] = $account->uid;
       }
-      if (module_exists('trigger')) {
-        module_invoke_all('facebook_status_tags', 'fbsst_user_tagged', $status, $account);
       }
-      module_invoke_all('facebook_status_tags_user_was_tagged', $status, $account);
-    }
-  }
-  
   // Terms.
@@ -620,5 +648,5 @@ function facebook_status_tags_facebook_s
   foreach ($matches['#'] as $term) {
-    $term = (object) $term;
+    #$term = (object) $term;
     if (!in_array($term->tid, $old_matches)) {
-      $array = array(
+      $term_array = array(
         'sid' => $status->sid,
@@ -628,3 +656,3 @@ function facebook_status_tags_facebook_s
       );
-      drupal_write_record('facebook_status_tags', $array);
+      drupal_write_record('facebook_status_tags', $term_array);
       $old_matches[] = $term->tid;
@@ -635,17 +663,8 @@ function facebook_status_tags_facebook_s
 /**
- * Implementation of hook_facebook_status_delete().
+ * Implements hook_facebook_status_delete().
  */
-function facebook_status_tags_facebook_status_delete($status) {
-  db_query("DELETE FROM {facebook_status_tags} WHERE sid = %d", $status->sid);
-
-  if (module_exists('activity')) {
-    $result = db_query("SELECT aid FROM {activity} WHERE type = 'facebook_status_tags' AND eid = %d", $status->sid);
-    $records = array();
-    while ($record = db_fetch_object($result)) {
-      $records[] = $record->aid;
-    }
-    if (!empty($records)) {
-      activity_delete($records);
-    }
-  }
+function facebook_status_tags_facebook_status_delete($sid) {
+  db_delete('facebook_status_tags')
+    ->condition('sid', $sid)
+    ->execute();
 }
@@ -657,3 +676,3 @@ function facebook_status_tags_facebook_s
 /**
- * Implementation of hook_views_api().
+ * Implements hook_views_api().
  */
@@ -661,3 +680,3 @@ function facebook_status_tags_views_api(
   return array(
-    'api' => 2,
+    'api' => 3,
     'path' => drupal_get_path('module', 'facebook_status_tags') .'/views',
@@ -667,3 +686,3 @@ function facebook_status_tags_views_api(
 /**
- * Implementation of hook_views_data_alter().
+ * Implements hook_views_data_alter().
  *
@@ -676,27 +695,9 @@ function facebook_status_tags_views_data
 /**
- * Implementation of hook_taxonomy().
- */
-function facebook_status_tags_taxonomy($op, $type, $array = NULL) {
-  if ($op != 'delete') {
-    return;
-  }
-  if ($type == 'term') {
-    db_query("DELETE FROM {facebook_status_tags} WHERE rid = %d AND type = 'term'", $array['tid']);
-  }
-  elseif ($type == 'vocabulary') {
-    if ($array['vid'] === variable_get('facebook_status_tags_vid', -1)) {
-      // If the vocabulary is deleted, all the tags will no longer exist, so the references are invalid.
-      db_query("DELETE FROM {facebook_status_tags} WHERE type = 'term'");
-      variable_set('facebook_status_tags_vid', -1);
-    }
-  }
-}
-
-/**
- * Implementation of hook_user().
+ * Implements hook_taxonomy_term_delete($term).
  */
-function facebook_status_tags_user($op, &$edit, &$account, $category = NULL) {
-  if ($op == 'delete') {
-    db_query("DELETE FROM {facebook_status_tags} WHERE rid = %d and type = 'user'", $account->uid);
-  }
+function facebook_status_tags_taxonomy_term_delete($term) {
+	 db_delete('facebook_status_tags')
+     ->condition('rid', $array['tid'])
+     ->condition('type', 'term')
+     ->execute();
 }
@@ -704,95 +705,11 @@ function facebook_status_tags_user($op,
 /**
- * Implementation of hook_hook_info().
+ * Implements hook_taxonomy_vocabulary_delete($vocabulary).
  */
-function facebook_status_tags_hook_info() {
-  return array(
-    'facebook_status_tags' => array(
-      'facebook_status_tags' => array(
-        'fbsst_user_tagged' => array(
-          'runs when' => t('A user has been mentioned in a status message'),
-        ),
-      ),
-    ),
-  );
-}
-
-/**
- * Implementation of hook_facebook_status().
- * or
- * Implementation of hook_trigger_name().
- */
-function facebook_status_tags_facebook_status_tags($op, $status, $account) {
-  if ($op != 'fbsst_user_tagged') {
-    return;
-  }
-  $aids = _trigger_get_hook_aids('facebook_status_tags', $op);
-  $context = array(
-    'hook' => 'facebook_status_tags',
-    'op' => $op,
-    'facebook_status' => $status,
-    'account' => $account,
-  );
-  actions_do(array_keys($aids), $account, $context);
-}
-
-//=======================
-// ACTIVITY INTEGRATION.
-//=======================
-
-/**
- * Implementation of hook_activity_info().
- */
-function facebook_status_tags_activity_info() {
-  $info = new stdClass();
-  $info->api = 2;
-  $info->name = 'facebook_status_tags';
-  $info->object_type = 'facebook_status';
-  $info->eid_field = 'sid';
-  $info->objects = array('Mentioned user' => 'facebook_status');
-  $info->hooks = array('facebook_status_tags' => array('fbsst_user_tagged'));
-  $info->realms = array('facebook_status_tags_mentioned' => 'Mentioned user');
-  return $info;
-}
-
-/**
- * Implementation of hook_activity_grants().
- */
-function facebook_status_tags_activity_grants($activity) {
-  $realms = array();
-  if ($activity->type == 'facebook_status_tags') {
-    $result = db_query("SELECT rid FROM {facebook_status_tags} WHERE type = 'user' AND sid = %d", $activity->eid);
-    while ($account = db_fetch_object($result)) {
-      $realms['facebook_status_tags_mentioned'][] = $account->rid;
-    }
-  }
-  return $realms;
-}
-
-/**
- * Implementation of hook_activity_access_grants().
- */
-function facebook_status_tags_activity_access_grants($account) {
-  return array(
-    'facebook_status_tags_mentioned' => array($account->uid),
-  );
-}
-
-/**
- * Implementation of hook_list_activity_actions().
- */
-function facebook_status_tags_list_activity_actions($hook, $op, $max_age) {
-  $actions = array();
-  if (!empty($max_age)) {
-    $min_time = time() - $max_age;
-  }
-  else {
-    $min_time = 0;
-  }
-
-  $result = db_query("SELECT f.sid as id, f.created, t.rid as actor FROM {facebook_status_tags} t INNER JOIN {facebook_status} f ON t.sid = f.sid WHERE t.type = 'user' AND created > %d", $min_time);
-  while ($row = db_fetch_array($result)) {
-    $actions[] = $row;
+function facebook_status_tags_taxonomy_vocabulary_delete($vocabulary) {
+  if ($array['vid'] === variable_get('facebook_status_tags_vid', -1)) {
+    db_delete('facebook_status_tags')
+      ->condition('type', 'term')
+      ->execute();
+    variable_set('facebook_status_tags_vid', -1);
   }
-
-  return $actions;
 }
@@ -800,17 +717,8 @@ function facebook_status_tags_list_activ
 /**
- * Implementation of hook_load_activity_context().
+ * Implements hook_user_cancel().
  */
-function facebook_status_tags_load_activity_context($hook, $op, $id) {
-  $staus = facebook_status_load($id);
-  $activity_context = array();
-
-  if (!empty($status)) {
-    $activity_context = array(
-      'hook' => 'facebook_status_tags',
-      'op' => $op,
-      'facebook_status' => $status,
-    );
-  }
-
-  return $activity_context;
+function facebook_status_tags_user_cancel($edit, $account, $method) {
+    db_delete('facebook_status_tags')
+		  ->condition('rid', $account->uid)
+		  ->execute();
 }
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/facebook_status_tags/facebook_status_tags.rules.inc screamwork_fbss7/submodules/facebook_status_tags/facebook_status_tags.rules.inc
--- facebook_status_6_3/submodules/facebook_status_tags/facebook_status_tags.rules.inc	2011-04-13 22:10:04.934822500 -0400
+++ screamwork_fbss7/submodules/facebook_status_tags/facebook_status_tags.rules.inc	2011-05-25 20:53:28.000000000 -0400
@@ -8,19 +8,3 @@
 /**
- * Implementation of hook_rules_event_info().
- */
-function facebook_status_tags_rules_event_info() {
-  return array(
-    'facebook_status_tags_user_was_tagged' => array(
-      'label' => t('User was tagged in a status'),
-      'module' => 'Facebook-style Statuses',
-      'arguments' => array(
-        'status' => array('type' => 'facebook_status', 'label' => t('The status.')),
-        'account' => array('type' => 'user', 'label' => t('The user who was tagged in the status.')),
-      ),
-    ),
-  );
-}
-
-/**
- * Implementation of hook_rules_condition_info().
+ * Implements hook_rules_condition_info().
  */
@@ -31,3 +15,6 @@ function facebook_status_tags_rules_cond
       'arguments' => array(
-        'status' => array('type' => 'facebook_status', 'label' => t('The status')),
+        'status' => array(
+          'type' => 'facebook_status',
+          'label' => t('The status'),
+        ),
       ),
@@ -39,3 +26,6 @@ function facebook_status_tags_rules_cond
       'arguments' => array(
-        'status' => array('type' => 'facebook_status', 'label' => t('The status')),
+        'status' => array(
+          'type' => 'facebook_status',
+          'label' => t('The status'),
+        ),
       ),
@@ -81,3 +71,6 @@ function facebook_status_tags_has_specif
 function facebook_status_tags_has_specific_tag_condition_form($settings, &$form) {
-  $settings += array('type' => '', 'tag' => '');
+  $settings += array(
+    'type' => '',
+    'tag' => '',
+  );
   $form['settings']['type'] = array(
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/facebook_status_tags/views/facebook_status_tags.views.inc screamwork_fbss7/submodules/facebook_status_tags/views/facebook_status_tags.views.inc
--- facebook_status_6_3/submodules/facebook_status_tags/views/facebook_status_tags.views.inc	2011-06-11 21:32:37.539646900 -0400
+++ screamwork_fbss7/submodules/facebook_status_tags/views/facebook_status_tags.views.inc	2011-05-25 20:53:28.000000000 -0400
@@ -8,3 +8,3 @@
 /**
- * Implementation of hook_views_data().
+ * Implements hook_views_data().
  */
@@ -132,3 +132,3 @@ function facebook_status_tags_views_data
 /**
- * Implementation of hook_views_handlers().
+ * Implements hook_views_handlers().
  */
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/facebook_status_tags/views/facebook_status_tags.views_default.inc screamwork_fbss7/submodules/facebook_status_tags/views/facebook_status_tags.views_default.inc
--- facebook_status_6_3/submodules/facebook_status_tags/views/facebook_status_tags.views_default.inc	2011-06-12 17:11:27.995113300 -0400
+++ screamwork_fbss7/submodules/facebook_status_tags/views/facebook_status_tags.views_default.inc	2011-05-25 20:53:28.000000000 -0400
@@ -8,3 +8,3 @@
 /**
- * Implementation of hook_views_default_views().
+ * Implements hook_views_default_views().
  */
@@ -19,34 +19,5 @@ function facebook_status_tags_views_defa
   $view->api_version = 2;
-  $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
+  $view->disabled = !module_exists('taxonomy');
   $handler = $view->new_display('default', 'Tag Reference', 'default');
   $handler->override_option('fields', array(
-    'sid' => 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,
-        'html' => 0,
-        'strip_tags' => 0,
-      ),
-      'empty' => '',
-      'hide_empty' => 0,
-      'empty_zero' => 0,
-      'exclude' => 1,
-      'id' => 'sid',
-      'table' => 'facebook_status',
-      'field' => 'sid',
-      'relationship' => 'none',
-    ),
     'user_contextual_pic' => array(
@@ -104,4 +75,4 @@ function facebook_status_tags_views_defa
         'text' => '',
-        'make_link' => 1,
-        'path' => 'statuses/[sid]',
+        'make_link' => 0,
+        'path' => '',
         'alt' => '',
@@ -125,90 +96,2 @@ function facebook_status_tags_views_defa
     ),
-    'edit' => 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,
-        'html' => 0,
-        'strip_tags' => 0,
-      ),
-      'empty' => '',
-      'hide_empty' => 0,
-      'empty_zero' => 0,
-      'exclude' => 1,
-      'id' => 'edit',
-      'table' => 'facebook_status',
-      'field' => 'edit',
-      'relationship' => 'none',
-    ),
-    'delete' => 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,
-        'html' => 0,
-        'strip_tags' => 0,
-      ),
-      'empty' => '',
-      'hide_empty' => 0,
-      'empty_zero' => 0,
-      'exclude' => 1,
-      'id' => 'delete',
-      'table' => 'facebook_status',
-      'field' => 'delete',
-      'relationship' => 'none',
-    ),
-    'repost' => 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,
-        'html' => 0,
-        'strip_tags' => 0,
-      ),
-      'empty' => '',
-      'hide_empty' => 0,
-      'empty_zero' => 0,
-      'repost_text' => 'Share',
-      'exclude' => 1,
-      'id' => 'repost',
-      'table' => 'facebook_status',
-      'field' => 'repost',
-      'relationship' => 'none',
-    ),
     'nothing' => array(
@@ -216,5 +99,3 @@ function facebook_status_tags_views_defa
       'alter' => array(
-        'text' => '<div>[user_contextual_pic] [message]</div>
-  
-  <div class="facebook-status-details">[created] [edit] [delete] [repost]</div>',
+        'text' => '<div>[user_contextual_pic] [message] [created]</div>',
         'make_link' => 0,
@@ -245,2 +126,9 @@ function facebook_status_tags_views_defa
   $handler->override_option('sorts', array(
+    'created' => array(
+      'order' => 'DESC',
+      'id' => 'created',
+      'table' => 'facebook_status',
+      'field' => 'created',
+      'relationship' => 'none',
+    ),
     'sid' => array(
@@ -293,3 +181,3 @@ function facebook_status_tags_views_defa
       'validate_argument_vocabulary' => array(
-        '2' => '2',
+        variable_get('facebook_status_tags_vid', -1) . '' => variable_get('facebook_status_tags_vid', -1),
       ),
@@ -305,5 +193,2 @@ function facebook_status_tags_views_defa
   ));
-  $handler->override_option('cache', array(
-    'type' => 'none',
-  ));
   $handler->override_option('title', 'Tags');
@@ -311,3 +196,2 @@ function facebook_status_tags_views_defa
   $handler->override_option('use_pager', 'mini');
-  $handler->override_option('distinct', 1);
   $handler->override_option('style_plugin', 'table');
@@ -339,3 +223,3 @@ function facebook_status_tags_views_defa
   $handler = $view->new_display('page', 'Page', 'page_1');
-  $handler->override_option('path', 'statuses/term');
+  $handler->override_option('path', 'statuses/term/%');
   $handler->override_option('menu', array(
@@ -352,3 +236,2 @@ function facebook_status_tags_views_defa
     'weight' => 0,
-    'name' => 'navigation',
   ));
@@ -391,34 +274,5 @@ function facebook_status_tags_views_defa
   $view->api_version = 2;
-  $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
+  $view->disabled = FALSE;
   $handler = $view->new_display('default', 'User Reference', 'default');
   $handler->override_option('fields', array(
-    'sid' => 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,
-        'html' => 0,
-        'strip_tags' => 0,
-      ),
-      'empty' => '',
-      'hide_empty' => 0,
-      'empty_zero' => 0,
-      'exclude' => 1,
-      'id' => 'sid',
-      'table' => 'facebook_status',
-      'field' => 'sid',
-      'relationship' => 'none',
-    ),
     'user_contextual_pic' => array(
@@ -476,4 +330,4 @@ function facebook_status_tags_views_defa
         'text' => '',
-        'make_link' => 1,
-        'path' => 'statuses/[sid]',
+        'make_link' => 0,
+        'path' => '',
         'alt' => '',
@@ -497,90 +351,2 @@ function facebook_status_tags_views_defa
     ),
-    'delete' => 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,
-        'html' => 0,
-        'strip_tags' => 0,
-      ),
-      'empty' => '',
-      'hide_empty' => 0,
-      'empty_zero' => 0,
-      'exclude' => 1,
-      'id' => 'delete',
-      'table' => 'facebook_status',
-      'field' => 'delete',
-      'relationship' => 'none',
-    ),
-    'edit' => 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,
-        'html' => 0,
-        'strip_tags' => 0,
-      ),
-      'empty' => '',
-      'hide_empty' => 0,
-      'empty_zero' => 0,
-      'exclude' => 1,
-      'id' => 'edit',
-      'table' => 'facebook_status',
-      'field' => 'edit',
-      'relationship' => 'none',
-    ),
-    'repost' => 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,
-        'html' => 0,
-        'strip_tags' => 0,
-      ),
-      'empty' => '',
-      'hide_empty' => 0,
-      'empty_zero' => 0,
-      'repost_text' => 'Share',
-      'exclude' => 1,
-      'id' => 'repost',
-      'table' => 'facebook_status',
-      'field' => 'repost',
-      'relationship' => 'none',
-    ),
     'nothing' => array(
@@ -588,5 +354,3 @@ function facebook_status_tags_views_defa
       'alter' => array(
-        'text' => '<div>[user_contextual_pic] [message]</div>
-  
-  <div class="facebook-status-details">[created] [edit] [delete] [repost]</div>',
+        'text' => '<div>[user_contextual_pic] [message] [created]</div>',
         'make_link' => 0,
@@ -617,2 +381,9 @@ function facebook_status_tags_views_defa
   $handler->override_option('sorts', array(
+    'created' => array(
+      'order' => 'DESC',
+      'id' => 'created',
+      'table' => 'facebook_status',
+      'field' => 'created',
+      'relationship' => 'none',
+    ),
     'sid' => array(
@@ -674,5 +445,2 @@ function facebook_status_tags_views_defa
   ));
-  $handler->override_option('cache', array(
-    'type' => 'none',
-  ));
   $handler->override_option('title', 'User Mentions');
@@ -682,3 +450,2 @@ function facebook_status_tags_views_defa
   $handler->override_option('use_more', 0);
-  $handler->override_option('distinct', 1);
   $handler->override_option('style_plugin', 'table');
@@ -724,3 +491,2 @@ function facebook_status_tags_views_defa
     'weight' => 0,
-    'name' => 'navigation',
   ));
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/facebook_status_tags/views/facebook_status_tags_views_handler_argument_has_this_tag.inc screamwork_fbss7/submodules/facebook_status_tags/views/facebook_status_tags_views_handler_argument_has_this_tag.inc
--- facebook_status_6_3/submodules/facebook_status_tags/views/facebook_status_tags_views_handler_argument_has_this_tag.inc	2011-04-09 19:23:26.568619200 -0400
+++ screamwork_fbss7/submodules/facebook_status_tags/views/facebook_status_tags_views_handler_argument_has_this_tag.inc	2011-05-25 20:53:28.000000000 -0400
@@ -71,4 +71,5 @@ class facebook_status_tags_views_handler
     }
-    $query = "$field IN (SELECT sid FROM {facebook_status_tags} WHERE name = '%s' $where)";
-    $this->query->add_where(0, db_prefix_tables($query), $argument);
+    $query = "$field IN (SELECT sid FROM {facebook_status_tags} WHERE name = '$argument' $where)";
+    #print $query; die();
+    $this->query->add_where_expression(0, $query, array());
   }
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/facebook_status_tags/views/facebook_status_tags_views_handler_argument_has_this_tag_id.inc screamwork_fbss7/submodules/facebook_status_tags/views/facebook_status_tags_views_handler_argument_has_this_tag_id.inc
--- facebook_status_6_3/submodules/facebook_status_tags/views/facebook_status_tags_views_handler_argument_has_this_tag_id.inc	2011-04-09 19:23:26.568619200 -0400
+++ screamwork_fbss7/submodules/facebook_status_tags/views/facebook_status_tags_views_handler_argument_has_this_tag_id.inc	2011-05-25 20:53:28.000000000 -0400
@@ -63,3 +63,3 @@ class facebook_status_tags_views_handler
         $query = "$this->table_alias.$this->real_field IN (SELECT sid FROM {facebook_status_tags} WHERE rid $operator ($placeholders) $where)";
-        $this->query->add_where(0, db_prefix_tables($query), $this->value);
+      $this->query->add_where_expression(0, $query, $this->value);
       }
@@ -71,3 +71,3 @@ class facebook_status_tags_views_handler
         $query .= "AND $this->table_alias.pid IN (%d, %d)";
-        $this->query->add_where(0, db_prefix_tables($query), array_merge($this->value, $this->value));
+      $this->query->add_where_expression(0, $query, array_merge($this->value, $this->value));
       }
@@ -76,3 +76,3 @@ class facebook_status_tags_views_handler
         $query = "$this->table_alias.$this->real_field IN (SELECT sid FROM {facebook_status_tags} WHERE rid $operator %d $where)";
-        $this->query->add_where(0, db_prefix_tables($query), $this->argument);
+      $this->query->add_where_expression(0, $query, $this->argument);
       }
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/facebook_status_tags/views/facebook_status_tags_views_handler_field_all_terms.inc screamwork_fbss7/submodules/facebook_status_tags/views/facebook_status_tags_views_handler_field_all_terms.inc
--- facebook_status_6_3/submodules/facebook_status_tags/views/facebook_status_tags_views_handler_field_all_terms.inc	2011-04-09 19:23:26.569619300 -0400
+++ screamwork_fbss7/submodules/facebook_status_tags/views/facebook_status_tags_views_handler_field_all_terms.inc	2011-05-25 20:53:28.000000000 -0400
@@ -85,3 +85,3 @@ class facebook_status_tags_views_handler
         elseif ($tag->type == 'user') {
-          $tags[] = $prefix . theme('username', _facebook_status_user_load($tag->tid));
+          $tags[] = $prefix . theme('username', array('account' => _facebook_status_user_load($tag->tid)));
         }
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/facebook_status_tags/views/facebook_status_tags_views_handler_field_name.inc screamwork_fbss7/submodules/facebook_status_tags/views/facebook_status_tags_views_handler_field_name.inc
--- facebook_status_6_3/submodules/facebook_status_tags/views/facebook_status_tags_views_handler_field_name.inc	2011-04-09 19:23:26.571619400 -0400
+++ screamwork_fbss7/submodules/facebook_status_tags/views/facebook_status_tags_views_handler_field_name.inc	2011-05-25 20:53:28.000000000 -0400
@@ -63,3 +63,3 @@ class facebook_status_tags_views_handler
       elseif ($tag->type == 'user') {
-        $tags[] = $prefix . theme('username', _facebook_status_user_load($tag->tid));
+        $tags[] = $prefix . theme('username', array('account' => _facebook_status_user_load($tag->tid)));
       }
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/facebook_status_tags/views/facebook_status_tags_views_handler_filter_has_this_tag.inc screamwork_fbss7/submodules/facebook_status_tags/views/facebook_status_tags_views_handler_filter_has_this_tag.inc
--- facebook_status_6_3/submodules/facebook_status_tags/views/facebook_status_tags_views_handler_filter_has_this_tag.inc	2011-06-27 12:05:47.941917400 -0400
+++ screamwork_fbss7/submodules/facebook_status_tags/views/facebook_status_tags_views_handler_filter_has_this_tag.inc	2011-05-25 20:53:28.000000000 -0400
@@ -38,8 +38,2 @@ class facebook_status_tags_views_handler
   }
-  function value_form(&$form, &$form_state) {
-    parent::value_form($form, $form_state);
-    if (variable_get('facebook_status_tags_vid', -1) != -1) {
-      $form['value']['#autocomplete_path'] = 'taxonomy/autocomplete/'. variable_get('facebook_status_tags_vid', -1);
-    }
-  }
   function query() {
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/fbss_activity/fbss_activity.info screamwork_fbss7/submodules/fbss_activity/fbss_activity.info
--- facebook_status_6_3/submodules/fbss_activity/fbss_activity.info	2011-04-09 19:23:26.574619600 -0400
+++ screamwork_fbss7/submodules/fbss_activity/fbss_activity.info	2011-05-25 20:53:28.000000000 -0400
@@ -5,2 +5,3 @@ dependencies[] = facebook_status
 dependencies[] = activity
-core = 6.x
\ No newline at end of file
+core = 7.x
+files[] = fbss_activity.module
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/fbss_activity/fbss_activity.module screamwork_fbss7/submodules/fbss_activity/fbss_activity.module
--- facebook_status_6_3/submodules/fbss_activity/fbss_activity.module	2011-06-02 13:02:37.382107700 -0400
+++ screamwork_fbss7/submodules/fbss_activity/fbss_activity.module	2011-05-25 20:53:28.000000000 -0400
@@ -8,8 +8,8 @@
 /**
- * Implementation of hook_facebook_status_delete().
+ * Implements hook_facebook_status_delete().
  */
-function fbss_activity_facebook_status_delete($status) {
-  $result = db_query("SELECT aid FROM {activity} WHERE type = 'facebook_status' AND op NOT LIKE 'fbss_deleted%' AND eid = %d", $status->sid);
+function fbss_activity_facebook_status_delete($sid) {
+  $result = db_query("SELECT aid FROM {activity} WHERE type = :type AND eid = :eid", array(':type' => 'facebook_status', ':eid' => $sid));
   $records = array();
-  while ($record = db_fetch_object($result)) {
+  while ($record = $result->fetchObject()) {
     $records[] = $record->aid;
@@ -34,18 +34,13 @@ function facebook_status_activity_info()
   $info->eid_field = 'sid';
-  $info->objects = array('Recipient' => 'facebook_status', 'Sender' => 'sender');
-  $hooks = array(
-    'fbss_deleted',
-    'fbss_deleted_user_self',
-    'fbss_deleted_user_other',
-    'fbss_edited',
-    'fbss_edited_user_self',
-    'fbss_edited_user_other',
-    'fbss_submitted',
-    'fbss_submitted_user_self',
-    'fbss_submitted_user_other'
+  $info->objects = array(
+    'Recipient' => 'facebook_status',
+    'Sender' => 'sender',
   );
+  $hooks = array('fbss_deleted', 'fbss_edited');
   foreach (facebook_status_all_contexts() as $type => $details) {
-    if ($type != 'user') {
-      $hooks[] = 'fbss_deleted_'. $type;
-      $hooks[] = 'fbss_edited_'. $type;
+    if ($type == 'user') {
+      $hooks[] = 'fbss_submitted_user_self';
+      $hooks[] = 'fbss_submitted_user_other';
+    }
+    else {
       $hooks[] = 'fbss_submitted_'. $type;
@@ -53,5 +48,7 @@ function facebook_status_activity_info()
   }
-  sort($hooks);
   $info->hooks = array('facebook_status' => $hooks);
-  $info->realms = array('facebook_status_sender' => 'Facebook-style Statuses Sender', 'facebook_status_recipient' => 'Facebook-style Statuses Recipient');
+  $info->realms = array(
+    'facebook_status_sender' => 'Facebook-style Statuses Sender',
+    'facebook_status_recipient' => 'Facebook-style Statuses Recipient',
+  );
   return $info;
@@ -66,3 +63,3 @@ function facebook_status_activity_grants
     $realms['facebook_status_sender'] = array($activity->uid);
-    $result = db_fetch_object(db_query("SELECT recipient FROM {facebook_status} WHERE sid = %d", $activity->eid));
+    $result = db_query("SELECT recipient FROM {facebook_status} WHERE sid = :sid", array(':sid' => $activity->eid))->fetchObject;
     $realms['facebook_status_recipient'] = array($result->recipient);
@@ -88,3 +85,3 @@ function facebook_status_list_activity_a
   if (!empty($max_age)) {
-    $min_time = time() - $max_age;
+    $min_time = REQUEST_TIME - $max_age;
   }
@@ -95,12 +92,6 @@ function facebook_status_list_activity_a
   if ($op == 'fbss_submitted_user_self') {
-    $result = db_query(
-      "SELECT sid as id, created, sender as actor FROM {facebook_status} WHERE created > %d AND type = 'user' AND sender = recipient",
-      $min_time
-    );
+    $result = db_query("SELECT sid as id, created, sender as actor FROM {facebook_status} WHERE created > :created AND type = :type AND sender = :sender", array(':created' => $min_time, ':type' => 'user', ':sender' => 'recipient'));
   }
   elseif ($op == 'fbss_submitted_user_other') {
-    $result = db_query(
-      "SELECT sid as id, created, sender as actor FROM {facebook_status} WHERE created > %d AND type = 'user' AND sender <> recipient",
-      $min_time
-    );
+    $result = db_query("SELECT sid as id, created, sender as actor FROM {facebook_status} WHERE created > :created AND type = :type AND sender <> :sender", array(':created' => $min_time, ':type' => 'user', ':sender' => 'recipient'));
   }
@@ -109,7 +100,3 @@ function facebook_status_list_activity_a
       if ($op == 'fbss_submitted_'. $type) {
-        $result = db_query(
-          "SELECT sid as id, created, sender as actor FROM {facebook_status} WHERE created > %d AND type = '%s'",
-          $min_time,
-          $type
-        );
+        $result = db_query("SELECT sid as id, created, sender as actor FROM {facebook_status} WHERE created > :created AND type = :type", array(':created' => $min_time, ':type' => $type));
         break;
@@ -120,3 +107,3 @@ function facebook_status_list_activity_a
   if (isset($result)) {
-    while ($row = db_fetch_array($result)) {
+    while ($row = $result->fetchObject()) {
       $actions[] = $row;
@@ -125,2 +112,4 @@ function facebook_status_list_activity_a
 
+  drupal_alter('facebook_status_list_activity_actions', $actions);
+  dsm($actions);
   return $actions;
@@ -157,17 +146 @@ function facebook_status_load_activity_c
 }
-
-/**
- * Implementation of hook_form_FORM_ID_alter().
- * Activity 2.
-*/
-function facebook_status_form_activity_form_alter(&$form, &$form_state) {
-  if ($form_state['storage']['values']['triggers']['hook'] == 'facebook_status') {
-    $op = $form_state['storage']['values']['operations']['operation'];
-    // Remove the "Recipient" field unless this is for a user posting a message to another user.
-    if ($op != 'fbss_submitted_user_other' && $op != 'fbss_edited_user_other' && $op != 'fbss_deleted_user_other') {
-      foreach (activity_enabled_languages() as $id => $language) {
-        unset($form[$id .'_fieldset']['facebook_status-pattern-'. $id]);
-      }
-    }
-  }
-}
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/fbss_comments/api.php screamwork_fbss7/submodules/fbss_comments/api.php
--- facebook_status_6_3/submodules/fbss_comments/api.php	2011-05-24 09:48:14.940667900 -0400
+++ screamwork_fbss7/submodules/fbss_comments/api.php	1969-12-31 19:00:00.000000000 -0500
@@ -1,54 +0,0 @@
-<?php
-
-/**
- * @file
- *   Defines API hooks for the Facebook-style Statuses Comments module.
- */
-
-/**
- * React to a comment being saved.
- *
- * @param $comment
- *   The newly saved comment object.
- * @param $edit
- *   TRUE if the comment was just edited; FALSE if it was just created.
- * @see fbss_comments_save_comment()
- * @see fbss_comments_edit_submit()
- */
-function hook_fbss_comments_after_save($comment, $edit) {
-  if ($edit) {
-    drupal_set_message(t('The comment has been saved.'));
-  }
-  else {
-    drupal_set_message(t('The comment has been updated.'));
-  }
-}
-
-/**
- * React to a comment being deleted.
- *
- * @param $cid
- *   The ID of the comment that was just deleted.
- * @see fbss_comments_delete_comment()
- */
-function hook_fbss_comments_delete($cid) {
-  drupal_set_message(t('The comment has been deleted.'));
-}
-
-/**
- * Alter the permissions to take action on a comment.
- *
- * @param $allow
- *   Whether the user will be allowed to take action on the comment. Only set
- *   this to FALSE if you want to explicitly deny access. Setting this to TRUE
- *   defaults to the built-in access controls.
- * @param $op
- *   The action being taken on the comment. One of view, post, edit, delete.
- * @param $comment
- *   The comment object on which the action is being taken.
- * @param $account
- *   The user object of the person taking the action.
- * @see fbss_comments_can()
- */
-function hook_fbss_comments_has_permission_alter(&$allow, $op, $comment, $account) {
-}
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/fbss_comments/fbss_comments.css screamwork_fbss7/submodules/fbss_comments/fbss_comments.css
--- facebook_status_6_3/submodules/fbss_comments/fbss_comments.css	2011-06-20 09:23:18.973461400 -0400
+++ screamwork_fbss7/submodules/fbss_comments/fbss_comments.css	2011-05-25 20:53:28.000000000 -0400
@@ -32,5 +32,3 @@
 
-.fbss-comments-created,
-.fbss-comments-edit-delete {
-  padding-right: 1em;
+.fbss-comments-closure {
   font-size: 90%;
@@ -39,5 +37,4 @@
 
-.fbss-comments-closure .flag-wrapper {
-  margin-left: 0;
-  font-size: 90%;
+.fbss-comments-closure span {
+  padding-right: 1em;
 }
@@ -48,7 +45,2 @@
 
-.fbss-comments-author-picture {
-  display: inline;
-  padding-right: 0.5em;
-}
-
 .fbss-comments-form .resizable-textarea {
@@ -58,9 +50,7 @@
 .fbss-comments-form .form-submit {
-  float: right;
-  margin: 2px;
+  margin: 0 1.5em;
 }
 
-.fbss-comments-textarea {
-  width: 100%;
-  /* line-height: 1em; */
+.fbss-comments-hide {
+  display: none;
 }
@@ -87,7 +77,3 @@
 
-/* These are "show" links that should not be visible to users with JS disabled. */
-.fbss-comments-show-comment-form,
-.fbss-comments-show-comment-form-inner,
-.fbss-comments-show-comments {
-  display: none;
-}
+/* The "Show all comments" link when it expands instead of redirecting. */
+.fbss-comments-show-comments {}
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/fbss_comments/fbss_comments.edit.inc screamwork_fbss7/submodules/fbss_comments/fbss_comments.edit.inc
--- facebook_status_6_3/submodules/fbss_comments/fbss_comments.edit.inc	1969-12-31 19:00:00.000000000 -0500
+++ screamwork_fbss7/submodules/fbss_comments/fbss_comments.edit.inc	2011-05-25 20:53:28.000000000 -0400
@@ -0,0 +1,104 @@
+<?php
+
+/**
+ * @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 fbss_comments_edit($form, $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 fbss_comments_edit_submit($form, &$form_state) {
+  
+  db_update('fbss_comments')
+    ->fields(array(
+      'comment' => $form_state['values']['status-comment-edit'],
+    ))
+	  ->condition('cid', $form['#cid'])
+	  ->execute();
+  #$c = fbssc_load($form['#cid']);
+  module_invoke_all('fbss_comments_after_save', $form['#cid'], TRUE);
+  if (isset($_GET['destination']) && ($_GET['destination'] != 'fbss_comments/js/refresh')) {
+    $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 fbss_comments_delete($form, $form_state, $comment) {
+  $form = array();
+  $form['infotext'] = array(
+    '#type' => 'markup',
+    '#markup' => '<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('fbss_comments_delete_confirm'),
+  );
+  $form['back'] = array(
+    '#type' => 'submit',
+    '#value' => t('Cancel'),
+    '#submit' => array('fbss_comments_delete_cancel'),
+  );
+  $form['#cid'] = $comment->cid;
+  return $form;
+}
+
+/**
+ * The confirmation submit handler for the delete form for status comments.
+ */
+function fbss_comments_delete_confirm($form, &$form_state) {
+  fbss_comments_delete_comment($form['#cid']);
+  drupal_set_message(t('Status comment deleted.'));
+  if (isset($_GET['destination']) && ($_GET['destination'] != 'fbss_comments/js/refresh')) {
+    $form_state['redirect'] = $_GET['destination'];
+  }
+  else {
+    $form_state['redirect'] = '<front>';
+  }
+}
+
+/**
+ * The cancellation submit handler for the delete form for status comments.
+ */
+function fbss_comments_delete_cancel($form, &$form_state) {
+  drupal_set_message(t('Status comment was not deleted.'));
+  if (isset($_GET['destination']) && $_GET['destination'] != 'fbss_comments/js/refresh') {
+    $form_state['redirect'] = $_GET['destination'];
+  }
+  else {
+    $form_state['redirect'] = '<front>';
+  }
+}
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/fbss_comments/fbss_comments.generate.inc screamwork_fbss7/submodules/fbss_comments/fbss_comments.generate.inc
--- facebook_status_6_3/submodules/fbss_comments/fbss_comments.generate.inc	2011-05-26 16:02:01.449642500 -0400
+++ screamwork_fbss7/submodules/fbss_comments/fbss_comments.generate.inc	1969-12-31 19:00:00.000000000 -0500
@@ -1,137 +0,0 @@
-<?php
-
-/**
- * @file
- *   Provides Devel Generate integration.
- */
-
-/**
- * The Generate status comments form.
- */
-function fbss_comments_generate_form($form_state) {
-  $form['killswitch'] = array(
-    '#type' => 'checkbox',
-    '#title' => t('<strong>Delete all status comments</strong> before generating new content'),
-    '#default_value' => FALSE,
-  );
-  $form['num'] = array(
-    '#type' => 'textfield',
-    '#title' => t('How many status comments would you like to generate?'),
-    '#default_value' => 50,
-    '#size' => 10,
-    '#required' => TRUE,
-  );
-  $form['submit'] = array(
-    '#type' => 'submit',
-    '#value' => t('Generate status comments'),
-  );
-  return $form;
-}
-
-/**
- * The validation handler for the Generate status comments form.
- */
-function fbss_comments_generate_form_validate($form, &$form_state) {
-  $n = $form_state['values']['num'];
-  //A user might want to "generate" 0 status comments if they really just want to delete everything.
-  if (!is_numeric($n) || $n < 0 || $n != round($n)) {
-    form_set_error('num', t('You must generate at least 0 status comments.'));
-  }
-}
-
-/**
- * The submit handler for the Generate status comments form.
- */
-function fbss_comments_generate_form_submit($form, &$form_state) {
-  $v = $form_state['values'];
-  $operations = array();
-  if ($v['killswitch']) {
-    $operations[] = array('fbss_comments_generate_killswitch', array());
-  }
-  if ($v['num'] > 50 || $v['killswitch']) {
-    for ($i = 0; $i < $v['num']; $i += 50) {
-      $count = ($v['num'] - $i < 50 ? $v['num'] - $i : 50);
-      $operations[] = array('fbss_comments_generate_status_comment_bulk', array($count));
-    }
-    batch_set(array(
-      'title' => t('Generating status comments'),
-      'operations' => $operations,
-      'finished' => 'fbss_comments_generate_finished',
-      'file' => drupal_get_path('module', 'fbss_comments') .'/fbss_comments.generate.inc',
-    ));
-  }
-  else {
-    $context = array('results' => array('num' => 0));
-    for ($i = 0; $i < $v['num']; $i++) {
-      fbss_comments_generate_status_comment($context);
-    }
-    fbss_comments_generate_finished(TRUE, $context['results'], array());
-  }
-}
-
-/**
- * Creates a lot of status updates at once.
- *
- * @param $count
- *   The number of status comments to create.
- * @param $time
- *   The number of seconds ago that corresponds to the created time of the
- *   oldest status we could create.
- */
-function fbss_comments_generate_status_comment_bulk($count, &$context) {
-  for ($i = 0; $i < $count; $i++) {
-    fbss_comments_generate_status_comment($context);
-  }
-}
-
-/**
- * Generates a status.
- *
- * @param $time
- *   The number of seconds ago that corresponds to the created time of the
- *   oldest status we could create.
- */
-function fbss_comments_generate_status_comment(&$context) {
-  module_load_include('inc', 'devel', 'devel_generate');
-
-  $sid = db_result(db_query_range("SELECT sid FROM {facebook_status} ORDER BY RAND()", 0, 1));
-
-  $mtext = devel_create_greeking(mt_rand(2, variable_get('facebook_status_length', 140) / 7));
-  $text = drupal_substr($mtext, 0, variable_get('facebook_status_length', 140));
-
-  $uids = devel_get_users();
-  $uid = 0;
-  while ($uid == 0) {
-    $uid = $uids[array_rand($uids)];
-  }
-
-  fbss_comments_save_comment($sid, $text, $uid);
-  $context['results']['num']++;
-}
-
-/**
- * Deletes all status comments.
- */
-function fbss_comments_generate_killswitch(&$context) {
-  $result = db_query("SELECT cid FROM {fbss_comments}");
-  $i = 0;
-  while ($comment = db_fetch_object($result)) {
-    fbss_comments_delete_comment($comment->cid);
-    $i++;
-  }
-  drupal_set_message(format_plural($i, 'Deleted one status comment', 'Deleted @count status comments'));
-}
-
-/**
- * Alerts user that the batch processing is complete.
- */
-function fbss_comments_generate_finished($success, $results, $operations) {
-  $message = t('Finished creating status comments with an error.');
-  if ($success && $results['num']) {
-    $message = t('Finished creating @num status comments sucessfully.', array('@num' => $results['num']));
-  }
-  elseif ($success) {
-    $message = t('0 status comments processed.');
-  }
-  drupal_set_message($message);
-}
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/fbss_comments/fbss_comments.info screamwork_fbss7/submodules/fbss_comments/fbss_comments.info
--- facebook_status_6_3/submodules/fbss_comments/fbss_comments.info	2011-04-09 19:23:26.580619900 -0400
+++ screamwork_fbss7/submodules/fbss_comments/fbss_comments.info	2011-05-25 20:53:28.000000000 -0400
@@ -4,2 +4,10 @@ dependencies[] = facebook_status
 package = Facebook-style Statuses
-core = 6.x
+core = 7.x
+
+files[] = fbss_comments.edit.inc
+files[] = fbss_comments.install
+files[] = fbss_comments.module
+files[] = fbss_comments.views.inc
+files[] = fbss_comments_views_handler_field_cc.inc
+files[] = fbss_comments_views_handler_field_cc2.inc
+files[] = fbss_comments_views_handler_field_comment_box.inc
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/fbss_comments/fbss_comments.install screamwork_fbss7/submodules/fbss_comments/fbss_comments.install
--- facebook_status_6_3/submodules/fbss_comments/fbss_comments.install	2011-06-06 11:54:01.089445400 -0400
+++ screamwork_fbss7/submodules/fbss_comments/fbss_comments.install	2011-05-25 20:53:28.000000000 -0400
@@ -8,3 +8,3 @@
 /**
- * Implementation of hook_schema().
+ * Implements hook_schema().
  */
@@ -58,3 +58,3 @@ function fbss_comments_schema() {
 /**
- * Implementation of hook_install().
+ * Implements hook_install().
  */
@@ -64,3 +64,4 @@ function fbss_comments_install() {
   }
-  drupal_install_schema('fbss_comments');
+  // TODO The drupal_(un)install_schema functions are called automatically in D7.
+  // drupal_install_schema('fbss_comments')
   if (db_table_exists('fbssc')) {
@@ -72,3 +73,3 @@ function fbss_comments_install() {
     ");
-    drupal_uninstall_module('fbssc');
+    drupal_uninstall_modules(array('fbssc'));
     drupal_set_message(st('The Facebook-style Statuses Comments module has been upgraded.') .' '.
@@ -80,11 +81,7 @@ function fbss_comments_install() {
 /**
- * Implementation of hook_uninstall().
+ * Implements hook_uninstall().
  */
 function fbss_comments_uninstall() {
-  drupal_uninstall_schema('fbss_comments');
-  variable_del('fbss_comments_user_pictures');
-  variable_del('fbss_comments_hide_small');
-  variable_del('fbss_comments_show_all');
-  variable_del('facebook_status_ahah');
-  variable_del('fbss_comments_enter');
+  // TODO The drupal_(un)install_schema functions are called automatically in D7.
+  // drupal_uninstall_schema('fbss_comments')
 }
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/fbss_comments/fbss_comments.js screamwork_fbss7/submodules/fbss_comments/fbss_comments.js
--- facebook_status_6_3/submodules/fbss_comments/fbss_comments.js	2011-05-25 23:24:40.125869200 -0400
+++ screamwork_fbss7/submodules/fbss_comments/fbss_comments.js	2011-05-25 20:53:28.000000000 -0400
@@ -1,23 +1,16 @@
-Drupal.behaviors.fbss_comments = function (context) {
-  var ctxt = $(context);
-  // The "Comment" link when there are no comments. Reveals the textarea and save button.
-  ctxt.find('.fbss-comments-show-comment-form').one('click', function() {
+(function ($) {
+
+  Drupal.behaviors.fbss_comments = {
+    attach: function (context, settings) {
+      $('.fbss-comments-show-comment-form', context).one('click', function() {
     $(this).hide();
-    var f = $('#'+ this.id +' + div');
-    f.show();
-    var sid = this.id.split('-').pop();
-    f.find('.fbss-comments-replace-'+ sid +'-inner').show();
-    f.find('.fbss-comments-textarea').focus();
+        $('#'+ this.id +' + div').show();
     return false;
   });
-  // The "Comment" link when there are comments. Reveals the textarea and save button.
-  ctxt.find('.fbss-comments-show-comment-form-inner').one('click', function() {
+      $('.fbss-comments-show-comment-form-inner', context).one('click', function() {
     $(this).hide();
-    var sid = this.id.split('-').pop();
-    $(this).parents('form').find('.fbss-comments-replace-'+ sid +'-inner').show();
-    $(this).parents('form').find('.fbss-comments-textarea').focus();
+        $('#'+ this.id +' + div').show();
     return false;
   });
-  // The "Show all X comments" link when there are fewer than 10 comments. Reveals the hidden comments.
-  ctxt.find('a.fbss-comments-show-comments').one('click', function() {
+      $('a.fbss-comments-show-comments', context).one('click', function() {
     $(this).hide();
@@ -26,44 +19,5 @@ Drupal.behaviors.fbss_comments = functio
   });
-  // Hide things we're not ready to show yet.
-  ctxt.find('.fbss-comments-hide').hide();
-  // Show things we're not ready to hide yet.
-  ctxt.find('.fbss-comments-show-comment-form, .fbss-comments-show-comment-form-inner, .fbss-comments-show-comments').show();
-  ctxt.find('.fbss-comments-show-comments').css('display', 'block');
-  // Disable the save button at first.
-  ctxt.find('.fbss-comments-submit').attr('disabled', true);
-  // Disable the save button after saving a comment.
-  ctxt.find('.fbss-comments-comment-form').bind('ahah_success', function() {
-    $(this).find('.fbss-comments-submit').attr('disabled', true);
-  });
-  // Enable the save button if there is text in the textarea.
-  ctxt.find('.fbss-comments-textarea').keypress(function(key) {
-    var th = $(this);
-    setTimeout(function() {
-      if (th.val().length > 0) {
-        th.parents('form').find('input').attr('disabled', false);
-      }
-      else {
-        th.parents('form').find('input').attr('disabled', true);
-      }
-    }, 10);
-  });
-  // Modal Frame integration.
-  if (Drupal.modalFrame) {
-    ctxt.find('.fbss-comments-edit-delete a').click(function(event) {
-      event.preventDefault();
-      var sid = $(this).parents('form').attr('id').split('-').pop();
-      var th = $(this);
-      var handle = function() {
-        $.get('index.php?q=fbss_comments/js/modalframe/'+ sid, function(data) {
-          th.parents('.fbss-comments').replaceWith($(data));
-          Drupal.attachBehaviors($(data));
-        });
-      };
-      Drupal.modalFrame.open({url: $(this).attr('href'), onSubmit: handle});
-    });
-  }
-  if ($.fn.autogrow) {
-    // jQuery Autogrow plugin integration.
-    // $('.fbss-comments-textarea').autogrow({expandTolerance: 2});
   }
 }
+
+})(jQuery);
\ No newline at end of file
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/fbss_comments/fbss_comments.module screamwork_fbss7/submodules/fbss_comments/fbss_comments.module
--- facebook_status_6_3/submodules/fbss_comments/fbss_comments.module	2011-06-17 02:21:24.165656500 -0400
+++ screamwork_fbss7/submodules/fbss_comments/fbss_comments.module	2011-05-25 20:53:28.000000000 -0400
@@ -15,5 +15,4 @@
  *       + views bulk operations
- *       + notifications
+ *   - Document API and add README.txt.
  *   - Turn the comment theme functions into templates.
- *   - Make Views integration good enough that we can use it for comment lists.
  */
@@ -25,3 +24,14 @@
 /**
- * Implementation of hook_menu().
+ * Implements hook_init().
+ */
+function fbss_comments_init() {
+  if (strpos($_GET['q'], 'admin/structure/views/edit') !== FALSE) {
+    $path = drupal_get_path('module', 'fbss_comments');
+    drupal_add_js($path . '/fbss_comments.js');
+    drupal_add_css($path . '/fbss_comments.css');
+  }
+}
+
+/**
+ * Implements hook_menu().
  */
@@ -29,11 +39,2 @@ function fbss_comments_menu() {
   $items = array();
-  $items['admin/settings/facebook_status/fbss_comments'] = array(
-    'title' => 'Comments',
-    'page callback' => 'drupal_get_form',
-    'page arguments' => array('fbss_comments_admin'),
-    'access arguments' => array('administer Facebook-style Statuses settings'),
-    'description' => 'Allows administrators to adjust settings for Facebook-style Statuses Comments.',
-    'type' => MENU_LOCAL_TASK,
-    'file' => 'fbss_comments.pages.inc',
-  );
   $items['statuses/comment/%fbss_comments/edit'] = array(
@@ -42,6 +43,6 @@ function fbss_comments_menu() {
     'page arguments' => array('fbss_comments_edit', 2),
-    'access callback' => 'fbss_comments_can',
-    'access arguments' => array('edit', 2),
+    'access callback' => 'fbss_comments_can_edit',
+    'access arguments' => array(2),
     'type' => MENU_CALLBACK,
-    'file' => 'fbss_comments.pages.inc',
+    'file' => 'fbss_comments.edit.inc',
   );
@@ -51,31 +52,7 @@ function fbss_comments_menu() {
     'page arguments' => array('fbss_comments_delete', 2),
-    'access callback' => 'fbss_comments_can',
-    'access arguments' => array('delete', 2),
-    'type' => MENU_CALLBACK,
-    'file' => 'fbss_comments.pages.inc',
-  );
-  $items['fbss_comments/js/refresh'] = array(
-    'title' => 'Save status comment form',
-    'page callback' => 'fbss_comments_save_js',
-    'access arguments' => array('post status comment'),
+    'access callback' => 'fbss_comments_can_delete',
+    'access arguments' => array(2),
     'type' => MENU_CALLBACK,
+    'file' => 'fbss_comments.edit.inc',
   );
-  $items['fbss_comments/js/modalframe/%'] = array(
-    'title' => 'Refresh a list of comments',
-    'page callback' => 'fbss_comments_modalframe_refresh',
-    'page arguments' => array(3),
-    'access arguments' => array('view own status comments'),
-    'type' => MENU_CALLBACK,
-  );
-  if (module_exists('devel_generate')) {
-    $items['admin/generate/fbss_comments'] = array(
-      'title' => 'Generate status comments',
-      'description' => 'Generate a given number of status comments. Optionally delete current items.',
-      'page callback' => 'drupal_get_form',
-      'page arguments' => array('fbss_comments_generate_form'),
-      'access callback' => 'facebook_status_user_access',
-      'access arguments' => array('generate'),
-      'file' => 'fbss_comments.generate.inc',
-    );
-  }
   return $items;
@@ -84,8 +61,8 @@ function fbss_comments_menu() {
 /**
- * Implementation of hook_user().
+ * Implements hook_user_cancel().
  */
-function fbss_comments_user($op, &$edit, &$account, $category = NULL) {
-  if ($op == 'delete') {
-    db_query("DELETE FROM {fbss_comments} WHERE uid = %d", $account->uid);
-  }
+function fbss_comments_user_cancel($edit, $account, $method) {
+  db_delete('fbss_comments')
+	  ->condition('uid', $account->uid)
+	  ->execute();
 }
@@ -93,15 +70,43 @@ function fbss_comments_user($op, &$edit,
 /**
- * Implementation of hook_perm().
+ * Implements hook_user().
  */
-function fbss_comments_perm() {
+function fbss_comments_user_OLD($op, &$edit, &$account, $category = NULL) { }
+
+/**
+ * Implements hook_permission().
+ */
+function fbss_comments_permission() {
   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',
-    'view own status comments',
+    'delete all status comments' => array(
+      'title' => t('delete all status comments'),
+      'description' => t('TODO Add a description for \'delete all status comments\''),
+    ),
+    'delete own status comments' => array(
+      'title' => t('delete own status comments'),
+      'description' => t('TODO Add a description for \'delete own status comments\''),
+    ),
+    'delete comments on own statuses' => array(
+      'title' => t('delete comments on own statuses'),
+      'description' => t('TODO Add a description for \'delete comments on own statuses\''),
+    ),
+    'edit all status comments' => array(
+      'title' => t('edit all status comments'),
+      'description' => t('TODO Add a description for \'edit all status comments\''),
+    ),
+    'edit own status comments' => array(
+      'title' => t('edit own status comments'),
+      'description' => t('TODO Add a description for \'edit own status comments\''),
+    ),
+    'edit comments on own statuses' => array(
+      'title' => t('edit comments on own statuses'),
+      'description' => t('TODO Add a description for \'edit comments on own statuses\''),
+    ),
+    'post status comment' => array(
+      'title' => t('post status comment'),
+      'description' => t('TODO Add a description for \'post status comment\''),
+    ),
+    'view all status comments' => array(
+      'title' => t('view all status comments'),
+      'description' => t('TODO Add a description for \'view all status comments\''),
+    ),
   );
@@ -110,3 +115,3 @@ function fbss_comments_perm() {
 /**
- * Implementation of hook_theme().
+ * Implements hook_theme().
  */
@@ -115,3 +120,3 @@ function fbss_comments_theme($existing,
     'fbss_comments_item' => array(
-      'arguments' => array(
+      'variables' => array(
         'comment' => NULL,
@@ -122,3 +127,3 @@ function fbss_comments_theme($existing,
     'fbss_comments_items' => array(
-      'arguments' => array(
+      'variables' => array(
         'comments' => array(),
@@ -129,3 +134,3 @@ function fbss_comments_theme($existing,
     'fbss_comments_form_display' => array(
-      'arguments' => array(
+      'variables' => array(
         'sid' => NULL,
@@ -156,8 +161,9 @@ function fbss_comments_theme($existing,
  */
-function theme_fbss_comments_item($comment, $classes = array(), $destination = '') {
-  if (!fbss_comments_can('view', $comment)) {
+function theme_fbss_comments_item($variables) {
+  $comment = $variables['comment'];
+  $classes = $variables['classes'];
+  $destination = $variables['destination'];
+  if (!fbss_comments_can_view($comment)) {
       return FALSE;
   }
-  drupal_add_css(drupal_get_path('module', 'fbss_comments') .'/fbss_comments.css');
-  $author = _facebook_status_user_load($comment->uid);
   array_unshift($classes, 'fbss-comments-comment');
@@ -165,6 +171,3 @@ function theme_fbss_comments_item($comme
   $output = '<div class="'. $classes .'">';
-  if (variable_get('fbss_comments_user_pictures', 0)) {
-    $output .= '<div class="fbss-comments-author-picture">'. _fbss_comments_user_picture($author) .'</div>';
-  }
-  $output .= '<div class="fbss-comments-author">'. theme('username', $author) .'</div>';
+  $output .= '<div class="fbss-comments-author">' . theme('username', array('account' => _facebook_status_user_load($comment->uid))) . '</div>';
   $comment_text = _facebook_status_run_filter($comment->comment);
@@ -173,3 +176,3 @@ function theme_fbss_comments_item($comme
   $output .= '<div class="fbss-comments-closure">';
-  $output .= '<span class="fbss-comments-created">'. theme('facebook_status_time', $comment->created) .'</span>';
+  $output .= '<span class="fbss-comments-created">' . theme('facebook_status_time', array('time' => $comment->created)) . '</span>';
   $q = $_GET['q'];
@@ -181,3 +184,3 @@ function theme_fbss_comments_item($comme
   }
-  if (fbss_comments_can('edit', $comment)) {
+  if (fbss_comments_can_edit($comment)) {
     $output .= '<span class="fbss-comments-edit-delete">'.
@@ -186,3 +189,3 @@ function theme_fbss_comments_item($comme
   }
-  if (fbss_comments_can('delete', $comment)) {
+  if (fbss_comments_can_delete($comment)) {
     $output .= '<span class="fbss-comments-edit-delete">'.
@@ -191,13 +194,5 @@ function theme_fbss_comments_item($comme
   }
-  if (module_exists('fbss_comments_flag')) {
-    foreach (flag_get_flags() as $name => $info) {
-      if ($info->content_type == 'fbss_comment') {
-        $output .= flag_create_link($name, $comment->cid);
-      }
-    }
-  }
   $output .= '</div></div>';
-  if (module_exists('modalframe')) {
-    modalframe_parent_js();
-  }
+  // Invokes hook_fbss_comments_render_alter(&$output, $comment).
+  drupal_alter('fbss_comments_render', $output, $comment);
   return $output;
@@ -223,3 +218,6 @@ function theme_fbss_comments_item($comme
  */
-function theme_fbss_comments_items($comments, $delay_load = TRUE, $destination = '') {
+function theme_fbss_comments_items($variables) {
+  $comments = $variables['comments'];
+  $delay_load = $variables['delay_load'];
+  $destination = $variables['destination'];
   $count = count($comments);
@@ -228,7 +226,11 @@ function theme_fbss_comments_items($comm
   }
-  drupal_add_js(drupal_get_path('module', 'fbss_comments') .'/fbss_comments.js');
+  $path = drupal_get_path('module', 'fbss_comments');
+  drupal_add_js($path . '/fbss_comments.js');
   $output = '<div class="fbss-comments">';
-  if ($count > variable_get('fbss_comments_hide_small', 3) && $delay_load) {
-    $options = array('attributes' => array('class' => 'fbss-comments-show-comments-link fbss-comments-show-comments', 'id' => 'fbss-comments-toggle-'. $comments[0]->sid));
-    if ($count >= variable_get('fbss_comments_show_all', 10)) {
+  if ($count > 3 && $delay_load) {
+    $options = array('attributes' => array(
+        'class' => 'fbss-comments-show-comments-link fbss-comments-show-comments',
+        'id' => 'fbss-comments-toggle-' . $comments[0]->sid,
+      ));
+    if ($count > 9) {
       $options['attributes']['class'] = 'fbss-comments-show-comments-link';
@@ -237,3 +239,2 @@ function theme_fbss_comments_items($comm
   }
-  $rendered = 0;
   foreach ($comments as $key => $comment) {
@@ -252,11 +253,7 @@ function theme_fbss_comments_items($comm
     }
-    if ($count > variable_get('fbss_comments_hide_small', 3) && $key <= $count - variable_get('fbss_comments_hide_small', 3) && $delay_load) {
+    if ($count > 3 && $key != $count - 1 && $key != $count - 2 && $delay_load) {
       $classes[] = 'fbss-comments-hide';
     }
-    if (!$delay_load || $count < variable_get('fbss_comments_show_all', 10) || $key > $count - variable_get('fbss_comments_hide_small', 3)) {
-      $result = theme('fbss_comments_item', $comment, $classes, $destination);
-      if (!empty($result)) {
-        $output .= $result;
-        $rendered++;
-      }
+    if (!$delay_load || $count < 10 || $key == $count - 1 || $key == $count - 2) {
+      $output .= theme('fbss_comments_item', array('comment' => $comment, 'classes' => $classes, 'destination' => $destination));
     }
@@ -264,6 +261,4 @@ function theme_fbss_comments_items($comm
   $output .= '</div>';
-  if ($rendered > 0) {
     return $output;
   }
-}
 
@@ -289,18 +284,21 @@ function theme_fbss_comments_items($comm
  * @return
- *   The themed HTML for the status form, or if the user does not have
- *   permission to post a comment, then the list of comments.
+ *   Themed HTML for the status form.
  */
-function theme_fbss_comments_form_display($sid, $delay_load_form = TRUE, $delay_load_comments = TRUE) {
-  if (fbss_comments_can('post', facebook_status_load($sid))) {
+function theme_fbss_comments_form_display($variables) {
+  $sid = $variables['sid'];
+  $delay_load_form = $variables['delay_load_form'];
+  $delay_load_comments = $variables['delay_load_comments'];
+  if (fbss_comments_can_post(facebook_status_load($sid))) {
+    $path = drupal_get_path('module', 'fbss_comments');
+    drupal_add_js($path . '/fbss_comments.js');
     $output = '';
-    if ($delay_load_form && !fbss_comments_count_comments($sid, TRUE)) {
-      $output = '<span class="fbss-comments-show-comment-form" id="fbss-comments-toggle-'. $sid .'">'.
+    if ($delay_load_form && !fbss_comments_count_comments($sid)) {
+      $output = '<div class="fbss-comments-show-comment-form" id="fbss-comments-toggle-' . $sid . '">' .
         l(t('Comment'), 'statuses/'. $sid, array('attributes' => array('class' => 'fbss-comments-show-comment-form-link')))
-        .'</span>';
-        return $output .'<div class="fbss-comments-hide fbss-comments-form">'. drupal_get_form('fbss_comments_box_'. $sid, $sid, $delay_load_comments) .'</div>';
-    }
-    return '<div class="fbss-comments-form">'. drupal_get_form('fbss_comments_box_'. $sid, $sid, $delay_load_comments, $delay_load_form) .'</div>';
+        . '</div>';
+     
+      return $output . '<div class="fbss-comments-hide fbss-comments-form">' . drupal_render(drupal_get_form('fbss_comments_box', $sid, $delay_load_comments)) . '</div>';
   }
-  else if (user_access('view all status comments')) {
-    return theme('fbss_comments_items', fbss_comments_get_comments($sid, TRUE), $delay_load_comments, $_GET['q']);
+    
+    return '<div class="fbss-comments-form">' . drupal_render(drupal_get_form('fbss_comments_box', $sid, $delay_load_comments)) . '</div>';
   }
@@ -324,3 +322,8 @@ function fbss_comments_load($cid) {
   }
-  return db_fetch_object(db_query("SELECT * FROM {fbss_comments} WHERE cid = %d", $cid));
+  $node_additions = db_query("SELECT * FROM {fbss_comments} WHERE cid = :cid", array(':cid' => $cid))->fetchObject();
+  $new_cid = new stdClass();
+  foreach ($node_additions as $property => &$value) {
+    $new_cid->$property = $value;
+  }
+  return $new_cid;
 }
@@ -332,5 +335,2 @@ function fbss_comments_load($cid) {
  *   The Status ID of the thread for which to retrieve comments.
- * @param $filter_view_access
- *   If TRUE, only comments which the user has permission to view will be
- *   returned. Otherwise, all relevant comments will be returned.
  * @return
@@ -338,10 +338,8 @@ function fbss_comments_load($cid) {
  */
-function fbss_comments_get_comments($sid, $filter_view_access = FALSE) {
-  $result = db_query("SELECT * FROM {fbss_comments} WHERE sid = %d ORDER BY created ASC, cid ASC", $sid);
+function fbss_comments_get_comments($sid) {
+  $result = db_query("SELECT * FROM {fbss_comments} WHERE sid = :sid ORDER BY created ASC, cid ASC", array(':sid' => $sid));
   $results = array();
-  while ($comment = db_fetch_object($result)) {
-    if (!$filter_view_access || fbss_comments_can('view', $comment)) {
+  while ($comment = $result->fetchObject()) {
       $results[] = $comment;
     }
-  }
   return $results;
@@ -352,8 +350,4 @@ function fbss_comments_get_comments($sid
  *
- * @param $sid
- *   The ID of the status on which the comment was saved.
  * @param $comment
- *   The status comment text.
- * @param $uid
- *   The ID of the user who saved the comment.
+ *   The status comment object.
  * @return
@@ -365,8 +359,10 @@ function fbss_comments_save_comment($sid
   }
-  $c = (object) array('sid' => $sid, 'uid' => $uid, 'created' => time(), 'comment' => $comment);
+  $c = (object) array(
+    'sid' => $sid,
+    'uid' => $uid,
+    'created' => REQUEST_TIME,
+    'comment' => $comment,
+  );
   drupal_write_record('fbss_comments', $c);
   module_invoke_all('fbss_comments_after_save', $c, FALSE);
-  if (module_exists('trigger')) {
-    module_invoke_all('fbss_comments', 'fbss_comments_saved', $c);
-  }
   return $c;
@@ -381,7 +377,6 @@ function fbss_comments_save_comment($sid
 function fbss_comments_delete_comment($cid) {
+  db_delete('fbss_comments')
+	  ->condition('cid', $cid)
+	  ->execute();
   module_invoke_all('fbss_comments_delete', $cid);
-  if (module_exists('trigger')) {
-    module_invoke_all('fbss_comments', 'fbss_comments_deleted', fbss_comments_load($comment));
-  }
-  db_query("DELETE FROM {fbss_comments} WHERE cid = %d", $cid);
 }
@@ -390,23 +385,5 @@ function fbss_comments_delete_comment($c
  * Counts the number of comments on a status.
- *
- * @param $sid
- *   The ID of the status whose comments should be counted.
- * @param $filter_view_access
- *   If TRUE, the count will be of comments that the current user has
- *   permission to view. Otherwise, will count all relevant comments.
- * @return
- *   The number of comments on the specified status.
  */
-function fbss_comments_count_comments($sid, $filter_view_access = FALSE) {
-  if ($filter_view_access) {
-    $result = db_query("SELECT * FROM {fbss_comments} WHERE sid = %d", $sid);
-    $count = 0;
-    while ($comment = db_fetch_object($result)) {
-      if (fbss_comments_can('view', $comment)) {
-        $count++;
-      }
-    }
-    return $count;
-  }
-  return db_result(db_query("SELECT COUNT(cid) FROM {fbss_comments} WHERE sid = %d", $sid));
+function fbss_comments_count_comments($sid) {
+  return db_query("SELECT COUNT(cid) FROM {fbss_comments} WHERE sid = :sid", array(':sid' => $sid))->fetchField();
 }
@@ -428,3 +405,3 @@ function fbss_comments_has_commented($si
   }
-  $result = db_result(db_query("SELECT COUNT(cid) FROM {fbss_comments} WHERE sid = %d and uid = %d", $sid, $uid));
+  $result = db_query("SELECT COUNT(cid) FROM {fbss_comments} WHERE sid = :sid and uid = :uid", array(':sid' => $sid, ':uid' => $uid))->fetchField();
   return $result > 0;
@@ -433,6 +410,4 @@ function fbss_comments_has_commented($si
 /**
- * Determines whether a user has permission to take an action on a comment.
+ * Determines whether a user can view the relevant status.
  *
- * @param $op
- *   The action to take. One of view, post, edit, delete.
  * @param $comment
@@ -442,6 +417,4 @@ function fbss_comments_has_commented($si
  *   current user.
- * @return
- *   TRUE if the user can take the specified action; FALSE otherwise.
  */
-function fbss_comments_can($op, $comment, $account = NULL) {
+function fbss_comments_can_view($comment, $account = NULL) {
   if (empty($account)) {
@@ -449,24 +422,7 @@ function fbss_comments_can($op, $comment
   }
-  $result = call_user_func('_fbss_comments_can_'. $op, $comment, $account);
   $allow = TRUE;
-  drupal_alter('fbss_comments_has_permission', $allow, $op, $comment, $account);
-  return $allow && $result;
-}
-
-//===================
-// HELPER FUNCTIONS.
-//===================
-
-/**
- * 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.
- * @return
- *   TRUE if the user can view the comment; FALSE otherwise.
- */
-function _fbss_comments_can_view($comment, $account) {
-  return user_access('view all status comments', $account) || (user_access('view own status comments') && $comment->uid == $account->uid);
+  // 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('fbss_comments_can_view', $allow, $comment, $account);
+  return $allow && user_access('view all status comments', $account);
 }
@@ -479,3 +435,4 @@ function _fbss_comments_can_view($commen
  * @param $account
- *   The $user object of the user whose access will be checked.
+ *   The $user object of the user whose access will be checked. Defaults to the
+ *   current user.
  * @return
@@ -483,4 +440,11 @@ function _fbss_comments_can_view($commen
  */
-function _fbss_comments_can_post($status, $account = NULL) {
-  return user_access('post status comment', $account);
+function fbss_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('fbss_comments_can_post', $allow, $status, $account);
+  return $allow && user_access('post status comment', $account);
 }
@@ -493,3 +457,4 @@ function _fbss_comments_can_post($status
  * @param $account
- *   The $user object of the user whose access will be checked.
+ *   The $user object of the user whose access will be checked. Defaults to the
+ *   current user.
  * @return
@@ -497,9 +462,19 @@ function _fbss_comments_can_post($status
  */
-function _fbss_comments_can_edit($comment, $account = NULL) {
+function fbss_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('fbss_comments_can_edit', $allow, $comment, $account);
   // This is in two separate statements (instead of one big return statement)
   // so that the SQL in _fbss_comments_get_thread_author() does not usually need to be run.
-  if (user_access('edit all status comments', $account) || (user_access('edit own status comments', $account) && $account->uid == $comment->uid)) {
+  if ($allow && (user_access('edit all status comments', $account) ||
+    (user_access('edit own status comments', $account) && $account->uid == $comment->uid)
+  )) {
     return TRUE;
   }
-  return user_access('edit comments on own statuses', $account) && $account->uid == _fbss_comments_get_thread_author($comment->sid);
+  return $allow && user_access('edit comments on own statuses', $account)
+    && $account->uid == _fbss_comments_get_thread_author($comment->sid);
 }
@@ -512,3 +487,4 @@ function _fbss_comments_can_edit($commen
  * @param $account
- *   The $user object of the user whose access will be checked.
+ *   The $user object of the user whose access will be checked. Defaults to the
+ *   current user.
  * @return
@@ -516,11 +492,25 @@ function _fbss_comments_can_edit($commen
  */
-function _fbss_comments_can_delete($comment, $account = NULL) {
+function fbss_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('fbss_comments_can_delete', $allow, $comment, $account);
   // This is in two separate statements (instead of one big return statement)
   // so that the SQL in _fbss_comments_get_thread_author() does not usually need to be run.
-  if (user_access('delete all status comments', $account) || (user_access('delete own status comments', $account) && $account->uid == $comment->uid)) {
+  if ($allow && (user_access('delete all status comments', $account) ||
+    (user_access('delete own status comments', $account) && $account->uid == $comment->uid)
+  )) {
     return TRUE;
   }
-  return user_access('delete comments on own statuses', $account) && $account->uid == _fbss_comments_get_thread_author($comment->sid);
+  return $allow && user_access('delete comments on own statuses', $account)
+    && $account->uid == _fbss_comments_get_thread_author($comment->sid);
 }
 
+//===================
+// HELPER FUNCTIONS.
+//===================
+
 /**
@@ -534,43 +524,3 @@ function _fbss_comments_can_delete($comm
 function _fbss_comments_get_thread_author($sid) {
-  return db_result(db_query("SELECT sender FROM {facebook_status} WHERE sid = %d", $sid));
-}
-
-/**
- * Adds the Autogrow jQuery extension.
- */
-function _fbss_comments_use_autogrow() {
-  module_load_include('inc', 'facebook_status', 'includes/utility/facebook_status.form');
-  _facebook_status_use_autogrow();
-}
-
-/**
- * Renders a user's profile picture.
- *
- * @see template_preprocess_user_picture()
- */
-function _fbss_comments_user_picture($account) {
-  if (!module_exists('imagecache_profiles')) {
-    return theme('user_picture', $account);
-  }
-  $output = '';
-  if (variable_get('user_pictures', 0)) {
-    if (!empty($account->picture) && file_exists($account->picture)) {
-      $picture = $account->picture;
-    }
-    else if (variable_get('user_picture_default', '')) {
-      $picture = variable_get('user_picture_default', '');
-    }
-    if (isset($picture)) {
-      $alt = t("@user's picture", array('@user' => $account->name ? $account->name : variable_get('anonymous', t('Anonymous'))));
-      $output = theme('imagecache', variable_get('fbss_comments_user_pictures', 0), $picture, $alt, $alt, NULL, FALSE);
-      if (!empty($account->uid) && user_access('access user profiles')) {
-        $attributes = array(
-          'attributes' => array('title' => t('View user profile.')),
-          'html' => TRUE,
-        );
-        $output = l($output, "user/$account->uid", $attributes);
-      }
-    }
-  }
-  return $output;
+  return db_query("SELECT sender FROM {facebook_status} WHERE sid = :sid", array(':sid' => $sid))->fetchField();
 }
@@ -582,15 +532,2 @@ function _fbss_comments_user_picture($ac
 /**
- * Implementation of hook_forms().
- */
-function fbss_comments_forms($form_id, $args) {
-  if (strpos($form_id, 'fbss_comments_box') === 0) {
-    return array(
-      $form_id => array(
-        'callback' => 'fbss_comments_box',
-      ),
-    );
-  }
-}
-
-/**
  * The status comment form.
@@ -607,15 +544,5 @@ function fbss_comments_forms($form_id, $
  */
-function fbss_comments_box(&$form_state, $sid, $delay_load = TRUE, $hide_submit = TRUE) {
+function fbss_comments_box($form, $form_state, $sid, $delay_load = TRUE) {
   $path = drupal_get_path('module', 'fbss_comments');
   drupal_add_css($path .'/fbss_comments.css');
-  drupal_add_js($path .'/fbss_comments.js');
-  // Defer execution so that it runs after ajax_view.js
-  drupal_add_js($path .'/fbss_comments_views_ahah.js', 'module', 'header', TRUE);
-  if (variable_get('fbss_comments_enter', 0)) {
-    drupal_add_js($path .'/fbss_comments_enter.js');
-  }
-  drupal_add_js(array('fbss_comments' => array(
-    'ahah_enabled' => (bool) variable_get('fbss_comments_ahah', 1)
-  )), 'setting');
-  _fbss_comments_use_autogrow();
   $form = array();
@@ -627,13 +554,14 @@ function fbss_comments_box(&$form_state,
   }
-  if (isset($_GET['view_path'])) {
-    $form['#qu'] = $_GET['view_path'];
-    //$form['#action'] = url($_GET['view_path']);
-  }
-  $comments = fbss_comments_get_comments($sid, TRUE);
-  $form['before'] = array('#value' => '<div id="fbss-comments-replace-'. $sid .'">');
-  $form['comments'] = array('#value' => theme('fbss_comments_items', $comments, $delay_load, $form['#qu']));
-  if (count($comments) && $hide_submit) {
-    $form['start-hide'] = array('#value' => '<div class="fbss-comments-show-comment-form-inner" id="fbss-comments-inner-toggle-'. $sid .'">'.
+  $comments = fbss_comments_get_comments($sid);
+  $form['before'] = array(
+    '#type' => 'markup',
+    '#markup' => '<div id="fbss-comments-replace-' . $sid . '">'
+  );
+  $form['comments'] = array('#markup' => theme('fbss_comments_items', array('comments' => $comments, 'delay_load' => $delay_load, 'destination' => $form['#qu'])));
+  if (count($comments)) {
+    $form['start-hide'] = array(
+      '#type' => 'markup',
+      '#markup' => '<div class="fbss-comments-show-comment-form-inner" id="fbss-comments-inner-toggle-' . $sid . '">' .
       l(t('Comment'), 'statuses/'. $sid, array('attributes' => array('class' => 'fbss-comments-show-comment-inner-form-link')))
-      .'</div><div class="fbss-comments-hide fbss-comments-replace-'. $sid .'-inner">');
+      . '</div><div class="fbss-comments-hide fbss-comments-replace-inner-' . $sid . '">');
   }
@@ -642,20 +570,13 @@ function fbss_comments_box(&$form_state,
     '#rows' => 1,
-    '#attributes' => array('class' => 'fbss-comments-textarea'),
-    '#resizable' => FALSE,
+    '#required' => TRUE,
   );
-  if (count($comments) && $hide_submit) {
-    $form['end-hide'] = array('#value' => '</div>');
-  }
-  $form['after'] = array('#value' => '</div>');
-  $form['save-'. $sid] = array(
+  $form['sid'] = array(
+    '#type' => 'hidden',
+    '#value' => $sid,
+  );
+  $form['save'] = array(
     '#type' => 'submit',
     '#value' => t('Comment'),
-    '#attributes' => array('class' => 'fbss-comments-submit'),
-    '#prefix' => '<div class="'. ($hide_submit ? 'fbss-comments-hide' : '') .' fbss-comments-replace-'. $sid .'-inner">',
-    '#suffix' => '</div>',
-    '#submit' => array('fbss_comments_box_submit'),
-  );
-  if (variable_get('fbss_comments_ahah', 1)) {
-    $form['save-'. $sid]['#ahah'] = array(
-      'path' => 'fbss_comments/js/refresh',
+    '#ajax' => array(
+      'callback' => 'fbss_comments_save_js',
       'wrapper' => 'fbss-comments-replace-'. $sid,
@@ -663,9 +584,8 @@ function fbss_comments_box(&$form_state,
       'method' => 'replace',
+    ),
     );
+  if (count($comments)) {
+    $form['end-hide'] = array('#markup' => '</div>');
   }
-  $form['#sid'] = $sid;
-  if ($form_state['fbss_comments']['sid']) {
-    $form['#sid'] = $form_state['fbss_comments']['sid'];
-  }
-  $form['#attributes'] = array('class' => 'fbss-comments-comment-form');
+  $form['after'] = array('#markup' => '</div>');
   return $form;
@@ -677,11 +597,2 @@ function fbss_comments_box(&$form_state,
 function fbss_comments_box_submit($form, &$form_state) {
-  $form_state['fbss_comments']['q'] = $form['#qu'];
-  $form_state['fbss_comments']['sid'] = $form['#sid'];
-  // Don't save empty comments, but fail silently instead of using the default "required" handling.
-  if (!empty($form_state['values']['status-comment'])) {
-    fbss_comments_save_comment($form['#sid'], $form_state['values']['status-comment']);
-  }
-  if (variable_get('fbss_comments_ahah', 1)) {
-    $form_state['rebuild'] = TRUE;
-  }
 }
@@ -689,28 +600,9 @@ function fbss_comments_box_submit($form,
 /**
- * Saves status comments via AHAH.
- */
-function fbss_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));
+ * Saves status comments via AJAX.
+ */
+function fbss_comments_save_js($form, &$form_state) {
+  fbss_comments_save_comment($form_state['values']['sid'], $form_state['values']['status-comment']);
+	$comm = array();
+  $comm['comments'] = fbss_comments_get_comments($form_state['values']['sid']);
+  return theme('fbss_comments_items', $comm);
 }
@@ -722,17 +614,8 @@ function fbss_comments_save_js() {
 /**
- * Implementation of hook_facebook_status_delete().
+ * Implements hook_facebook_status_delete().
  */
-function fbss_comments_facebook_status_delete($status) {
-  db_query("DELETE FROM {fbss_comments} WHERE sid = %d", $status->sid);
-
-  if (module_exists('activity')) {
-    $result = db_query("SELECT aid FROM {activity} WHERE type = 'fbss_comments' AND eid IN (SELECT sid FROM {fbss_comments} WHERE cid = %d)", $status->sid);
-    $records = array();
-    while ($record = db_fetch_object($result)) {
-      $records[] = $record->aid;
-    }
-    if (!empty($records)) {
-      activity_delete($records);
-    }
-  }
+function fbss_comments_facebook_status_delete($sid) {
+  db_delete('fbss_comments')
+	  ->condition('sid', $sid)
+	  ->execute();
 }
@@ -740,38 +623,6 @@ function fbss_comments_facebook_status_d
 /**
- * Implementation of hook_preprocess_facebook_status_item().
+ * Implements hook_preprocess_facebook_status_item().
  */
 function fbss_comments_preprocess_facebook_status_item(&$vars) {
-  if ($vars['options']['extras']) {
-    $vars['comments'] = theme('fbss_comments_form_display', $vars['status']->sid, FALSE, FALSE);
-  }
-}
-
-/**
- * Implementation of hook_form_FORM_ID_alter().
- */
-function fbss_comments_form_facebook_status_box_alter(&$form) {
-  // Add the comments JS when the status form is displayed so that all the necessary resources are loaded when the first status is submitted on a page.
-  $path = drupal_get_path('module', 'fbss_comments');
-  drupal_add_css($path .'/fbss_comments.css');
-  drupal_add_js($path .'/fbss_comments.js');
-  // Defer execution so that it runs after ajax_view.js
-  drupal_add_js($path .'/fbss_comments_views_ahah.js', 'module', 'header', TRUE);
-  if (variable_get('fbss_comments_enter', 0)) {
-    drupal_add_js($path .'/fbss_comments_enter.js');
-  }
-  /*
-  // Don't add settings twice (it merges recursively, so we'll end up with an array, which messes things up).
-  drupal_add_js(array('fbss_comments' => array(
-    'ahah_enabled' => (bool) variable_get('fbss_comments_ahah', 1)
-  )), 'setting');
-   */
-  _fbss_comments_use_autogrow();
-}
-
-/**
- * The JS callback for the Modalframe submit callback.
- */
-function fbss_comments_modalframe_refresh($sid) {
-  drupal_set_header('Content-Type: text/html; charset: utf-8');
-  echo theme('fbss_comments_items', fbss_comments_get_comments($sid, TRUE));
+  $vars['comments'] = theme('fbss_comments_form_display', array('sid' => $vars['status']->sid, 'delay_load_form' => FALSE, 'delay_load_comments' => FALSE));
 }
@@ -779,24 +630,6 @@ function fbss_comments_modalframe_refres
 /**
- * Implementation of hook_views_bulk_operations_object_info().
- */
-function fbss_comments_views_bulk_operations_object_info() {
-  return array(
-    'fbss_comments' => array(
-      'type' => 'fbss_comment',
-      'base_table' => 'fbss_comments',
-      'load' => 'fbss_comments_load',
-      'title' => 'comment',
-    ),
-  );
-}
-
-//====================
-// VIEWS INTEGRATION.
-//====================
-
-/**
- * Implementation of hook_views_api().
+ * Implements hook_views_api().
  */
 function fbss_comments_views_api() {
-  return array('api' => 2);
+  return array('api' => 3);
 }
@@ -804,3 +637,3 @@ function fbss_comments_views_api() {
 /**
- * Implementation of hook_views_default_views_alter().
+ * Implements hook_views_default_views_alter().
  */
@@ -858,210 +691 @@ function fbss_comments_views_default_vie
 }
-
-//======================
-// TRIGGER INTEGRATION.
-//======================
-
-/**
- * Implementation of hook_hook_info().
- */
-function fbss_comments_hook_info() {
-  return array(
-    'fbss_comments' => array(
-      'fbss_comments' => array(
-        'fbss_comments_deleted' => array(
-          'runs when' => t('A status comment has been deleted'),
-        ),
-        'fbss_comments_edited' => array(
-          'runs when' => t('A user has edited a status comment'),
-        ),
-        'fbss_comments_saved' => array(
-          'runs when' => t('A user has saved a new status comment'),
-        ),
-      ),
-    ),
-  );
-}
-
-/**
- * Implementation of hook_facebook_status().
- * or
- * Implementation of hook_trigger_name().
- */
-function fbss_comments_fbss_comments($op, $comment, $account = NULL) {
-  if (strpos($op, 'fbss_comments_') !== 0) {
-    return;
-  }
-  $aids = _trigger_get_hook_aids('fbss_comments', $op);
-  $account = empty($account) ? $GLOBALS['user'] : $account;
-  $context = array(
-    'hook' => 'fbss_comments',
-    'op' => $op,
-    'fbss_comment' => $comment,
-    'account' => $account,
-  );
-  actions_do(array_keys($aids), $account, $context);
-}
-
-//====================
-// TOKEN INTEGRATION.
-//====================
-
-/**
- * Implementation of hook_token_list().
- */
-function fbss_comments_token_list($type = 'all') {
-  if ($type == 'fbss_comment') {
-    $tokens['fbss_comment'] = array(
-      'commenter-themed' => t('The themed name of the user who posted the status message.'),
-      'commenter-name' => t('The safe name of the user who posted the status message.'),
-      'commenter-name-raw' => t('The raw name of the user who posted the status message. WARNING: raw user input.'),
-      'commenter-uid' => t('The User ID of the user who posted the status message.'),
-      'message-unformatted' => t('The comment text, with HTML escaped but no filters run over it.'),
-      'message-formatted' => t('The formatted comment text.'),
-      'message-raw' => t('The completely unfiltered comment text. WARNING: raw user input.'),
-      'comment-themed' => t('The new status completely themed, including usernames and times.'),
-      'comment-id' => t('The Comment ID.'),
-      'comment-status-id' => t('The Status ID.'),
-      'comment-status-url' => t('The URL of the related status message.'),
-      'comment-edit' => t('Edit comment link.'),
-      'comment-delete' => t('Delete comment link.'),
-      'comment-created' => t('The themed time the comment was submitted.'),
-    );
-    $tokens['fbss_comment'] += token_get_date_token_info(t('The comment created'), 'comment-created-');
-    return $tokens;
-  }
-}
-
-/**
- * Implementation of hook_token_values().
- */
-function fbss_comments_token_values($type, $data = NULL, $options = array()) {
-  if ($type != 'fbss_comment' || empty($data)) {
-    return;
-  }
-  $comment = $data;
-  $account = _facebook_status_user_load($comment->uid);
-  $edit = '';
-  $delete = '';
-  if (fbss_comments_can('edit', $comment)) {
-    $edit = '<span class="fbss-comments-edit-delete">'.
-      l(t('Edit'), 'statuses/comment/'. $comment->cid .'/edit', array('query' => array('destination' => $_GET['q'])))
-      .'</span>';
-  }
-  if (fbss_comments_can('delete', $comment)) {
-    $delete = '<span class="fbss-comments-edit-delete">'.
-      l(t('Delete'), 'statuses/comment/'. $comment->cid .'/delete', array('query' => array('destination' => $_GET['q'])))
-      .'</span>';
-  }
-  $values = array(
-    'commenter-themed' => theme('username', $account),
-    'commenter-name' => check_plain($account->name),
-    'commenter-name-raw' => $account->name,
-    'commenter-uid' => $account->uid,
-    'message-unformatted' => check_plain($comment->comment),
-    'message-formatted' => nl2br(_facebook_status_run_filter($comment->comment)),
-    'message-raw' => $comment->comment,
-    'comment-themed' => theme('fbss_comments_item', $comment, array(), $_GET['q']),
-    'comment-id' => $comment->cid,
-    'comment-status-id' => $comment->sid,
-    'comment-status-url' => url('statuses/'. $comment->sid, array('absolute' => TRUE)),
-    'comment-edit' => $edit,
-    'comment-delete' => $delete,
-    'comment-created' => format_date($comment->created, 'small'),
-  );
-  $values += token_get_date_token_values($comment->created, 'created-');
-  return $values;
-}
-
-//=======================
-// ACTIVITY INTEGRATION.
-//=======================
-
-/**
- * Implementation of hook_fbss_comments_delete().
- */
-function fbss_comments_fbss_comments_delete($cid) {
-  if (module_exists('activity')) {
-    $result = db_query("SELECT aid FROM {activity} WHERE type = 'fbss_comments' AND op <> 'fbss_comments_deleted' AND eid = %d", $cid);
-    $records = array();
-    while ($record = db_fetch_object($result)) {
-      $records[] = $record->aid;
-    }
-    if (!empty($records)) {
-      activity_delete($records);
-    }
-  }
-}
-
-/**
- * Implementation of hook_activity_info().
- */
-function fbss_comments_activity_info() {
-  $info = new stdClass();
-  $info->api = 2;
-  $info->name = 'fbss_comments';
-  $info->object_type = 'fbss_comment';
-  $info->eid_field = 'cid';
-  $info->objects = array('Comment author' => 'fbss_comment');
-  $info->hooks = array('fbss_comments' => array('fbss_comments_deleted', 'fbss_comments_edited', 'fbss_comments_saved'));
-  $info->realms = array('fbss_comments_author' => 'Comment author');
-  return $info;
-}
-
-/**
- * Implementation of hook_activity_grants().
- */
-function fbss_comments_activity_grants($activity) {
-  $realms = array();
-  if ($activity->type == 'fbss_comments') {
-    $realms['fbss_comments_author'] = array($activity->uid);
-  }
-  return $realms;
-}
-
-/**
- * Implementation of hook_activity_access_grants().
- */
-function fbss_comments_activity_access_grants($account) {
-  return array(
-    'facebook_status_sender' => array($account->uid),
-  );
-}
-
-/**
- * Implementation of hook_list_activity_actions().
- */
-function fbss_comments_list_activity_actions($hook, $op, $max_age) {
-  $actions = array();
-  if (!empty($max_age)) {
-    $min_time = time() - $max_age;
-  }
-  else {
-    $min_time = 0;
-  }
-
-  $result = db_query("SELECT cid as id, created, uid as actor FROM {fbss_comments} WHERE created > %d", $min_time);
-  while ($row = db_fetch_array($result)) {
-    $actions[] = $row;
-  }
-
-  return $actions;
-}
-
-/**
- * Implementation of hook_load_activity_context().
- */
-function fbss_comments_load_activity_context($hook, $op, $id) {
-  $comment = fbss_comments_load($id);
-  $activity_context = array();
-
-  if (!empty($comment)) {
-    $activity_context = array(
-      'hook' => 'fbss_comments',
-      'op' => $op,
-      'comment' => $comment,
-    );
-  }
-
-  return $activity_context;
-}
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/fbss_comments/fbss_comments.pages.inc screamwork_fbss7/submodules/fbss_comments/fbss_comments.pages.inc
--- facebook_status_6_3/submodules/fbss_comments/fbss_comments.pages.inc	2011-06-06 18:19:54.209414300 -0400
+++ screamwork_fbss7/submodules/fbss_comments/fbss_comments.pages.inc	1969-12-31 19:00:00.000000000 -0500
@@ -1,188 +0,0 @@
-<?php
-
-/**
- * @file
- *   Form/page callbacks for the Facebook-style Statuses Comments module.
- */
-
-/**
- * The administrative settings form.
- */
-function fbss_comments_admin() {
-  $form = array();
-  $form['fbss_comments_hide_small'] = array(
-    '#type' => 'textfield',
-    '#title' => t('Minimum number of comments at which some will be hidden'),
-    '#description' => t('When there are at least this many comments on a status, some will be hidden behind a "Show all comments" link.'),
-    '#default_value' => variable_get('fbss_comments_hide_small', 3),
-    '#size' => 4,
-    '#maxlength' => 4,
-  );
-  $form['fbss_comments_show_all'] = array(
-    '#type' => 'textfield',
-    '#title' => t('Minimum number of comments at which the "Show all comments" link will redirect the user to the individual status page'),
-    '#description' => t('When there are at least this many comments on a status, the user will be directed to the status page if they try to view them all.'),
-    '#default_value' => variable_get('fbss_comments_show_all', 10),
-    '#size' => 4,
-    '#maxlength' => 4,
-  );
-  if (module_exists('imagecache_profiles')) {
-    $presets = imagecache_presets();
-    $opt = array(0 => t('No user pictures'));
-    foreach ($presets as $preset) {
-      $opt[$preset['presetname']] = check_plain($preset['presetname']);
-    }
-    $form['fbss_comments_user_pictures'] = array(
-      '#title' => t('Imagecache preset for user pictures in comments'),
-      '#type'  => 'select',
-      '#options' => $opt,
-      '#default_value' => variable_get('fbss_comments_user_pictures', 0),
-    );
-  }
-  else {
-    $form['fbss_comments_user_pictures'] = array(
-      '#type' => 'checkbox',
-      '#title' => t('Show user pictures on comments'),
-      '#default_value' => variable_get('fbss_comments_user_pictures', 0),
-    );
-  }
-  $form['fbss_comments_enter'] = array(
-    '#type' => 'checkbox',
-    '#title' => t('Submit the comment form when pressing Enter'),
-    '#description' => t('If enabled, the comment form will be submitted when the user presses Enter.') .' '.
-      t('Users can still create line breaks by pressing Shift+Enter.'),
-    '#default_value' => variable_get('fbss_comments_enter', 0),
-  );
-  $form['fbss_comments_ahah'] = array(
-    '#type' => 'checkbox',
-    '#title' => t('Use AHAH to refresh status comment forms without refreshing the page'),
-    '#description' => '<strong>'. t('Disable this if comments are being loaded onto the page via AJAX by a module other than FBSS or Views.') .'</strong>',
-    '#default_value' => variable_get('fbss_comments_ahah', 1),
-  );
-  return system_settings_form($form);
-}
-
-/**
- * Validate the administrative settings form.
- */
-function fbss_comments_admin_validate($form, $form_state) {
-  $v = $form_state['values'];
-  if (!is_numeric($v['fbss_comments_hide_small']) || $v['fbss_comments_hide_small'] < 1) {
-    form_set_error('fbss_comments_hide_small', t('The minimum number of comments at which some will be hidden must be a positive integer.'));
-  }
-  if (!is_numeric($v['fbss_comments_show_all']) || $v['fbss_comments_show_all'] < 1) {
-    form_set_error('fbss_comments_show_all', t('The minimum number of comments at which the "Show all comments" link will redirect the user to the individual status page must be a positive integer.'));
-  }
-  if ($v['fbss_comments_show_all'] < $v['fbss_comments_hide_small']) {
-    form_set_error('fbss_comments_show_all', t('The minimum number of comments at which the "Show all comments" link will redirect the user to the individual status page must be less than the minimum number of comments at which some will be hidden.'));
-  }
-}
-
-/**
- * The edit form for status comments.
- *
- * @param $comment
- *   The comment object for the status comment being edited.
- */
-function fbss_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;
-  if (module_exists('modalframe')) {
-    modalframe_child_js();
-  }
-  return $form;
-}
-
-/**
- * The submit handler for the edit form for status comments.
- */
-function fbss_comments_edit_submit($form, &$form_state) {
-  db_query("UPDATE {fbss_comments} SET comment = '%s' WHERE cid = %d", $form_state['values']['status-comment-edit'], $form['#cid']);
-  $c = fbss_comments_load($form['#cid']);
-  module_invoke_all('fbss_comments_after_save', $c, TRUE);
-  if (module_exists('trigger')) {
-    module_invoke_all('fbss_comments', 'fbss_comments_edited', $c);
-  }
-  if ($_GET['destination'] && $_GET['destinaton'] != 'fbss_comments/js/refresh') {
-    $form_state['redirect'] = $_GET['destination'];
-  }
-  else {
-    $form_state['redirect'] = '<front>';
-  }
-  drupal_set_message(t('Status comment has been successfully edited.'));
-  if (module_exists('modalframe')) {
-    modalframe_close_dialog();
-  }
-}
-
-/**
- * The delete form for status comments.
- *
- * @param $comment
- *   The comment object for the status comment being deleted.
- */
-function fbss_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('fbss_comments_delete_confirm'),
-  );
-  $form['back'] = array(
-    '#type' => 'submit',
-    '#value' => t('Cancel'),
-    '#submit' => array('fbss_comments_delete_cancel'),
-  );
-  $form['#cid'] = $comment->cid;
-  if (module_exists('modalframe')) {
-    modalframe_child_js();
-  }
-  return $form;
-}
-
-/**
- * The confirmation submit handler for the delete form for status comments.
- */
-function fbss_comments_delete_confirm($form, &$form_state) {
-  fbss_comments_delete_comment($form['#cid']);
-  drupal_set_message(t('Status comment deleted.'));
-  if ($_GET['destination'] && $_GET['destinaton'] != 'fbss_comments/js/refresh') {
-    $form_state['redirect'] = $_GET['destination'];
-  }
-  else {
-    $form_state['redirect'] = '<front>';
-  }
-  if (module_exists('modalframe')) {
-    modalframe_close_dialog();
-  }
-}
-
-/**
- * The cancellation submit handler for the delete form for status comments.
- */
-function fbss_comments_delete_cancel($form, &$form_state) {
-  drupal_set_message(t('Status comment was not deleted.'));
-  if ($_GET['destination'] && $_GET['destinaton'] != 'fbss_comments/js/refresh') {
-    $form_state['redirect'] = $_GET['destination'];
-  }
-  else {
-    $form_state['redirect'] = '<front>';
-  }
-  if (module_exists('modalframe')) {
-    modalframe_close_dialog();
-  }
-}
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/fbss_comments/fbss_comments.views.inc screamwork_fbss7/submodules/fbss_comments/fbss_comments.views.inc
--- facebook_status_6_3/submodules/fbss_comments/fbss_comments.views.inc	2011-06-05 03:09:58.742988300 -0400
+++ screamwork_fbss7/submodules/fbss_comments/fbss_comments.views.inc	2011-05-25 20:53:28.000000000 -0400
@@ -8,3 +8,3 @@
 /**
- * Implementation of hook_views_data().
+ * Implements hook_views_data().
  */
@@ -64,20 +64,2 @@ function fbss_comments_views_data() {
   );
-  $data['fbss_comments']['edit'] = array(
-    'title' => t('Edit'),
-    'help' => t('Shows a link to edit the status comment to users with permission to see it.'),
-    'field' => array(
-      'field' => 'cid',
-      'handler' => 'fbss_comments_views_handler_field_edit',
-      'click sortable' => FALSE,
-    ),
-  );
-  $data['fbss_comments']['delete'] = array(
-    'title' => t('Delete'),
-    'help' => t('Shows a link to delete the status comment to users with permission to see it.'),
-    'field' => array(
-      'field' => 'cid',
-      'handler' => 'fbss_comments_views_handler_field_delete',
-      'click sortable' => FALSE,
-    ),
-  );
 
@@ -176,3 +158,3 @@ function fbss_comments_views_data() {
 /**
- * Implementation of hook_views_data_alter().
+ * Implements hook_views_data_alter().
  */
@@ -210,3 +192,3 @@ function fbss_comments_views_data_alter(
 /**
- * Implementation of hook_views_handlers().
+ * Implements hook_views_handlers().
  */
@@ -227,8 +209,2 @@ function fbss_comments_views_handlers()
       ),
-      'fbss_comments_views_handler_field_delete' => array(
-        'parent' => 'views_handler_field',
-      ),
-      'fbss_comments_views_handler_field_edit' => array(
-        'parent' => 'views_handler_field',
-      ),
     ),
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/fbss_comments/fbss_comments_enter.js screamwork_fbss7/submodules/fbss_comments/fbss_comments_enter.js
--- facebook_status_6_3/submodules/fbss_comments/fbss_comments_enter.js	2011-06-05 01:51:01.787049900 -0400
+++ screamwork_fbss7/submodules/fbss_comments/fbss_comments_enter.js	1969-12-31 19:00:00.000000000 -0500
@@ -1,27 +0,0 @@
-Drupal.behaviors.fbss_comments_enter = function(context) {
-  var ctxt = $(context);
-  var shift = false;
-  ctxt.find('.fbss-comments-textarea').keydown(function(e) {
-    if (e.which == 16) {
-      shift = true;
-    }
-  });
-  ctxt.find('.fbss-comments-textarea').keyup(function(e) {
-    if (e.which == 16) {
-      shift = false;
-    }
-  });
-  ctxt.find('.fbss-comments-textarea').keypress(function(e) {
-    // Submit the form (via AHAH if possible) when the user hits Enter (but not Shift+Enter).
-    if (e.which == 13 && !shift && $(this).val().length) {
-      var $form = $(this).parents('form');
-      var $element = $form.find('.fbss-comments-submit');
-      if (Drupal.settings.ahah && Drupal.settings.ahah[$element[0].id]) {
-        $element.trigger(Drupal.settings.ahah[$element[0].id].event);
-      }
-      else {
-        $form.submit();
-      }
-    }
-  });
-}
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/fbss_comments/fbss_comments_flag/fbss_comments_flag.flag.inc screamwork_fbss7/submodules/fbss_comments/fbss_comments_flag/fbss_comments_flag.flag.inc
--- facebook_status_6_3/submodules/fbss_comments/fbss_comments_flag/fbss_comments_flag.flag.inc	2011-05-26 13:41:40.632999400 -0400
+++ screamwork_fbss7/submodules/fbss_comments/fbss_comments_flag/fbss_comments_flag.flag.inc	1969-12-31 19:00:00.000000000 -0500
@@ -1,81 +0,0 @@
-<?php
-
-/**
- @file
- *   Extends the Flag module for Facebook-style Statuses Comments.
- */
-
-/**
- * Make sure the flag_flag class is loaded before we extend it.
- * It won't be loaded yet if the Flag module hasn't loaded yet, because Flag
- * doesn't provide the kind of fancy autoloading that Views does.
- */
-if (!class_exists('flag_flag')) {
-  module_load_include('inc', 'flag');
-}
-
-/**
- * Adds a new flag type.
- */
-class fbss_comments_flag extends flag_flag {
-  function _load_content($content_id) {
-    return is_numeric($content_id) ? fbss_comments_load($content_id) : NULL;
-  }
-  function applies_to_content_object($comment) {
-    return !empty($comment) && !empty($comment->comment);
-  }
-  function get_content_id($comment) {
-    return $comment->cid;
-  }
-  function get_labels_token_types() {
-    return array('fbss_comment');
-  }
-  function get_views_info() {
-    return array(
-      'views table' => 'fbss_comments',
-      'join field' => 'cid',
-      'title field' => 'comment',
-      'title' => t('Facebook-style Statuses Comments'),
-      'help' => t('Display information about the flag set on a status comment.'),
-      'counter title' => t('Facebook-style Statuses Comments flag counter'),
-      'counter help' => t('Include this to gain access to the flag counter field.'),
-    );
-  }
-  function applies_to_content_id_array($content_ids) {
-    $passed = array();
-    foreach ($content_ids as $content_id) {
-      $passed[$content_id] = TRUE;
-    }
-    return $passed;
-  }
-  function get_relevant_action_objects($content_id) {
-    return array(
-      'fbss_comment' => $this->fetch_content($content_id),
-    );
-  }
-  function replace_tokens($label, $contexts, $content_id) {
-    if ($content_id && ($comment = $this->fetch_content($content_id))) {
-      $contexts['fbss_comment'] = $comment;
-    }
-    return parent::replace_tokens($label, $contexts, $content_id);
-  }
-  function get_flag_action($content_id) {
-    $flag_action = parent::get_flag_action($content_id);
-    $comment = $this->fetch_content($content_id);
-    $flag_action->content_title = $comment->comment;
-    $flag_action->content_url = 'statuses/'. $comment->sid;
-    return $flag_action;
-  }
-  function rules_get_event_arguments_definition() {
-    return array(
-      'account' => array(
-        'type' => 'fbss_comment',
-        'label' => t('Flagged status comment'),
-        'handler' => 'flag_rules_get_event_argument',
-      ),
-    );
-  }
-  function rules_get_element_argument_definition() {
-    return array('type' => 'fbss_comment', 'label' => t('Flagged status comment'));
-  }
-}
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/fbss_comments/fbss_comments_flag/fbss_comments_flag.info screamwork_fbss7/submodules/fbss_comments/fbss_comments_flag/fbss_comments_flag.info
--- facebook_status_6_3/submodules/fbss_comments/fbss_comments_flag/fbss_comments_flag.info	2011-05-26 13:06:16.408500700 -0400
+++ screamwork_fbss7/submodules/fbss_comments/fbss_comments_flag/fbss_comments_flag.info	1969-12-31 19:00:00.000000000 -0500
@@ -1,6 +0,0 @@
-name = Facebook-style Statuses Comments Flag Integration
-description = "Integrates Flag with Facebook-style Statuses Comments."
-package = Facebook-style Statuses
-dependencies[] = fbss_comments
-dependencies[] = flag
-core = 6.x
\ No newline at end of file
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/fbss_comments/fbss_comments_flag/fbss_comments_flag.install screamwork_fbss7/submodules/fbss_comments/fbss_comments_flag/fbss_comments_flag.install
--- facebook_status_6_3/submodules/fbss_comments/fbss_comments_flag/fbss_comments_flag.install	2011-05-26 13:39:23.864176700 -0400
+++ screamwork_fbss7/submodules/fbss_comments/fbss_comments_flag/fbss_comments_flag.install	1969-12-31 19:00:00.000000000 -0500
@@ -1,16 +0,0 @@
-<?php
-
-/**
- * @file
- *   (Un)installs the Facebook-style Statuses Flag module.
- */
-
-/**
- * Implementation of hook_install().
- */
-function fbss_comments_flag_install() {
-  // Lower weight so that the Flag module's classes are available to us.
-  // We take precautions in fbss_flag.inc to make sure this isn't strictly
-  // necessary, but it (probably) doesn't hurt.
-  db_query("UPDATE {system} SET weight = 2 WHERE name = 'fbss_comments_flag'");
-}
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/fbss_comments/fbss_comments_flag/fbss_comments_flag.module screamwork_fbss7/submodules/fbss_comments/fbss_comments_flag/fbss_comments_flag.module
--- facebook_status_6_3/submodules/fbss_comments/fbss_comments_flag/fbss_comments_flag.module	2011-06-03 10:20:37.628596300 -0400
+++ screamwork_fbss7/submodules/fbss_comments/fbss_comments_flag/fbss_comments_flag.module	1969-12-31 19:00:00.000000000 -0500
@@ -1,65 +0,0 @@
-<?php
-
-/**
- * @file
- *   Integrates Flag with Facebook-style Statuses Comments.
- */
-
-/**
- * Implementation of hook_facebook_status_delete().
- */
-function fbss_comments_flag_facebook_status_delete($status) {
-  db_query("DELETE FROM {flag_content} WHERE content_type = 'fbss_comment' AND content_id IN (SELECT cid FROM {fbss_comments} WHERE sid = %d)", $status->sid);
-  db_query("DELETE FROM {flag_counts} WHERE content_type = 'fbss_comment' AND content_id IN (SELECT cid FROM {fbss_comments} WHERE sid = %d)", $status->sid);
-}
-
-/**
- * Implementation of hook_fbss_comments_delete().
- */
-function fbss_comments_flag_fbss_comments_delete($cid) {
-  db_query("DELETE FROM {flag_content} WHERE content_type = 'fbss_comment' AND content_id = %s", $cid);
-  db_query("DELETE FROM {flag_counts} WHERE content_type = 'fbss_comment' AND content_id = %s", $cid);
-}
-
-/**
- * Implementation of hook_flag_definitions().
- */
-function fbss_comments_flag_flag_definitions() {
-  return array(
-    'fbss_comment' => array(
-      'title' => 'Facebook-style Statuses Comment',
-      'description' => t('Comments on status updates.'),
-      'handler' => 'fbss_comments_flag',
-    ),
-  );
-}
-
-/**
- * Implementation of hook_flag_default_flags().
- */
-function fbss_comments_flag_flag_default_flags() {
-  $flags = array();
-  $flags[] = array(
-    'content_type' => 'fbss_comment',
-    'name' => 'like_comments',
-    'title' => t('Like'),
-    'roles' => array('2'),
-    'global' => FALSE,
-    'types' => array('page'),
-    'flag_short' => t('Like'),
-    'flag_long' => '',
-    'flag_message' => '',
-    'unflag_short' => t('Un-like'),
-    'unflag_long' => '',
-    'unflag_message' => '',
-    'show_on_page' => FALSE,
-    'show_on_teaser' => FALSE,
-    'show_on_form' => FALSE,
-    'status' => TRUE,
-    'locked' => array('name', 'global', 'types', 'show_on_page', 'show_on_teaser', 'show_on_form', 'status'),
-  );
-  return $flags;
-}
-
-//This is here because the Flag module does not support magic include files.
-module_load_include('inc', 'fbss_comments_flag', 'fbss_comments_flag.flag');
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/fbss_comments/fbss_comments_rules/fbss_comments_rules.info screamwork_fbss7/submodules/fbss_comments/fbss_comments_rules/fbss_comments_rules.info
--- facebook_status_6_3/submodules/fbss_comments/fbss_comments_rules/fbss_comments_rules.info	2011-05-26 12:20:15.362013400 -0400
+++ screamwork_fbss7/submodules/fbss_comments/fbss_comments_rules/fbss_comments_rules.info	1969-12-31 19:00:00.000000000 -0500
@@ -1,6 +0,0 @@
-name = Facebook-style Statuses Comments Rules Integration
-description = "Integrates Rules with Facebook-style Statuses Comments."
-dependencies[] = fbss_comments
-dependencies[] = rules
-package = Facebook-style Statuses
-core = 6.x
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/fbss_comments/fbss_comments_rules/fbss_comments_rules.module screamwork_fbss7/submodules/fbss_comments/fbss_comments_rules/fbss_comments_rules.module
--- facebook_status_6_3/submodules/fbss_comments/fbss_comments_rules/fbss_comments_rules.module	2011-05-26 11:28:16.841644300 -0400
+++ screamwork_fbss7/submodules/fbss_comments/fbss_comments_rules/fbss_comments_rules.module	1969-12-31 19:00:00.000000000 -0500
@@ -1,26 +0,0 @@
-<?php
-
-/**
- * @file
- *   Integrates Rules with Facebook-style Statuses Comments.
- */
-
-/*
- * Implementation of hook_fbss_comments_after_save().
- */
-function fbss_comments_rules_fbss_comments_after_save($comment, $edit) {
-  if ($edit) {
-    rules_invoke_event('fbss_comments_edit', $comment);
-  }
-  else {
-    rules_invoke_event('fbss_comments_save', $comment);
-  }
-}
-
-/*
- * Implementation of hook_fbss_comments_delete().
- */
-function fbss_comments_rules_fbss_comments_delete($cid) {
-  $comment = fbss_comments_load($cid);
-  rules_invoke_event('fbss_comments_delete', $comment);
-}
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/fbss_comments/fbss_comments_rules/fbss_comments_rules.rules.inc screamwork_fbss7/submodules/fbss_comments/fbss_comments_rules/fbss_comments_rules.rules.inc
--- facebook_status_6_3/submodules/fbss_comments/fbss_comments_rules/fbss_comments_rules.rules.inc	2011-05-30 21:08:09.007164000 -0400
+++ screamwork_fbss7/submodules/fbss_comments/fbss_comments_rules/fbss_comments_rules.rules.inc	1969-12-31 19:00:00.000000000 -0500
@@ -1,267 +0,0 @@
-<?php
-
-/**
- * Implementation of hook_rules_event_info().
- */
-function fbss_comments_rules_rules_event_info() {
-  return array(
-    'fbss_comments_save' => array(
-      'label' => t('User saves a new comment on a status'),
-      'module' => 'Facebook-style Statuses Comments',
-      'arguments' => array(
-        'comment' => array('type' => 'fbss_comment', 'label' => t('The status comment.')),
-      ),
-    ),
-    'fbss_comments_edit' => array(
-      'label' => t('User edits a comment on a status'),
-      'module' => 'Facebook-style Statuses Comments',
-      'arguments' => array(
-        'comment' => array('type' => 'fbss_comment', 'label' => t('The status comment.')),
-      ),
-    ),
-    'fbss_comments_delete' => array(
-      'label' => t('User deletes a comment on a status'),
-      'module' => 'Facebook-style Statuses Comments',
-      'arguments' => array(
-        'comment' => array('type' => 'fbss_comment', 'label' => t('The status comment.')),
-      ),
-    ),
-  );
-}
-
-/**
- * Implementation of hook_rules_condition_info().
- */
-function fbss_comments_rules_rules_condition_info() {
-  return array(
-    'fbss_comments_rules_on_own' => array(
-      'label' => t('Comment was posted on own status'),
-      'arguments' => array(
-        'comment' => array('type' => 'fbss_comment', 'label' => t('The status comment.')),
-      ),
-      'module' => 'Facebook-style Statuses Comments',
-    ),
-    'fbss_comments_rules_can_post' => array(
-      'label' => t('User has permission to send a status comment'),
-      'arguments' => array(),
-      'module' => 'Facebook-style Statuses Comments',
-    ),
-    'fbss_comments_rules_can_edit' => array(
-      'label' => t('User has permission to edit a status comment'),
-      'arguments' => array(
-        'comment' => array('type' => 'fbss_comment', 'label' => t('The status comment.')),
-      ),
-      'module' => 'Facebook-style Statuses Comments',
-    ),
-    'fbss_comments_rules_can_delete' => array(
-      'label' => t('User has permission to delete a status comment'),
-      'arguments' => array(
-        'comment' => array('type' => 'fbss_comment', 'label' => t('The status comment.')),
-      ),
-      'module' => 'Facebook-style Statuses Comments',
-    ),
-  );
-}
-
-/**
- * Check if a comment was posted on a user's own status.
- */
-function fbss_comments_rules_on_own($comment) {
-  $status = facebook_status_load($comment->sid);
-  return $comment->uid == $status->sender;
-}
-
-/**
- * Check if a user can comment on a status.
- */
-function fbss_comments_rules_can_post() {
-  return fbss_comments_can('post', NULL);
-}
-
-/**
- * Check if a user can edit a status comment.
- */
-function fbss_comments_rules_can_edit($comment) {
-  return fbss_comments_can('edit', $comment);
-}
-
-/**
- * Check if a user can delete a status comment.
- */
-function fbss_comments_rules_can_delete($comment) {
-  return fbss_comments_can('delete', $comment);
-}
-
-/**
- * Implementation of hook_rules_action_info().
- */
-function fbss_comments_rules_rules_action_info() {
-  return array(
-    'fbss_comments_rules_load_action' => array(
-      'label' => t('Load a status comment'),
-      'new variables' => array(
-        'comment_loaded' => array('type' => 'fbss_comment', 'label' => t('Loaded status comment')),
-      ),
-      'help' => t('Enter the Comment ID of a status comment to load.'),
-      'module' => 'Facebook-style Statuses Comments',
-      'eval input' => array('cid'),
-    ),
-    'fbss_comments_rules_edit_action' => array(
-      'label' => t('Edit a status comment'),
-      'help' => t('Enter the Status Comment ID of the status comment to edit and the text you wish to replace the comment.'),
-      'module' => 'Facebook-style Statuses Comments',
-      'eval input' => array('cid', 'message'),
-    ),
-    'fbss_comments_rules_delete_action' => array(
-      'label' => t('Delete a status comment'),
-      'help' => t('Enter the Status Comment ID of the status comment to delete.'),
-      'module' => 'Facebook-style Statuses Comments',
-      'eval input' => array('cid'),
-    ),
-    'fbss_comments_rules_add_action' => array(
-      'label' => t('Add a status comment'),
-      'help' => t('Enter the status comment text, the ID of the relevant status, and the user ID of the creator of the comment.'),
-      'module' => 'Facebook-style Statuses Comments',
-      'eval input' => array('sid', 'message', 'uid'),
-    ),
-  );
-}
-
-/**
- * Builds the form for loading a status comment.
- */
-function fbss_comments_rules_load_action_form($settings, &$form) {
-  $settings += array('cid' => '');
-  $form['settings']['cid'] = array(
-    '#type' => 'textfield',
-    '#title' => t('Status Comment ID'),
-    '#default_value' => $settings['cid'],
-    '#required' => TRUE,
-  );
-}
-
-/**
- * Loads a status.
- */
-function fbss_comments_rules_load_action($settings) {
-  return array('comment_loaded' => fbss_comments_load($settings['cid']));
-}
-
-/**
- * Builds the form for editing a status comment.
- */
-function fbss_comments_rules_edit_action_form($settings, &$form) {
-  $settings += array('cid' => '', 'message' => '');
-  $form['settings']['cid'] = array(
-    '#type' => 'textfield',
-    '#title' => t('Status Comment ID'),
-    '#default_value' => $settings['cid'],
-    '#required' => TRUE,
-  );
-  $form['settings']['message'] = array(
-    '#type' => 'textarea',
-    '#title' => t('Comment message'),
-    '#default_value' => $settings['message'],
-    '#rows' => 3,
-  );
-}
-
-/**
- * Edits a status.
- */
-function fbss_comments_rules_edit_action($settings) {
-  db_query("UPDATE {fbss_comments} SET comment = '%s' WHERE cid = %d", $settings['message'], $settings['cid']);
-  $c = fbss_comments_load($settings['cid']);
-  module_invoke_all('fbss_comments_after_save', $c, TRUE);
-  if (module_exists('trigger')) {
-    module_invoke_all('fbss_comments', 'fbss_comments_edited', $c);
-  }
-}
-
-/**
- * Builds the form for deleting a status.
- */
-function fbss_comments_rules_delete_action_form($settings, &$form) {
-  $settings += array('cid' => '');
-  $form['settings']['cid'] = array(
-    '#type' => 'textfield',
-    '#title' => t('Status Comment ID'),
-    '#default_value' => $settings['cid'],
-    '#required' => TRUE,
-  );
-}
-
-/**
- * Deletes a status.
- */
-function fbss_comments_rules_delete_action($settings) {
-  fbss_comments_delete_comment($settings['cid']);
-}
-
-/**
- * Builds the form for adding a status.
- */
-function fbss_comments_rules_add_action_form($settings, &$form) {
-  $settings += array('sid' => '', 'message' => '', 'uid' => '');
-  $form['settings']['sid'] = array(
-    '#type' => 'textfield',
-    '#title' => t('Status ID'),
-    '#description' => t('Enter the ID of the status on which this comment will be posted.'),
-    '#default_value' => $settings['sid'],
-    '#required' => TRUE,
-  );
-  $form['settings']['message'] = array(
-    '#type' => 'textarea',
-    '#title' => t('Comment message'),
-    '#default_value' => $settings['message'],
-    '#rows' => 3,
-    '#required' => TRUE,
-  );
-  $form['settings']['uid'] = array(
-    '#type' => 'textfield',
-    '#title' => t('User ID'),
-    '#description' => t('Enter the ID of the user who created this comment.'),
-    '#default_value' => $settings['uid'],
-  );
-}
-
-/**
- * Adds a status.
- */
-function fbss_comments_rules_add_action($settings) {
-  fbss_comments_save_comment($settings['sid'], $settings['message'], empty($settings['uid']) ? $GLOBALS['user']->uid : $settings['uid']);
-}
-
-/**
- * Implementation of hook_rules_data_type_info().
- */
-function fbss_comments_rules_rules_data_type_info() {
-  return array(
-    'fbss_comment' => array(
-      'label' => t('Facebook-style Status Comment'),
-      'class' => 'rules_data_type_fbss_comment',
-      'savable' => FALSE,
-      'identifiable' => TRUE,
-      'use_input_form' => FALSE,
-      'module' => 'Facebook-style Statuses Comments',
-    ),
-  );
-}
-
-/**
- * Defines the rules node data type.
- */
-class rules_data_type_fbss_comment extends rules_data_type {
-  function save() {
-    $comment = &$this->get();
-    fbss_comments_save_comment($comment->sid, $comment->comment, $comment->uid);
-    return TRUE;
-  }
-  function load($cid) {
-    return fbss_comments_load($cid);
-  }
-  function get_identifier() {
-    $status = &$this->get();
-    return $status->cid;
-  }
-}
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/fbss_comments/fbss_comments_views_ahah.js screamwork_fbss7/submodules/fbss_comments/fbss_comments_views_ahah.js
--- facebook_status_6_3/submodules/fbss_comments/fbss_comments_views_ahah.js	2011-06-03 14:49:59.763760500 -0400
+++ screamwork_fbss7/submodules/fbss_comments/fbss_comments_views_ahah.js	1969-12-31 19:00:00.000000000 -0500
@@ -1,163 +0,0 @@
-/**
- * Ajax behavior for views.
- */
-Drupal.behaviors.ViewsAjaxView = function() {
-  if (Drupal.settings && Drupal.settings.views && Drupal.settings.views.ajaxViews) {
-    var ajax_path = Drupal.settings.views.ajax_path;
-    // If there are multiple views this might've ended up showing up multiple times.
-    if (ajax_path.constructor.toString().indexOf("Array") != -1) {
-      ajax_path = ajax_path[0];
-    }
-    $.each(Drupal.settings.views.ajaxViews, function(i, settings) {
-      var view = '.view-dom-id-' + settings.view_dom_id;
-      if (!$(view).size()) {
-        // Backward compatibility: if 'views-view.tpl.php' is old and doesn't
-        // contain the 'view-dom-id-#' class, we fall back to the old way of
-        // locating the view:
-        view = '.view-id-' + settings.view_name + '.view-display-id-' + settings.view_display_id;
-      }
-
-
-      // Process exposed filter forms.
-      $('form#views-exposed-form-' + settings.view_name.replace(/_/g, '-') + '-' + settings.view_display_id.replace(/_/g, '-'))
-      .filter(':not(.views-processed)')
-      .each(function () {
-        // remove 'q' from the form; it's there for clean URLs
-        // so that it submits to the right place with regular submit
-        // but this method is submitting elsewhere.
-        $('input[name=q]', this).remove();
-        var form = this;
-        // ajaxSubmit doesn't accept a data argument, so we have to
-        // pass additional fields this way.
-        $.each(settings, function(key, setting) {
-          $(form).append('<input type="hidden" name="'+ key + '" value="'+ setting +'"/>');
-        });
-      })
-      .addClass('views-processed')
-      .submit(function () {
-        $('input[type=submit], button', this).after('<span class="views-throbbing">&nbsp</span>');
-        var object = this;
-        $(this).ajaxSubmit({
-          url: ajax_path,
-          type: 'GET',
-          success: function(response) {
-            // Call all callbacks.
-            if (response.__callbacks) {
-              $.each(response.__callbacks, function(i, callback) {
-                eval(callback)(view, response);
-              });
-              $('.views-throbbing', object).remove();
-            }
-          },
-          error: function(xhr) { Drupal.Views.Ajax.handleErrors(xhr, ajax_path); $('.views-throbbing', object).remove(); },
-          dataType: 'json'
-        });
-
-        return false;
-      });
-
-      $(view).filter(':not(.views-processed)')
-        // Don't attach to nested views. Doing so would attach multiple behaviors
-        // to a given element.
-        .filter(function() {
-          // If there is at least one parent with a view class, this view
-          // is nested (e.g., an attachment). Bail.
-          return !$(this).parents('.view').size();
-        })
-        .each(function() {
-          // Set a reference that will work in subsequent calls.
-          var target = this;
-          $(this)
-            .addClass('views-processed')
-            // Process pager, tablesort, and attachment summary links.
-            .find('ul.pager > li > a, th.views-field a, .attachment .views-summary a')
-            .each(function () {
-              var viewData = { 'js': 1 };
-              // Construct an object using the settings defaults and then overriding
-              // with data specific to the link.
-              $.extend(
-                viewData,
-                Drupal.Views.parseQueryString($(this).attr('href')),
-                // Extract argument data from the URL.
-                Drupal.Views.parseViewArgs($(this).attr('href'), settings.view_base_path),
-                // Settings must be used last to avoid sending url aliases to the server.
-                settings
-              );
-              $(this).click(function () {
-                var href= $(this).attr('href');
-                $.extend(viewData, Drupal.Views.parseViewArgs(href, settings.view_base_path));
-                $(this).addClass('views-throbbing');
-                $.ajax({
-                  url: ajax_path,
-                  type: 'GET',
-                  data: viewData,
-                  success: function(response) {
-                    console.log('here');
-                    // Scroll to the top of the view. This will allow users
-                    // to browse newly loaded content after e.g. clicking a pager
-                    // link.
-                    var offset = $(target).offset();
-                    // We can't guarantee that the scrollable object should be
-                    // the body, as the view could be embedded in something
-                    // more complex such as a modal popup. Recurse up the DOM
-                    // and scroll the first element that has a non-zero top.
-                    var scrollTarget = target;
-                    while ($(scrollTarget).scrollTop() == 0 && $(scrollTarget).parent()) {
-                      scrollTarget = $(scrollTarget).parent()
-                    }
-                    // Only scroll upward
-                    if (offset.top - 10 < $(scrollTarget).scrollTop()) {
-                      $(scrollTarget).animate({scrollTop: (offset.top - 10)}, 500);
-                    }
-                    // Call all callbacks.
-                    if (response.__callbacks) {
-                      $.each(response.__callbacks, function(i, callback) {
-                        eval(callback)(target, response);
-                      });
-                    }
-                    // BEGIN DIFFERENCE FROM ajax_view.js
-                    var search = (href.indexOf('?') == -1) ? '?' : '&';
-                    // IE will cache the result unless we add an identifier (in this case, the time).
-                    $.get(href + search +"ts="+ (new Date()).getTime(), function(data, textStatus) {
-                      // From load() in jQuery source. We already have the scripts we need.
-                      var new_data = data.replace(/<script(.|\s)*?\/script>/g, "");
-                      if (Drupal.settings.fbss_comments && Drupal.settings.fbss_comments.ahah_enabled) {
-                        // EVIL BLACK MAGIC - updates Drupal.settings.ahah to reflect AHAH forms that are about to be loaded
-                        var settings_script = data.match(/(<script[\s\S]*?Drupal\.settings\,\s)((.|\s)*?)\/script>/)[2];
-                        eval('Drupal.settings2 = '+ settings_script.substring(0, settings_script.length-15));
-                        $.extend(Drupal.settings.ahah, Drupal.settings2.ahah);
-                      }
-                      // From ahah.js. Apparently Safari crashes with just $().
-                      var new_content = $('<div></div>').html(new_data);
-                      if (textStatus != 'error' && new_content) {
-                        // Replace relevant content in the viewport with the updated version.
-                        var insert = new_content.find(view);
-                        // If a view is found multiple times on the same page, replace each one sequentially.
-                        var element = $(view);
-                        if (insert.length && insert.length > 0 && element.length && element.length >= insert.length) {
-                          $.each(insert, function(j, v) {
-                            v = $(v);
-                            var el = $(element[j]);
-                            // Don't bother replacing anything if the replacement region hasn't changed.
-                            if (v.get() != el.get()) {
-                              el.replaceWith(v);
-                              Drupal.attachBehaviors(v);
-                            }
-                          });
-                        }
-                      }
-                    });
-                    // END DIFFERENCE FROM ajax_view.js
-                    $(this).removeClass('views-throbbing');
-                  },
-                  error: function(xhr) { $(this).removeClass('views-throbbing'); Drupal.Views.Ajax.handleErrors(xhr, ajax_path); },
-                  dataType: 'json'
-                });
-
-                return false;
-              });
-            }); // .each function () {
-      }); // $view.filter().each
-    }); // .each Drupal.settings.views.ajaxViews
-  } // if
-};
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/fbss_comments/fbss_comments_views_handler_field_cc.inc screamwork_fbss7/submodules/fbss_comments/fbss_comments_views_handler_field_cc.inc
--- facebook_status_6_3/submodules/fbss_comments/fbss_comments_views_handler_field_cc.inc	2011-04-09 19:23:26.585620200 -0400
+++ screamwork_fbss7/submodules/fbss_comments/fbss_comments_views_handler_field_cc.inc	2011-05-25 20:53:28.000000000 -0400
@@ -13,3 +13,3 @@ class fbss_comments_views_handler_field_
     $sid = $values->{$this->field_alias};
-    $count = db_result(db_query("SELECT COUNT(cid) FROM {fbss_comments} WHERE sid = %d", $sid));
+    $count = db_query("SELECT COUNT(cid) FROM {fbss_comments} WHERE sid = :sid", array(':sid' => $sid))->fetchField();
     return $count;
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/fbss_comments/fbss_comments_views_handler_field_cc2.inc screamwork_fbss7/submodules/fbss_comments/fbss_comments_views_handler_field_cc2.inc
--- facebook_status_6_3/submodules/fbss_comments/fbss_comments_views_handler_field_cc2.inc	2011-04-09 19:23:26.586620200 -0400
+++ screamwork_fbss7/submodules/fbss_comments/fbss_comments_views_handler_field_cc2.inc	2011-05-25 20:53:28.000000000 -0400
@@ -13,3 +13,3 @@ class fbss_comments_views_handler_field_
     $sid = $values->{$this->field_alias};
-    $count = db_result(db_query("SELECT COUNT(cid) FROM {fbss_comments} WHERE sid = %d", $sid));
+    $count = db_query("SELECT COUNT(cid) FROM {fbss_comments} WHERE sid = :sid", array(':sid' => $sid))->fetchField();
     return format_plural($count, '1 comment', '@count comments');
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/fbss_comments/fbss_comments_views_handler_field_comment_box.inc screamwork_fbss7/submodules/fbss_comments/fbss_comments_views_handler_field_comment_box.inc
--- facebook_status_6_3/submodules/fbss_comments/fbss_comments_views_handler_field_comment_box.inc	2011-07-04 19:11:28.708453800 -0400
+++ screamwork_fbss7/submodules/fbss_comments/fbss_comments_views_handler_field_comment_box.inc	2011-05-25 20:53:28.000000000 -0400
@@ -12,3 +12,3 @@ class fbss_comments_views_handler_field_
   function render($values) {
-    return theme('fbss_comments_form_display', $values->{$this->field_alias}, TRUE, TRUE);
+    return theme('fbss_comments_form_display', array('sid' => isset($values->facebook_status_sid) ? $values->facebook_status_sid : $values->sid, 'delay_load_form' => TRUE, 'delay_load_comments' => TRUE));
   }
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/fbss_comments/fbss_comments_views_handler_field_delete.inc screamwork_fbss7/submodules/fbss_comments/fbss_comments_views_handler_field_delete.inc
--- facebook_status_6_3/submodules/fbss_comments/fbss_comments_views_handler_field_delete.inc	2011-06-05 03:22:46.626908700 -0400
+++ screamwork_fbss7/submodules/fbss_comments/fbss_comments_views_handler_field_delete.inc	1969-12-31 19:00:00.000000000 -0500
@@ -1,34 +0,0 @@
-<?php
-
-/**
- * @file
- *   Provides a delete link to Views.
- */
-
-/**
- * Field handler to add a field with a delete link.
- */
-class fbss_comments_views_handler_field_delete extends views_handler_field {
-  function construct() {
-    parent::construct();
-    $this->additional_fields['sid'] = 'sid';
-    $this->additional_fields['uid'] = 'uid';
-    $this->additional_fields['created'] = 'created';
-    $this->additional_fields['comment'] = 'comment';
-  }
-  function render($values) {
-    $comment = new stdClass();
-    $comment->cid = $values->{$this->field_alias};
-    $comment->sid = $values->{$this->aliases['sid']};
-    $comment->uid = $values->{$this->aliases['uid']};
-    $comment->created = $values->{$this->aliases['created']};
-    $comment->comment = $values->{$this->aliases['comment']};
-    if (fbss_comments_can('delete', $comment)) {
-      if (module_exists('modalframe')) {
-        modalframe_parent_js();
-      }
-      drupal_add_css(drupal_get_path('module', 'fbss_comments') .'/fbss_comments.css');
-      return '<span class="facebook-status-delete">'. l(t('Delete'), 'statuses/comment/'. $comment->cid .'/delete', array('query' => array('destination' => $_GET['q']))) .'</span>';
-    }
-  }
-}
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/fbss_comments/fbss_comments_views_handler_field_edit.inc screamwork_fbss7/submodules/fbss_comments/fbss_comments_views_handler_field_edit.inc
--- facebook_status_6_3/submodules/fbss_comments/fbss_comments_views_handler_field_edit.inc	2011-06-05 03:22:36.281317000 -0400
+++ screamwork_fbss7/submodules/fbss_comments/fbss_comments_views_handler_field_edit.inc	1969-12-31 19:00:00.000000000 -0500
@@ -1,34 +0,0 @@
-<?php
-
-/**
- * @file
- *   Provides an edit link to Views.
- */
-
-/**
- * Field handler to add a field with an edit link.
- */
-class fbss_comments_views_handler_field_edit extends views_handler_field {
-  function construct() {
-    parent::construct();
-    $this->additional_fields['sid'] = 'sid';
-    $this->additional_fields['uid'] = 'uid';
-    $this->additional_fields['created'] = 'created';
-    $this->additional_fields['comment'] = 'comment';
-  }
-  function render($values) {
-    $comment = new stdClass();
-    $comment->cid = $values->{$this->field_alias};
-    $comment->sid = $values->{$this->aliases['sid']};
-    $comment->uid = $values->{$this->aliases['uid']};
-    $comment->created = $values->{$this->aliases['created']};
-    $comment->comment = $values->{$this->aliases['comment']};
-    if (fbss_comments_can('edit', $comment)) {
-      if (module_exists('modalframe')) {
-        modalframe_parent_js();
-      }
-      drupal_add_css(drupal_get_path('module', 'fbss_comments') .'/fbss_comments.css');
-      return '<span class="facebook-status-edit">'. l(t('Edit'), 'statuses/comment/'. $comment->cid .'/edit', array('query' => array('destination' => $_GET['q']))) .'</span>';
-    }
-  }
-}
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/fbss_flag/fbss_flag.flag.inc screamwork_fbss7/submodules/fbss_flag/fbss_flag.flag.inc
--- facebook_status_6_3/submodules/fbss_flag/fbss_flag.flag.inc	2011-05-26 13:41:51.703632600 -0400
+++ screamwork_fbss7/submodules/fbss_flag/fbss_flag.flag.inc	2011-05-25 20:53:28.000000000 -0400
@@ -13,3 +13,3 @@
 if (!class_exists('flag_flag')) {
-  module_load_include('inc', 'flag');
+  module_load_include(drupal_get_path('module', 'flag') . '/flag.inc');
 }
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/fbss_flag/fbss_flag.info screamwork_fbss7/submodules/fbss_flag/fbss_flag.info
--- facebook_status_6_3/submodules/fbss_flag/fbss_flag.info	2011-04-09 19:23:26.588620400 -0400
+++ screamwork_fbss7/submodules/fbss_flag/fbss_flag.info	2011-05-25 20:53:28.000000000 -0400
@@ -5,2 +5,5 @@ dependencies[] = facebook_status
 dependencies[] = flag
-core = 6.x
\ No newline at end of file
+core = 7.x
+files[] = fbss_flag.flag.inc
+files[] = fbss_flag.install
+files[] = fbss_flag.module
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/fbss_flag/fbss_flag.install screamwork_fbss7/submodules/fbss_flag/fbss_flag.install
--- facebook_status_6_3/submodules/fbss_flag/fbss_flag.install	2011-04-09 19:23:26.590620500 -0400
+++ screamwork_fbss7/submodules/fbss_flag/fbss_flag.install	2011-05-25 20:53:28.000000000 -0400
@@ -8,3 +8,3 @@
 /**
- * Implementation of hook_install().
+ * Implements hook_install().
  */
@@ -14,3 +14,10 @@ function fbss_flag_install() {
   // necessary, but it (probably) doesn't hurt.
-  db_query("UPDATE {system} SET weight = 2 WHERE name = 'fbss_flag'");
+  // TODO Please review the conversion of this statement to the D7 database API syntax.
+  /* db_query("UPDATE {system} SET weight = 2 WHERE name = 'fbss_flag'") */
+  db_update('system')
+  ->fields(array(
+    'weight' =>  2,
+  ))
+  ->condition('name', 'fbss_flag')
+  ->execute();
 }
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/fbss_flag/fbss_flag.module screamwork_fbss7/submodules/fbss_flag/fbss_flag.module
--- facebook_status_6_3/submodules/fbss_flag/fbss_flag.module	2011-06-20 09:55:12.021881500 -0400
+++ screamwork_fbss7/submodules/fbss_flag/fbss_flag.module	2011-05-25 20:53:28.000000000 -0400
@@ -8,113 +8,17 @@
 /**
- * Implementation of hook_link().
+ * Implements hook_facebook_status_delete().
  */
-function fbss_flag_link($type, $status) {
-  if ($type != 'facebook_status') {
-    return;
-  }
-  $links = array();
-  foreach (flag_get_flags('facebook_status') as $flag) {
-    $links['flag-'. $flag->name] = array(
-      'html' => TRUE,
-      'title' => flag_create_link($flag->name, $status->sid),
-    );
-  }
-  return $links;
-}
-
-/**
- * Implementation of hook_facebook_status_delete().
- */
-function fbss_flag_facebook_status_delete($status) {
-  db_query("DELETE FROM {flag_content} WHERE content_type = 'facebook_status' AND content_id = %d", $status->sid);
-  db_query("DELETE FROM {flag_counts} WHERE content_type = 'facebook_status' AND content_id = %d", $status->sid);
-}
-
-/**
- * Implementation of hook_form_FORM_ID_alter().
- */
-function fbss_flag_form_facebook_status_box_alter(&$form, $form_state) {
-  // Make sure the necessary resources are loaded when the list of status updates is empty.
-  // Otherwise, when the first status is posted, flagging an item will refresh the page.
-  $path = drupal_get_path('module', 'flag') .'/theme';
-  drupal_add_css($path .'/flag.css');
-  drupal_add_js($path .'/flag.js');
-}
-
-/**
- * Implementation of hook_views_api().
- */
-function fbss_flag_views_api() {
-  return array(
-    'api' => 2,
-    'path' => drupal_get_path('module', 'fbss_flag') .'/views',
-  );
-}
-
-/**
- * Implementation of hook_views_default_views_alter().
- */
-function fbss_flag_views_default_views_alter(&$views) {
-  // Add the "like" field to default Views.
-  $flag = flag_get_flag('like');
-  if (!$flag || !$flag->status) {
-    return;
-  }
-  // This whole function only applies to default Views, not overridden ones.
-  foreach ($views as $view) {
-    if ($view->tag == 'Facebook-style Statuses') {
-      // Set the view to show DISTINCT results on the primary key (sid).
-      $view->display['default']->display_options['distinct'] = 1;
-      // Add the "Flag: Facebook-style Statuses" relationship to expose the Flag link field.
-      $view->display['default']->display_options['relationships']['flag_content_rel'] = array(
-        'label' => 'flag',
-        'required' => 0,
-        'flag' => 'like',
-        'user_scope' => 'any',
-        'id' => 'flag_content_rel',
-        'table' => 'facebook_status',
-        'field' => 'flag_content_rel',
-        'relationship' => 'none',
-      );
-      // Set up the "Flags: Flag link" field.
-      $ops = 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,
-          'html' => 0,
-          'strip_tags' => 0,
-        ),
-        'empty' => '',
-        'hide_empty' => 0,
-        'empty_zero' => 0,
-        'link_type' => '',
-        'exclude' => 1,
-        'id' => 'ops',
-        'table' => 'flag_content',
-        'field' => 'ops',
-        'relationship' => 'flag_content_rel',
-      );
-      // Add the Flag link above the Global: Nothing field so we can use it as a token.
-      $nothing = array_pop($view->display['default']->display_options['fields']);
-      $view->display['default']->display_options['fields']['ops'] = $ops;
-      $view->display['default']->display_options['fields']['nothing'] = $nothing;
-      // Add the Flag link token to the Global: Nothing field.
-      $t = $view->display['default']->display_options['fields']['nothing']['alter']['text'];
-      $t = str_replace('[edit] [delete]', '[edit] [delete] [ops]', $t);
-      $view->display['default']->display_options['fields']['nothing']['alter']['text'] = $t;
-    }
-  }
+function fbss_flag_facebook_status_delete($sid) {
+  // TODO Please review the conversion of this statement to the D7 database API syntax.
+  /* db_query("DELETE FROM {flag_content} WHERE content_type = 'facebook_status' AND content_id = %d", $sid) */
+  db_delete('flag_content')
+  ->condition('content_type', 'facebook_status')
+  ->condition('content_id', $sid)
+  ->execute();
+  // TODO Please review the conversion of this statement to the D7 database API syntax.
+  /* db_query("DELETE FROM {flag_counts} WHERE content_type = 'facebook_status' AND content_id = %d", $sid) */
+  db_delete('flag_counts')
+  ->condition('content_type', 'facebook_status')
+  ->condition('content_id', $sid)
+  ->execute();
 }
@@ -122,3 +26,3 @@ function fbss_flag_views_default_views_a
 /**
- * Implementation of hook_flag_definitions().
+ * Implements hook_flag_definitions().
  */
@@ -135,3 +39,3 @@ function fbss_flag_flag_definitions() {
 /**
- * Implementation of hook_flag_default_flags().
+ * Implements hook_flag_default_flags().
  */
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/fbss_flag/views/facebook_status_views_handler_argument_flagged_user.inc screamwork_fbss7/submodules/fbss_flag/views/facebook_status_views_handler_argument_flagged_user.inc
--- facebook_status_6_3/submodules/fbss_flag/views/facebook_status_views_handler_argument_flagged_user.inc	2011-04-09 19:23:26.539617600 -0400
+++ screamwork_fbss7/submodules/fbss_flag/views/facebook_status_views_handler_argument_flagged_user.inc	1969-12-31 19:00:00.000000000 -0500
@@ -1,47 +0,0 @@
-<?php
-
-/**
- * @file
- *   Allow only statuses from friends/followed + argument user.
- */
-
-/**
- * Argument handler to select statuses from friends/followed + argument user.
- */
-class facebook_status_views_handler_argument_flagged_user extends views_handler_argument {
-  function option_definition() {
-    $options = parent::option_definition();
-    $flag = array_shift(flag_get_flags($content_type));
-    $default = $flag ? $flag->fid : NULL;
-    $options['facebook_status_flag_type'] = array(
-      'default' => $default,
-      'translatable' => FALSE,
-    );
-    return $options;
-  }
-  function options_form(&$form, &$form_state) {
-    parent::options_form($form, $form_state);
-    $flags = flag_get_flags('user');
-    $options = array();
-    foreach ($flags as $flag) {
-      $options[$flag->fid] = $flag->get_title();
-    }
-    $form['warning'] = array(
-      '#value' => t('Warning: this argument can be slow.'),
-      '#weight' => -100,
-    );
-    $form['facebook_status_flag_type'] = array(
-      '#type' => 'radios',
-      '#title' => t('Flag'),
-      '#options' => $options,
-      '#default_value' => $this->options['facebook_status_flag_type'],
-      '#required' => TRUE,
-    );
-  }
-  function query() {
-    $argument = $this->argument;
-    $field = "$this->table.$this->real_field";
-    $query = db_prefix_tables("$field IN (SELECT content_id FROM {flag_content} WHERE fid = %d AND uid = %d) OR $field = %d");
-    $this->query->add_where(0, $query, $this->options['facebook_status_flag_type'], $argument, $argument);
-  }
-}
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/fbss_flag/views/facebook_status_views_handler_filter_flagged_user.inc screamwork_fbss7/submodules/fbss_flag/views/facebook_status_views_handler_filter_flagged_user.inc
--- facebook_status_6_3/submodules/fbss_flag/views/facebook_status_views_handler_filter_flagged_user.inc	2011-04-09 19:23:26.553618400 -0400
+++ screamwork_fbss7/submodules/fbss_flag/views/facebook_status_views_handler_filter_flagged_user.inc	1969-12-31 19:00:00.000000000 -0500
@@ -1,46 +0,0 @@
-<?php
-
-/**
- * @file
- *   Filters to statuses posted by "followed" users plus the current user.
- */
-
-/**
- * Filter handler to select statuses from friends/followed + current user.
- */
-class facebook_status_views_handler_filter_flagged_user extends views_handler_filter {
-  function option_definition() {
-    $options = parent::option_definition();
-    $flag = array_shift(flag_get_flags($content_type));
-    $default = $flag ? $flag->fid : NULL;
-    $options['facebook_status_flag_type'] = array(
-      'default' => $default,
-      'translatable' => FALSE,
-    );
-    return $options;
-  }
-  function options_form(&$form, &$form_state) {
-    parent::options_form($form, $form_state);
-    $flags = flag_get_flags('user');
-    $options = array();
-    foreach ($flags as $flag) {
-      $options[$flag->fid] = $flag->get_title();
-    }
-    $form['warning'] = array(
-      '#value' => t('Warning: this filter can be slow.'),
-      '#weight' => -100,
-    );
-    $form['facebook_status_flag_type'] = array(
-      '#type' => 'radios',
-      '#title' => t('Flag'),
-      '#options' => $options,
-      '#default_value' => $this->options['facebook_status_flag_type'],
-      '#required' => TRUE,
-    );
-  }
-  function query() {
-    $query = "({$this->table}.sender IN (SELECT content_id FROM {flag_content} WHERE fid = %d AND uid = %d) OR {$this->table}.sender = %d)";
-    $query = db_prefix_tables($query);
-    $this->query->add_where($this->options['group'], $query, $this->options['facebook_status_flag_type'], $GLOBALS['user']->uid, $GLOBALS['user']->uid);
-  }
-}
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/fbss_flag/views/fbss_flag.views.inc screamwork_fbss7/submodules/fbss_flag/views/fbss_flag.views.inc
--- facebook_status_6_3/submodules/fbss_flag/views/fbss_flag.views.inc	2011-06-04 23:52:47.146259700 -0400
+++ screamwork_fbss7/submodules/fbss_flag/views/fbss_flag.views.inc	1969-12-31 19:00:00.000000000 -0500
@@ -1,51 +0,0 @@
-<?php
-
-/**
- * @file
- *   Provide Views data and handlers for the FBSS Flag module.
- */
-
-/**
- * Implementation of hook_views_data().
- */
-function fbss_flag_views_data() {
-  $data = array();
-
-  $data['facebook_status']['user-flag-plus-current'] = array(
-    'title' => t('Content from flagged users or the current user'),
-    'help' => t('Shows content from only flagged users or the current user.'),
-    'filter' => array(
-      'field' => 'sender',
-      'handler' => 'facebook_status_views_handler_filter_flagged_user',
-    ),
-  );
-  $data['facebook_status']['user-flag-plus-arg'] = array(
-    'title' => t('Content from flagged users or the argument user'),
-    'help' => t('Shows content from only flagged users or the argument user.'),
-    'argument' => array(
-      'field' => 'sender',
-      'handler' => 'facebook_status_views_handler_argument_flagged_user',
-    ),
-  );
-
-  return $data;
-}
-
-/**
- * Implementation of hook_views_handlers().
- */
-function fbss_flag_views_handlers() {
-  return array(
-    'info' => array(
-      'path' => drupal_get_path('module', 'fbss_flag') .'/views',
-    ),
-    'handlers' => array(
-      'facebook_status_views_handler_filter_flagged_user' => array(
-        'parent' => 'views_handler_filter',
-      ),
-      'facebook_status_views_handler_argument_flagged_user' => array(
-        'parent' => 'views_handler_argument',
-      ),
-    ),
-  );
-}
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/fbss_flag/views/fbss_flag.views_default.inc screamwork_fbss7/submodules/fbss_flag/views/fbss_flag.views_default.inc
--- facebook_status_6_3/submodules/fbss_flag/views/fbss_flag.views_default.inc	2011-06-12 16:55:35.461631500 -0400
+++ screamwork_fbss7/submodules/fbss_flag/views/fbss_flag.views_default.inc	1969-12-31 19:00:00.000000000 -0500
@@ -1,361 +0,0 @@
-<?php
-
-/**
- * @file
- *   Provides default Views for the Facebook-style Statuses Flag module.
- */
-
-/**
- * Implementation of hook_views_default_views().
- */
-function fbss_flag_views_default_views() {
-  $views = array();
-
-  $view = new view;
-  $view->name = 'facebook_status_followed';
-  $view->description = 'Displays statuses from users that the current user follows.';
-  $view->tag = 'Facebook-style Statuses';
-  $view->view_php = '';
-  $view->base_table = 'facebook_status';
-  $view->is_cacheable = FALSE;
-  $view->api_version = 2;
-  $view->disabled = !flag_get_flag('follow')->status; // Line modified from default
-  $handler = $view->new_display('default', 'Defaults', 'default');
-  $handler->override_option('fields', array(
-    'sid' => 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,
-        'html' => 0,
-        'strip_tags' => 0,
-      ),
-      'empty' => '',
-      'hide_empty' => 0,
-      'empty_zero' => 0,
-      'exclude' => 1,
-      'id' => 'sid',
-      'table' => 'facebook_status',
-      'field' => 'sid',
-      'relationship' => 'none',
-    ),
-    'user_contextual_pic' => 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,
-        'html' => 0,
-        'strip_tags' => 0,
-      ),
-      'empty' => '',
-      'hide_empty' => 0,
-      'empty_zero' => 0,
-      'exclude' => 1,
-      'id' => 'user_contextual_pic',
-      'table' => 'facebook_status',
-      'field' => 'user_contextual_pic',
-      'relationship' => 'none',
-    ),
-    'message' => 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,
-        'html' => 0,
-        'strip_tags' => 0,
-      ),
-      'empty' => '',
-      'hide_empty' => 0,
-      'empty_zero' => 0,
-      'exclude' => 1,
-      'id' => 'message',
-      'table' => 'facebook_status',
-      'field' => 'message',
-      'relationship' => 'none',
-    ),
-    'edit' => 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,
-        'html' => 0,
-        'strip_tags' => 0,
-      ),
-      'empty' => '',
-      'hide_empty' => 0,
-      'empty_zero' => 0,
-      'exclude' => 1,
-      'id' => 'edit',
-      'table' => 'facebook_status',
-      'field' => 'edit',
-      'relationship' => 'none',
-    ),
-    'delete' => 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,
-        'html' => 0,
-        'strip_tags' => 0,
-      ),
-      'empty' => '',
-      'hide_empty' => 0,
-      'empty_zero' => 0,
-      'exclude' => 1,
-      'id' => 'delete',
-      'table' => 'facebook_status',
-      'field' => 'delete',
-      'relationship' => 'none',
-    ),
-    'created' => array(
-      'label' => '',
-      'alter' => array(
-        'alter_text' => 0,
-        'text' => '',
-        'make_link' => 1,
-        'path' => 'statuses/[sid]',
-        '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,
-      'date_format' => 'themed',
-      'custom_date_format' => '',
-      'exclude' => 1,
-      'id' => 'created',
-      'table' => 'facebook_status',
-      'field' => 'created',
-      'relationship' => 'none',
-    ),
-    'repost' => 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,
-        'html' => 0,
-        'strip_tags' => 0,
-      ),
-      'empty' => '',
-      'hide_empty' => 0,
-      'empty_zero' => 0,
-      'repost_text' => 'Share',
-      'exclude' => 1,
-      'id' => 'repost',
-      'table' => 'facebook_status',
-      'field' => 'repost',
-      'relationship' => 'none',
-    ),
-    'nothing' => array(
-      'label' => '',
-      'alter' => array(
-        'text' => '<div>[user_contextual_pic] [message]</div>
-
-<div class="facebook-status-details">[created] [edit] [delete] [repost]</div>',
-        'make_link' => 0,
-        '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(
-    'sid' => array(
-      'order' => 'DESC',
-      'id' => 'sid',
-      'table' => 'facebook_status',
-      'field' => 'sid',
-      'relationship' => 'none',
-    ),
-  ));
-  $handler->override_option('arguments', array(
-    'user-flag-plus-arg' => array(
-      'default_action' => 'default',
-      'style_plugin' => 'default_summary',
-      'style_options' => array(),
-      'wildcard' => 'all',
-      'wildcard_substitution' => 'All',
-      'title' => 'Statuses by users %1 is following',
-      'breadcrumb' => '',
-      'default_argument_type' => 'current_user',
-      'default_argument' => '',
-      'validate_type' => 'user',
-      'validate_fail' => 'not found',
-      'facebook_status_flag_type' => flag_get_flag('follow')->fid, // Line modified from default
-      'id' => 'user-flag-plus-arg',
-      'table' => 'facebook_status',
-      'field' => 'user-flag-plus-arg',
-      'validate_user_argument_type' => 'uid',
-      'validate_user_roles' => array(),
-      'relationship' => 'none',
-      'default_options_div_prefix' => '',
-      'default_argument_fixed' => '',
-      'default_argument_user' => 0,
-      'default_argument_php' => '',
-      'validate_argument_node_type' => array(),
-      'validate_argument_node_access' => 0,
-      'validate_argument_nid_type' => 'nid',
-      'validate_argument_vocabulary' => array(),
-      'validate_argument_type' => 'tid',
-      'validate_argument_transform' => 0,
-      'validate_user_restrict_roles' => 0,
-      'validate_argument_node_flag_name' => '*relationship*',
-      'validate_argument_node_flag_test' => 'flaggable',
-      'validate_argument_node_flag_id_type' => 'id',
-      'validate_argument_user_flag_name' => '*relationship*',
-      'validate_argument_user_flag_test' => 'flaggable',
-      'validate_argument_user_flag_id_type' => 'id',
-      'validate_argument_is_member' => '0',
-      'validate_argument_php' => '',
-    ),
-  ));
-  $handler->override_option('filters', array(
-    'message' => array(
-      'operator' => '!=',
-      'value' => '',
-      'group' => '0',
-      'exposed' => FALSE,
-      'expose' => array(
-        'operator' => FALSE,
-        'label' => '',
-      ),
-      'case' => 1,
-      'id' => 'message',
-      'table' => 'facebook_status',
-      'field' => 'message',
-      'relationship' => 'none',
-    ),
-  ));
-  $handler->override_option('access', array(
-    'type' => 'perm',
-    'perm' => 'view all statuses',
-  ));
-  $handler->override_option('cache', array(
-    'type' => 'none',
-  ));
-  $handler->override_option('title', "Followed Users' Statuses");
-  $handler->override_option('empty_format', '1');
-  $handler->override_option('use_ajax', TRUE);
-  $handler->override_option('use_pager', '1');
-  $handler->override_option('style_plugin', 'table');
-  $handler = $view->new_display('page', 'Page', 'page_1');
-  $handler->override_option('path', 'statuses/followed');
-  $handler->override_option('menu', array(
-    'type' => 'tab',
-    'title' => "Followed Users' Statuses",
-    'description' => '',
-    'weight' => '0',
-    'name' => 'navigation',
-  ));
-  $handler->override_option('tab_options', array(
-    'type' => 'none',
-    'title' => '',
-    'description' => '',
-    'weight' => 0,
-    'name' => 'navigation',
-  ));
-  $views[$view->name] = $view;
-
-  return $views;
-}
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/fbss_mollom/fbss_mollom.info screamwork_fbss7/submodules/fbss_mollom/fbss_mollom.info
--- facebook_status_6_3/submodules/fbss_mollom/fbss_mollom.info	2011-04-09 19:23:26.592620600 -0400
+++ screamwork_fbss7/submodules/fbss_mollom/fbss_mollom.info	2011-05-25 20:53:28.000000000 -0400
@@ -5,2 +5,4 @@ dependencies[] = facebook_status
 dependencies[] = mollom
-core = 6.x
+core = 7.x
+
+files[] = fbss_mollom.module
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/fbss_mollom/fbss_mollom.module screamwork_fbss7/submodules/fbss_mollom/fbss_mollom.module
--- facebook_status_6_3/submodules/fbss_mollom/fbss_mollom.module	2011-04-09 19:23:26.592620600 -0400
+++ screamwork_fbss7/submodules/fbss_mollom/fbss_mollom.module	2011-05-25 20:53:28.000000000 -0400
@@ -8,3 +8,3 @@
 /**
- * Implementation of hook_mollom_form_list().
+ * Implements hook_mollom_form_list().
  */
@@ -36,3 +36,3 @@ function fbss_mollom_mollom_form_list()
 /**
- * Implementation of hook_mollom_form_info().
+ * Implements hook_mollom_form_info().
  */
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/fbss_notifications/fbss_notifications.info screamwork_fbss7/submodules/fbss_notifications/fbss_notifications.info
--- facebook_status_6_3/submodules/fbss_notifications/fbss_notifications.info	2011-05-25 13:49:24.878905400 -0400
+++ screamwork_fbss7/submodules/fbss_notifications/fbss_notifications.info	1969-12-31 19:00:00.000000000 -0500
@@ -1,7 +0,0 @@
-name = Facebook-style Statuses Notifications
-description = "Integrates Notifications with Facebook-style Statuses."
-package = Facebook-style Statuses
-dependencies[] = facebook_status
-dependencies[] = notifications
-dependencies[] = messaging
-core = 6.x
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/fbss_notifications/fbss_notifications.install screamwork_fbss7/submodules/fbss_notifications/fbss_notifications.install
--- facebook_status_6_3/submodules/fbss_notifications/fbss_notifications.install	2011-06-22 16:57:30.590105100 -0400
+++ screamwork_fbss7/submodules/fbss_notifications/fbss_notifications.install	1969-12-31 19:00:00.000000000 -0500
@@ -1,14 +0,0 @@
-<?php
-
-/**
- * @file
- *   (Un)installs the Facebook-style Statuses Notifications module.
- */
-
-/**
- * Implementation of hook_uninstall().
- */
-function fbss_notifications_uninstall() {
-  variable_del('fbss_notifications_type');
-  variable_del('fbss_notifications_link');
-}
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/fbss_notifications/fbss_notifications.module screamwork_fbss7/submodules/fbss_notifications/fbss_notifications.module
--- facebook_status_6_3/submodules/fbss_notifications/fbss_notifications.module	2011-06-27 06:10:14.235816300 -0400
+++ screamwork_fbss7/submodules/fbss_notifications/fbss_notifications.module	1969-12-31 19:00:00.000000000 -0500
@@ -1,626 +0,0 @@
-<?php
-
-/**
- * @file
- *   Integrates Notifications with Facebook-style Statuses.
- */
-
-// Max number of elements per page for user account tabs
-define('FBSS_NOTIFICATIONS_PAGER', 20);
-
-/**
- * Implementation of hook_menu().
- */
-function fbss_notifications_menu() {
-  $items = array();
-  $items['admin/messaging/notifications/status'] = array(
-    'title' => 'Status subscriptions',
-    'type' => MENU_LOCAL_TASK,
-    'page callback' => 'drupal_get_form',
-    'page arguments' => array('fbss_notifications_settings_form'),
-    'access arguments' => array('administer site configuration'),
-    'file' => 'fbss_notifications.pages.inc',
-  );
-  $items['user/%user/notifications/status'] = array(
-    'type' => MENU_LOCAL_TASK,
-    'access arguments' => array('maintain own subscriptions'),
-    'title' => 'Status threads',
-    'page callback' => 'fbss_notifications_page_thread',
-    'page arguments' => array(1),
-    'weight' => 10,
-    'file' => 'fbss_notifications.pages.inc',
-  );
-  foreach (facebook_status_all_contexts() as $type => $info) {
-    $items['user/%user/notifications/'. $type .'-stream'] = array(
-      'type' => MENU_LOCAL_TASK,
-      'access callback' => FALSE,
-      'title' => $info['title'] .' statuses',
-      'page callback' => 'fbss_notifications_page_type',
-      'pàge arguments' => array(1),
-      'weight' => 30,
-      'file' => 'fbss_notifications.pages.inc',
-    );
-  }
-  $items['fbss_notifications/autocomplete'] = array(
-    'title' => 'Recipient autocomplete callback',
-    'type' => MENU_CALLBACK,
-    'page callback' => 'fbss_notifications_autocomplete_recipient',
-    'access arguments' => array('access user profiles'),
-    'file' => 'fbss_notifications.pages.inc',
-  );
-  return $items;
-}
-
-/**
- * Implementation of hook_perm().
- */
-function fbss_notifications_perm() {
-  $perms = array('subscribe to a status stream');
-  if (module_exists('fbss_comments')) {
-    $perms[] = 'subscribe to comments on a status';
-  }
-  return $perms;
-}
-
-/**
- * Implementation of hook_facebook_status_delete().
- */
-function fbss_notifications_facebook_status_delete($status) {
-  db_query("
-    DELETE {notifications}, {notifications_fields}
-    FROM {notifications} n
-    INNER JOIN {notifications_fields} f
-      ON n.sid = f.sid
-    WHERE
-      (n.event_type = 'status' AND f.intval = %d) OR
-      (n.event_type = 'stream' AND f.intval = %d)
-  ", $status->sid, $status->recipient);
-}
-
-/**
- * Implementation of hook_facebook_status_save().
- */
-function fbss_notifications_facebook_status_save($status, $context, $edit, $options) {
-  global $user;
-  foreach (array('status', 'stream') as $event_type) {
-    if (empty($options['has attachment'])) {
-      $self = ($status->type == 'user' && $status->sender == $status->recipient);
-      if ($edit) {
-        if ($self) {
-          $event = array(
-            'uid' => $status->sender,
-            'created' => $status->created,
-            'module' => 'fbss_notifications',
-            'oid' => $status->sid,
-            'type' => $event_type,
-            'action' => 'update-self',
-            'params' => array('sid' => $status->sid, 'recipient' => $status->recipient, 'type' => $status->type),
-          );
-          notifications_event($event);
-        }
-        else {
-          $event = array(
-            'uid' => $status->sender,
-            'created' => $status->created,
-            'module' => 'fbss_notifications',
-            'oid' => $status->sid,
-            'type' => $event_type,
-            'action' => 'update-other',
-            'params' => array('sid' => $status->sid, 'recipient' => $status->recipient, 'type' => $status->type),
-          );
-          notifications_event($event);
-        }
-      }
-      else {
-        if (module_exists('notifications_autosubscribe')) {
-          if (notifications_user_setting('auto', $user)) {
-            $has_subscription = notifications_user_get_subscriptions($user->uid, $event_type, 'sid', $status->sid);
-            if (!$has_subscription) {
-              $subscription = array(
-                'uid' => $user->uid,
-                'type' => 'status',
-                'event_type' => $event_type,
-                'fields' => array('sid' => $status->sid),
-              );
-              notifications_save_subscription($subscription);
-            }
-          }
-        }
-        if ($self) {
-          $event = array(
-            'uid' => $status->sender,
-            'created' => $status->created,
-            'module' => 'fbss_notifications',
-            'oid' => $status->sid,
-            'type' => $event_type,
-            'action' => 'create-self',
-            'params' => array('sid' => $status->sid, 'recipient' => $status->recipient, 'type' => $status->type),
-          );
-          notifications_event($event);
-        }
-        else {
-          $event = array(
-            'uid' => $status->sender,
-            'created' => $status->created,
-            'module' => 'fbss_notifications',
-            'oid' => $status->sid,
-            'type' => $event_type,
-            'action' => 'create-other',
-            'params' => array('sid' => $status->sid, 'recipient' => $status->recipient, 'type' => $status->type),
-          );
-          notifications_event($event);
-        }
-      }
-    }
-  }
-}
-
-/**
- * Implementation of hook_fbss_comments_after_save().
- */
-function fbss_notifications_fbss_comments_after_save($comment, $edit) {
-  if (!$edit) {
-    $event = array(
-      'uid' => $comment->uid,
-      'created' => $comment->created,
-      'module' => 'fbss_notifications',
-      'oid' => $comment->sid,
-      'type' => 'status',
-      'action' => 'comment',
-      'params' => array('sid' => $comment->sid),
-    );
-    notifications_event($event);
-    if (module_exists('notifications_autosubscribe')) {
-      global $user;
-      if (notifications_user_setting('auto', $user)) {
-        $has_subscription = notifications_user_get_subscriptions($user->uid, 'status', 'sid', $comment->sid);
-        if (!$has_subscription) {
-          $subscription = array(
-            'uid' => $user->uid,
-            'type' => 'status',
-            'event_type' => 'status',
-            'fields' => array('sid' => $comment->sid),
-          );
-          notifications_save_subscription($subscription);
-        }
-      }
-    }
-  }
-}
-
-/**
- * Implementation of hook_notifications().
- */
-function fbss_notifications_notifications($op, &$arg0 = NULL, $arg1 = NULL, $arg2 = NULL) {
-  switch ($op) {
-    case 'subscription types': // Kinds of subscriptions a user can add, e.g. "Subscribe to thread" and "Subscribe to stream"
-      $types = array();
-      if (module_exists('fbss_comments')) {
-        $types['status'] = array( // 'status' is $subscription->type
-          'event_type' => 'status', // 'status' is $subscription->event_type
-          'title' => t('Status thread'),
-          'access' => "subscribe to a user's status updates",
-          'page callback' => 'fbss_notifications_page_thread',
-          'user page' => 'user/%user/notifications/status',
-          'fields' => array('sid'),
-          'description' => t('Subscribe to comments on this status.'),
-          'disabled' => in_array('status', array_values(variable_get('fbss_notifications_type', array()))),
-        );
-      }
-      foreach (facebook_status_all_contexts() as $type => $info) {
-        $types[$type .'-stream'] = array( // $type-stream is $subscription->type
-          'event_type' => 'stream', // 'stream' is $subscription->event_type
-          'title' => t('!type status stream', array('!type' => $info['title'])),
-          'access' => "subscribe to an entity's status stream",
-          'page callback' => 'fbss_notifications_page_type',
-          'user page' => 'user/%user/notifications/'. $type .'-stream',
-          'fields' => array('recipient', 'fs_type'),
-          'description' => t('Subscribe to this stream of statuses.'),
-          'disabled' => in_array($type .'-stream', array_values(variable_get('fbss_notifications_type', array()))),
-        );
-      }
-      return $types;
-    case 'names': // Determine the administrative name of a subscription and store it in the subscription's "names" attribute
-      $subs = &$arg0;
-      if ($subs->event_type == 'status' || $subs->event_type == 'stream') {
-        $subs->type_name = t('Statuses');
-        if (!empty($subs->fields['recipient']) && (!empty($subs->fields['type']) || !empty($subs->fields['fs_type']))) {
-          $type = empty($subs->fields['fs_type']) ? $subs->fields['type'] : $subs->fields['fs_type'];
-          $context = facebook_status_determine_context($type);
-          $recipient = $context['handler']->load_recipient($subs->fields['recipient']);
-          $subs->names['recipient'] = t('Status stream: @name', array('@name' => $context['handler']->recipient_name($recipient)));
-        }
-        if (!empty($subs->fields['sid']) || !empty($subs->fields['fs_sid'])) {
-          $sid = empty($subs->fields['fs_sid']) ? $subs->fields['sid'] : $subs->fields['fs_sid'];
-          $status = facebook_status_load($sid);
-          $message = $status->message;
-          // 100 is an arbitrary length.
-          if (drupal_strlen($message) > 100) {
-            // "\xE2\x80\xA6" is the unicode escape sequence for the HTML entity &hellip; (an ellipsis)
-            $message = drupal_substr($message, 0, 99) ."\xE2\x80\xA6";
-          }
-          $subs->names['type'] = t('Status thread: @message', array('@message' => $message));
-        }
-      }
-      break;
-    case 'subscription fields': // Describe important properties of an object a subscription may be against.
-                                // Used to get info about the fields used in queries, not to actually build queries.
-                                // Also used to display options for adding an arbitrary subscription.
-      $fields = array();
-      $fields['sid'] = array(
-        'name' => t('Status ID'),
-        'field' => 'sid',
-        'type' => 'int',
-      );
-      module_load_include('inc', 'fbss_notifications', 'fbss_notifications.pages');
-      $fields['recipient'] = array(
-        'name' => t('Stream owner'), // Basically Recipient, but that doesn't make sense to the user in context
-        'field' => 'recipient',
-        'type' => 'int',
-        'autocomplete path' => 'fbss_notifications/autocomplete',
-        'autocomplete callback' => 'fbss_notifications_recipient_name_callback',
-        'format callback' => 'fbss_notifications_author_name',
-        'value callback' => 'fbss_notifications_author_uid',
-      );
-      $fields['fs_type'] = array(
-        'name' => t('Stream type'),
-        'field' => 'fs_type',
-        'type' => 'string',
-        'options callback' => 'fbss_notifications_types_callback',
-      );
-      return $fields;
-    case 'event load': // Load the objects relevant to an event and store them in the event object. Called before sending messages in order to evaluate tokens in the message templates, so objects' keys should correspond to token types.
-      $event = &$arg0;
-      if ($event->type == 'status' || $event->type == 'stream') { // $event->type is the same as $subscription->event_type
-        if (!empty($event->params['recipient']) && (!empty($event->params['type']) || !empty($event->params['fs_type']))) {
-          $type = empty($event->params['fs_type']) ? $event->params['type'] : $event->params['fs_type'];
-          $event->objects['context'] = facebook_status_determine_context($type);
-          if (!empty($event->objects['context'])) {
-            $event->objects['recipient'] = $event->objects['context']['handler']->load_recipient($subs->fields['recipient']);
-          }
-        }
-        if (!empty($event->params['sid'])) {
-          $event->objects['facebook_status'] = facebook_status_load($event->params['sid']);
-          if (empty($event->objects['facebook_status'])) {
-            $event->delete = TRUE;
-          }
-        }
-      }
-      break;
-    case 'event types': // Define the events that can trigger a status-related notification
-      $types = array();
-      foreach (array('status', 'stream') as $type) {
-        $types[] = array(
-          'type' => $type,
-          'action' => 'create-self',
-          'name' => t('@type: A user has saved a new status update', array('@type' => $type)),
-          'line' => t('[sender-name] [message-unformatted]'),
-          'digest' => array('facebook_status', 'recipient'),
-          'description' => t('Personal status creation'),
-        );
-        $types[] = array(
-          'type' => $type,
-          'action' => 'update-self',
-          'name' => t('@type: A user has edited their status', array('@type' => $type)),
-          'line' => t('[sender-name] [message-unformatted]'),
-          'digest' => array('facebook_status', 'recipient'),
-          'description' => t('Personal status update'),
-        );
-        $types[] = array(
-          'type' => $type,
-          'action' => 'create-other',
-          'name' => t('@type: A user has sent a new status message', array('@type' => $type)),
-          'line' => t("[sender-name] \xE2\x80\xA6 [recipient-name]: [message-unformatted]"),
-          'digest' => array('facebook_status', 'recipient'),
-          'description' => t('New status message sent'),
-        );
-        $types[] = array(
-          'type' => $type,
-          'action' => 'update-other',
-          'name' => t('@type: A user has edited their status', array('@type' => $type)),
-          'line' => t('[sender-name] [message-unformatted]'),
-          'digest' => array('facebook_status', 'recipient'),
-          'description' => t('Status message edited'),
-        );
-      }
-      $types[] = array(
-        'type' => 'status',
-        'action' => 'status comment',
-        'name' => t('@type: A user has commented on a status', array('@type' => $type)),
-        'line' => t('[commenter-name] wrote [message-unformatted] at [status-url]'),
-        'digest' => array('facebook_status', 'sid'),
-        'description' => t('Status comment'),
-      );
-      return $types;
-    case 'query': // Describe which field values identify an object so that Notifications can detect whether a subscription exists for it
-      $op = $arg0; // Either 'user' or 'event'
-      $event_type = $arg1;
-      $object = $arg2; // the event object if $op == 'event', or the status/node/comment object if $op == 'user'
-      if ($event_type == 'status' && (($op == 'event' && $status = facebook_status_load($object->params['sid'])) || ($op == 'user' && $status = $object))) { // status
-        $query = array();
-        $query[]['fields'] = array(
-          'sid' => $status->sid,
-        );
-        return $query;
-      }
-      elseif ($event_type == 'stream' && $op == 'event' && !empty($object->params['type']) && !empty($object->params['recipient'])) { // stream
-        $query = array();
-        $query[]['fields'] = array(
-          'recipient' => $object->params['recipient'],
-          'type' => $object->params['type'],
-          'fs_type' => $object->params['type'],
-        );
-        return $query;
-      }
-      // elseif ($event_type == 'stream' && $op == 'user' && $recipient = $object) {} // This case never happens.
-      break;
-    case 'user options': // Describe the links that should show up on the user for subscribing to their stream
-      // $arg0 == $account, $arg1 == $recipient
-      $options = array();
-      if (in_array('user', array_values(variable_get('fbss_notifications_link', array('user' => 'user', 'node' => 0, 'og' => 'og'))))) {
-        $options[] = array(
-          'name' => t('All status updates by @name', array('@name' => $arg1->name)),
-          'type' => 'user-stream',
-          'fields' => array('recipient' => $arg1->uid, 'type' => 'user'),
-        );
-      }
-      return $options;
-    case 'node options': // Describe the links that should show up on the node for subscribing to its stream
-      // $arg0 == $account, $arg1 == $node
-      $options = array();
-      if (in_array('node', array_values(variable_get('fbss_notifications_link', array('user' => 'user', 'node' => 0, 'og' => 'og'))))) {
-        $options[] = array(
-          'name' => t('All status updates on %name', array('@name' => $arg1->title)),
-          'type' => 'node-stream',
-          'fields' => array('recipient' => $arg1->nid, 'type' => 'node'),
-        );
-      }
-      elseif (module_exists('og') && in_array('og', array_values(variable_get('fbss_notifications_link', array('user' => 'user', 'node' => 0, 'og' => 'og'))))) {
-        if (db_result(db_query("SELECT nid FROM {og} WHERE nid = %d", $arg1->nid))) {
-          $options[] = array(
-            'name' => t('All status updates on %name', array('@name' => $arg1->title)),
-            'type' => 'node-stream',
-            'fields' => array('recipient' => $arg1->nid, 'type' => 'node'),
-          );
-        }
-      }
-      return $options;
-    case 'access':
-      $op = $arg0;
-      $account = &$arg1;
-      $object = &$arg2; // the event object if $op == 'event' and the subscription object if $op = 'subscription'
-      $access = TRUE;
-      // For events we check that node and comment are allowed
-      if ($op == 'event' && ($object->type == 'status' || $object->type == 'stream')) {
-        if (!empty($object->objects['recipient'])) { // stream
-          $access = facebook_status_user_access('view_stream', $recipient, $object->objects['context']['handler']->type(), $account);
-          $access = $access && user_access('subscribe to a status stream');
-        }
-        elseif (!empty($object->objects['status'])) { // status
-          $access = facebook_status_user_access('view', $object->objects['status'], $account);
-          $access = $access && user_access('subscribe to comments on a status');
-        }
-      }
-      elseif ($op == 'subscription') {
-        if (!empty($object->fields['recipient'])) { // stream
-          $type = empty($object->fields['fs_type']) ? $object->fields['type'] : $object->fields['fs_type'];
-          $context = facebook_status_determine_context($type);
-          $recipient = $context['handler']->load_recipient($object->fields['recipient']);
-          $access = facebook_status_user_access('view_stream', $recipient, $context['handler']->type(), $account);
-          $access = $access && user_access('subscribe to a status stream');
-        }
-        elseif (!empty($object->fields['sid'])) { // status
-          if ($status = facebook_status_load($object->fields['sid'])) {
-            $access = facebook_status_user_access('view', $status, $account);
-            $access = $access && user_access('subscribe to comments on a status');
-          }
-          else {
-            $access = FALSE;
-          }
-        }
-      }
-      // We return an array that will be merged with the ones from other modules
-      return array($access);
-    case 'event objects': // Not actually called anywhere and not documented, although implemented for nodes; purpose unknown
-      return array('status' => t('Status'));
-    case 'insert': // Allows reacting when a subscription is saved. $arg0 is the subscription object.
-    case 'update': // Allows reacting when a subscription is updated. $arg0 is the subscription object.
-    case 'event trigger': // Allows modifying the event object ($arg0) when an event occurs.
-    case 'event queued': // Allows reacting when an event has been added to the notifications queue. $arg0 is the event object.
-    case 'digest methods': // Describe new digest formats. Default ones include "short" and "long."
-    default:
-      break;
-  }
-}
-
-/**
- * Implementation of hook_messaging().
- */
-function fbss_notifications_messaging($op, $arg1 = NULL, $arg2 = NULL) {
-  switch ($op) {
-    case 'message groups':
-      /**
-       * The Messaging module will search for message templates in this order:
-       *
-       * 1. $module-$type-[$event->type]-[$event->action]
-       * 2. $module-$type-[$event->type]
-       * 3. $module-$type
-       *
-       * $type is either "event" or "digest." In our case, $event->type is
-       * either "status" or "stream." $event->action must be specified when
-       * notifications_event() is called and in our case is one of
-       * create-self, create-other, update-self, update-other, and comment.
-       *
-       * Due to what I consider a bug, $module is always "notifications."
-       */
-      $info = array();
-      $info['notifications-event-stream'] = array(
-        'module' => 'fbss_notifications',
-        'name' => t('Status update notifications'),
-        'description' => t('Updates related to statuses'),
-        'fallback' => 'notifications-event',
-      );
-      $info['notifications-event-stream-create-self'] = array(
-        'module' => 'fbss_notifications',
-        'name' => t("Notifications for saving individual users' status updates"),
-        'description' => t('Notifications produced when a user saves a new status.'),
-        'fallback' => 'notifications-event-stream',
-      );
-      $info['notifications-event-stream-create-other'] = array(
-        'module' => 'fbss_notifications',
-        'name' => t('Notifications for saving status messages'),
-        'description' => t('Notifications produced when a new status message is sent.'),
-        'fallback' => 'notifications-event-stream',
-      );
-      $info['notifications-event-stream-update-self'] = array(
-        'module' => 'fbss_notifications',
-        'name' => t("Notifications for editing individual users' status updates"),
-        'description' => t('Notifications produced when a user edits one of their status updates.'),
-        'fallback' => 'notifications-event-stream',
-      );
-      $info['notifications-event-stream-update-other'] = array(
-        'module' => 'fbss_notifications',
-        'name' => t('Notifications for editing status messages'),
-        'description' => t('Notifications produced when a status message is edited.'),
-        'fallback' => 'notifications-event-stream',
-      );
-      $info['notifications-event-status-comment'] = array(
-        'module' => 'fbss_notifications',
-        'name' => t('Notifications for comments on status messages'),
-        'description' => t('Notifications produced when a user comments on a status.'),
-        'fallback' => 'notifications-event-stream',
-      );
-      $info['notifications-digest-status'] = array(
-        'module' => 'fbss_notifications',
-        'name' => t('Group digests per status'),
-        'description' => t('Group of events digested for each status.'),
-        'fallback' => 'notifications-digest',
-      );
-      $info['notifications-digest-stream'] = array(
-        'module' => 'fbss_notifications',
-        'name' => t('Group digests per status stream'),
-        'description' => t('Group of events digested for each status stream.'),
-        'fallback' => 'notifications-digest',
-      );
-      return $info;
-    case 'message keys':
-      switch ($arg1) {
-        case 'notifications-event-stream':
-        case 'notifications-event-stream-create-self':
-        case 'notifications-event-stream-create-other':
-        case 'notifications-event-stream-update-self':
-        case 'notifications-event-stream-update-other':
-        case 'notifications-event-status-comment':
-          return array(
-            'subject' => t('Subject'),
-            'main' => t('Content'),
-            'digest' => t('Digest line'),
-          );
-        case 'notifications-digest-status':
-        case 'notifications-digest-stream':
-          return array(
-            'title' => t('Group title'),
-            'closing' => t('Group footer'),
-          );
-      }
-      break;
-
-    case 'messages':
-      switch ($arg1) {
-        case 'notifications-event-stream':
-          return array(
-            'subject' => t('A status to which you are subscribed has been updated'),
-            'main' => array(
-              t('A status to which you are subscribed has been updated:'),
-              '[status-themed]',
-              t('Read more and respond at [status-url]'),
-            ),
-            'digest' => array(
-              '[status-themed]',
-              t('Read more at [status-url]'),
-            ),
-          );
-        case 'notifications-event-stream-create-self':
-          return array(
-            'subject' => t('[sender-name-raw] has a new status: [message-raw]'),
-            'main' => array(
-              t('[sender-name-raw] has a new status update:'),
-              '[status-themed]',
-              t('Read more and respond at [status-url]'),
-            ),
-            'digest' => array(
-              '[status-themed]',
-              t('Read more at [status-url]'),
-            ),
-          );
-        case 'notifications-event-stream-create-other':
-          return array(
-            //"\xC2\xBB" is the unicode escape sequence for the HTML entity &raquo; (a double right angle bracket)
-            'subject' => t('[sender-name-raw] \xC2\xBB [recipient-name-raw]: [message-raw]'),
-            'main' => array(
-              t('[sender-name-raw] sent a new status message to [recipient-name-raw]:'),
-              '[status-themed]',
-              t('Read more and respond at [status-url]'),
-            ),
-            'digest' => array(
-              '[status-themed]',
-              t('Read more at [status-url]'),
-            ),
-          );
-        case 'notifications-event-stream-update-self':
-          return array(
-            'subject' => t('[sender-name-raw] edited their status: [message-raw]'),
-            'main' => array(
-              t('[sender-name-raw] edited their status:'),
-              '[status-themed]',
-              t('Read more and respond at [status-url]'),
-            ),
-            'digest' => array(
-              '[status-themed]',
-              t('Read more at [status-url]'),
-            ),
-          );
-        case 'notifications-event-stream-update-other':
-          return array(
-            'subject' => t('[sender-name-raw] edited a status message to [recipient-name-raw]'),
-            'main' => array(
-              t('[sender-name-raw] edited their status message to [recipient-name-raw]:'),
-              '[status-themed]',
-              t('Read more and respond at [status-url]'),
-            ),
-            'digest' => array(
-              '[status-themed]',
-              t('Read more at [status-url]'),
-            ),
-          );
-        case 'notifications-event-status-comment':
-          return array(
-            'subject' => t('[commenter-name] commented on a status message'),
-            'main' => array(
-              t('[commenter-name] commented on a status:'),
-              '[message-unformatted]',
-              t('Read more and respond at [status-url]'),
-            ),
-            'digest' => array(
-              '[status-themed]',
-              t('Read more at [status-url]'),
-            ),
-          );
-        case 'notifications-digest-status':
-          return array(
-            'title' => t('Updates for [sender-name-raw]'),
-            'closing' => t('Read more at [sender-themed]'),
-          );
-        case 'notifications-digest-stream':
-          return array(
-            'title' => t('Updates for [recipient-name-raw]'),
-            'closing' => t('Read more at [recipient-link]'),
-          );
-      }
-      break;
-    case 'tokens':
-      return array('facebook_status');
-    default:
-      break;
-  }
-}
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/fbss_notifications/fbss_notifications.pages.inc screamwork_fbss7/submodules/fbss_notifications/fbss_notifications.pages.inc
--- facebook_status_6_3/submodules/fbss_notifications/fbss_notifications.pages.inc	2011-06-24 18:05:16.757804100 -0400
+++ screamwork_fbss7/submodules/fbss_notifications/fbss_notifications.pages.inc	1969-12-31 19:00:00.000000000 -0500
@@ -1,357 +0,0 @@
-<?php
-
-/**
- * @file
- *   Page callbacks and functions for the Facebook-style Statuses Notifications module.
- */
-
-//================
-// MENU CALLBACKS
-//================
-
-/**
- * Page callback for admin/settings/notifications/status.
- * Display global settings for what subscriptions are enabled and where they are displayed.
- */
-function fbss_notifications_settings_form($form) {
-  $form = array();
-  $options = _notifications_subscription_types('long', array('event_type' => 'status')) + _notifications_subscription_types('long', array('event_type' => 'stream'));
-  $form['fbss_notifications_type'] = array(
-    '#type' => 'checkboxes',
-    '#title' => t('Global options'),
-    '#options' => $options,
-    '#default_value' => variable_get('fbss_notifications_type', array()),
-    '#description' => t('Define the available subscription types that will be enabled globally'),
-  );
-  $options = array('user' => t('User profiles'), 'node' => t('Nodes'));
-  if (module_exists('og')) {
-    $options['og'] = t('Organic groups');
-  }
-  $form['fbss_notifications_links'] = array(
-    '#type' => 'checkboxes',
-    '#title' => t('Show "subscribe to status messages" links on these entities'),
-    '#options' => $options,
-    '#default_value' => variable_get('fbss_notifications_links', array('user' => 'user', 'node' => 0, 'og' => 'og')),
-  );
-  return system_settings_form($form);
-}
-
-/**
- * Page callback for user/%user/notifications/status.
- * List status subscriptions.
- *
- * 'type' is 'status', analogous to 'thread'
- * 'event_type' is 'status', analogous to 'node'
- */
-function fbss_notifications_page_thread($account = NULL) {
-  if (empty($account)) {
-    $account = $GLOBALS['user'];
-  }
-  // query string for status subscriptions
-  $result = pager_query("
-    SELECT
-      n.sid, n.uid, n.type, n.event_type, n.conditions, n.send_interval, n.send_method, n.cron, n.module, n.status, n.destination,
-      nf.value AS nf_sid,
-      fs.sid as fs_sid, fs.sender, fs.recipient, fs.type as fs_type, fs.message, fs.created
-    FROM {notifications} n
-    INNER JOIN {notifications_fields} nf
-      ON n.sid = nf.sid
-    LEFT JOIN {facebook_status} fs
-      ON nf.intval = fs.sid
-    WHERE
-      n.uid = %d AND
-      n.type = 'status' AND
-      n.event_type = 'status' AND
-      n.conditions = 1 AND
-      nf.field = 'sid'
-    ORDER BY
-      fs.type ASC,
-      fs.sid DESC
-  ", FBSS_NOTIFICATIONS_PAGER, 0, NULL, $account->uid);
-  $subscriptions = $list = array();
-  $content_types = facebook_status_all_contexts();
-  while ($sub = db_fetch_object($result)) {
-    $subscriptions[$sub->sid] = $sub;
-    $message = $sub->message;
-    // 100 is an arbitrary length.
-    if (drupal_strlen($message) > 100) {
-      // "\xE2\x80\xA6" is the unicode escape sequence for the HTML entity &hellip; (an ellipsis)
-      $message = drupal_substr($message, 0, 99) ."\xE2\x80\xA6";
-    }
-    $list[$sub->fs_sid] = '['. $content_types[$sub->fs_type]['title'] .'] '. l($message, 'statuses/'. $sub->fs_sid);
-  }
-  if (empty($subscriptions)) {
-    $output = t('You are not currently subscribed to any active threads');
-  }
-  else {
-    $output = t('You are currently subscribed to the following threads:');
-    $defaults = array('type' => 'status', 'event_type' => 'status');
-    $options = array('title' => t('Message'));
-    $output .= drupal_get_form('notifications_user_form', $account, 'status', $subscriptions, $list, $defaults, $options);
-    $output .= theme('pager', NULL, FBSS_NOTIFICATIONS_PAGER);
-  }
-  return $output;
-}
-
-/**
- * Page callback for user/%user/notifications/status-$type.
- * List stream subscriptions.
- *
- * 'type' is arg(3), analogous to 'author'
- * 'event_type' is 'status', analogous to 'node'
- */
-function fbss_notifications_page_type($account = NULL) {
-  if (empty($account)) {
-    $account = $GLOBALS['user'];
-  }
-  $type = drupal_substr(arg(3), 0, -7); // $status->type
-  if (!empty($type)) {
-    $context = facebook_status_determine_context($type);
-  }
-  else {
-    return NULL;
-  }
-  // List all author subscriptions and build author list with the same query
-  $subscriptions = $list = array();
-  $result = pager_query("
-    SELECT
-      n.sid as sub_id, n.uid, n.type, n.event_type, n.conditions, n.send_interval, n.send_method, n.cron, n.module, n.status, n.destination,
-      f.intval,
-      fs.sid as fs_sid, fs.sender, fs.recipient, fs.type as fs_type, fs.message, fs.created
-    FROM {notifications} n
-    INNER JOIN {notifications_fields} f ON f.sid = n.sid
-    LEFT JOIN {facebook_status} fs ON fs.sid = f.intval
-    WHERE n.uid = %d AND n.type = '%s' AND n.event_type = 'stream'
-  ", FBSS_NOTIFICATIONS_PAGER, 0, NULL, $account->uid, arg(3));
-  while ($sub = db_fetch_object($result)) {
-    $recipient = $context['handler']->load_recipient($sub->recipient);
-    $list[$sub->recipient] = $context['handler']->recipient_link($recipient);
-    $sub->fields['recipient'] = $sub->intval;
-    $sub->fields['fs_type'] = $type;
-    $sub->fields['fs_sid'] = $sub->fs_sid;
-    $sub->fields['message'] = $sub->message;
-    $subscriptions[$sub->sid] = $sub;
-  }
-  if (empty($subscriptions)) {
-    $output = t('There are no active !type subscriptions.', array('!type' => $context['title']));
-  }
-  else {
-    $defaults = array('type' => arg(3), 'event_type' => 'status');
-    $options = array('title' => t('Subscribed to'));
-    $output = drupal_get_form('notifications_user_form', $account, arg(3), $subscriptions, $list, $defaults, $options);
-    $output .= theme('pager', NULL, FBSS_NOTIFICATIONS_PAGER);
-  }
-  return $output;
-}
-
-//==================
-// OPTION CALLBACKS
-//==================
-
-/**
- * Callback for the "Recipient type" option on the "add subscription" form.
- */
-function fbss_notifications_types_callback() {
-  $types = array();
-  foreach (facebook_status_all_contexts() as $type => $info) {
-    $types[$type] = $info['title'];
-  }
-  if (arg(0) == 'user' && is_numeric(arg(1)) && arg(2) == 'notifications' && arg(3) == 'add') {
-    $type = drupal_substr(arg(4), 0, -7);
-    if (isset($types[$type])) {
-      return array($type => $types[$type]);
-    }
-  }
-  return $types;
-}
-
-/**
- * Autocompletes recipient names.
- */
-function fbss_notifications_autocomplete_recipient($string = '') {
-  /**
-   * Each implementation should return an array like this:
-   * array(
-   *   'stream_type' => array(
-   *     'raw_value_list' => 'HTML_safe_value',
-   *     'raw_value_list, raw_value_list_2' => 'HTML_safe_value_2',
-   *     ...
-   *   ),
-   *   ...
-   * );
-   * Technically there's no reason for this to support multiple-autocomplete,
-   * but it can't hurt to have that capability.
-   */
-  $results = module_invoke_all('fbss_notifications_autocomplete_recipient', $string);
-  $count = count($results);
-  if ($count > 10) {
-    $matches = $results['user'];
-  }
-  else {
-    $total = 0;
-    $matches = array();
-    foreach ($results as $type => $values) {
-      for ($i = 0; (($i <= 10 / $count && $total <= 10) || $i < 2) && $i < count($values); $i++) {
-        $vals = array_values($values);
-        $keys = array_keys($values);
-        $matches[$keys[$i]] = $vals[$i];
-        $total++;
-      }
-    }
-  }
-  drupal_json($matches);
-}
-
-/**
- * Given a recipient ID and a subscription type, returns the HTML-safe recipient name.
- */
-function fbss_notifications_recipient_name_callback($id, $subs_type = '') {
-  fbss_notifications_author_name($id, FALSE, $subs_type);
-}
-
-/**
- * Given a recipient ID and a subscription type, returns the recipient name.
- */
-function fbss_notifications_author_name($id, $html = FALSE, $subs_type = '') {
-  if (!empty($subs_type)) {
-    $type = drupal_substr($subs_type, -7);
-    $context = facebook_status_determine_context($type);
-    if (!empty($context)) {
-      $recipient = $context['handler']->load_recipient($id);
-      return $html ? $context['handler']->recipient_link($recipient) : $context['handler']->recipient_name($recipient);
-    }
-  }
-}
-
-/**
- * Given a recipient name and a subscription type, returns the recipient ID.
- */
-function fbss_notifications_author_uid($name, $field, $subs_type = '') {
-  if (!empty($subs_type)) {
-    $type = drupal_substr($subs_type, -7);
-    foreach (facebook_status_all_contexts() as $type => $info) {
-      if (isset($info['name to ID callback']) && function_exists($info['name to ID callback'])) {
-        $id = call_user_func($info['name to ID callback'], $name, $type);
-        if (!empty($id)) {
-          return $id;
-        }
-      }
-      switch ($type) {
-        case 'og':
-        case 'node':
-          return db_result(db_query_range("SELECT nid FROM {node} WHERE title = '%s'", $name, 0, 1));
-        case 'user':
-          return db_result(db_query_range("SELECT uid FROM {users} WHERE name = '%s'", $name, 0, 1));
-        case 'term':
-          if (module_exists('taxonomy')) {
-            return db_result(db_query_range("SELECT tid FROM {term_data} WHERE name = '%s'", $name, 0, 1));
-          }
-      }
-    }
-  }
-  if ($field) {
-    form_set_error($field, t('Stream not found.'));
-  }
-}
-
-//======================
-// HOOK IMPLEMENTATIONS
-//======================
-
-/**
- * Implementation of hook_fbss_notifications_autocomplete_recipient().
- */
-function fbss_notifications_fbss_notifications_autocomplete_recipient($string) {
-  $orig_string = $string;
-  $array = drupal_explode_tags($string);
-  $string = trim(array_pop($array));
-  if (empty($string)) {
-    return array();
-  }
-  $prefix = count($array) ? implode(', ', $array) . ', ' : '';
-  global $user;
-  $matches = array();
-
-  // Users.
-  $matches['user'] = array();
-  $result = db_query_range("SELECT name FROM {users} WHERE LOWER(name) LIKE LOWER('%s%%')", $string, 0, 10);
-  while ($account = db_fetch_object($result)) {
-    $key = $prefix . _fbss_notifications_autocomplete_key_helper($account->name);
-    $matches['user'][$key] = check_plain($account->name);
-  }
-
-  // Organic groups.
-  if (module_exists('og')) {
-    $matches['og'] = array();
-    $result = db_query_range(db_rewrite_sql("
-      SELECT n.nid, n.title
-      FROM {og_uid} ou
-        LEFT JOIN {og} og
-          ON ou.nid = og.nid
-        LEFT JOIN {node} n
-          ON og.nid = n.nid
-      WHERE
-        LOWER(n.title) LIKE LOWER('%s%%') AND
-        (og.og_private = 0 OR ou.uid = %d) AND
-        n.status = 1
-    "), $string, $user->uid, 0, 10);
-    while ($node = db_fetch_object($result)) {
-      $key = $prefix . _fbss_notifications_autocomplete_key_helper($node->title);
-      $matches['og'][$key] = check_plain($node->title);
-    }
-  }
-
-  $matches['node'] = array();
-  if (module_exists('og')) {
-    $result = db_query_range(db_rewrite_sql("
-      SELECT n.nid, n.title
-      FROM {node} n
-        LEFT JOIN {og} o
-          ON n.nid = og.nid
-      WHERE
-        og.nid IS NULL AND
-        n.status = 1 AND
-        LOWER(n.title) LIKE LOWER('%s%%')
-    "), $string, 0, 10);
-  }
-  else {
-    $result = db_query_range(db_rewrite_sql("
-      SELECT nid, title
-      FROM {node}
-      WHERE
-        status = 1 AND
-        LOWER(title) LIKE LOWER('%s%%')
-    "), $string, 0, 10);
-  }
-  while ($node = db_fetch_object($result)) {
-    $key = $prefix . _fbss_notifications_autocomplete_key_helper($node->title);
-    $matches['node'][$key] = check_plain($node->title);
-  }
-
-  // Taxonomy terms.
-  if (module_exists('taxonomy') && module_exists('facebook_status_tags') && variable_get('facebook_status_tags_vid', -1) != -1) {
-    $matches['term'] = array();
-    $result = db_query_range("SELECT name FROM {facebook_status_tags} WHERE LOWER(name) LIKE LOWER('%s%%')", $string, 0, 10);
-    while ($term = db_fetch_object($result)) {
-      $key = $prefix . _fbss_notifications_autocomplete_key_helper($term->name);
-      $matches['node'][$key] = check_plain($term->name);
-    }
-  }
-
-  return $matches;
-}
-
-//==================
-// HELPER FUNCTIONS
-//==================
-
-/**
- * Specially encodes autocomplete key strings.
- */
-function _fbss_notifications_autocomplete_key_helper($string) {
-  // @see taxonomy_autocomplete()
-  if (strpos($string, ',') !== FALSE || strpos($string, '"') !== FALSE) {
-    $string = '"' . str_replace('"', '""', $string) . '"';
-  }
-  return $string;
-}
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/fbss_pathauto/fbss_pathauto.info screamwork_fbss7/submodules/fbss_pathauto/fbss_pathauto.info
--- facebook_status_6_3/submodules/fbss_pathauto/fbss_pathauto.info	2011-04-09 19:23:26.593620600 -0400
+++ screamwork_fbss7/submodules/fbss_pathauto/fbss_pathauto.info	2011-05-25 20:53:28.000000000 -0400
@@ -5,2 +5,3 @@ dependencies[] = facebook_status
 dependencies[] = pathauto
-core = 6.x
\ No newline at end of file
+core = 7.x
+files[] = fbss_pathauto.module
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/fbss_pathauto/fbss_pathauto.module screamwork_fbss7/submodules/fbss_pathauto/fbss_pathauto.module
--- facebook_status_6_3/submodules/fbss_pathauto/fbss_pathauto.module	2011-06-02 10:49:28.126148400 -0400
+++ screamwork_fbss7/submodules/fbss_pathauto/fbss_pathauto.module	2011-05-25 20:53:28.000000000 -0400
@@ -8,6 +8,8 @@
 /**
- * Implementation of hook_facebook_status_delete().
+ * Implements hook_facebook_status_delete().
  */
-function fbss_pathauto_facebook_status_delete($status) {
-  db_query("DELETE FROM {url_alias} WHERE src = 'statuses/%d'", $status->sid);
+function fbss_pathauto_facebook_status_delete($sid) {
+  db_delete('url_alias')
+	  ->condition('source', $sid)
+	  ->execute();
 }
@@ -15,3 +17,3 @@ function fbss_pathauto_facebook_status_d
 /**
- * Implementation of hook_facebook_status_save().
+ * Implements hook_facebook_status_save().
  */
@@ -32,3 +34,3 @@ function fbss_pathauto_facebook_status_s
 /**
- * Implementation of hook_pathauto().
+ * Implements hook_pathauto().
  */
@@ -69,3 +71,3 @@ function fbss_pathauto_pathauto($op) {
 /**
- * Implementation of hook_pathauto_bulkupdate().
+ * Implements hook_pathauto_bulkupdate().
  * Inspired by the node implementation in pathauto_node.inc.
@@ -97,5 +99,10 @@ function fbss_pathauto_pathauto_bulkupda
       WHERE alias.src IS NULL";
-    $result = db_query_range($query, 0, variable_get('pathauto_max_bulk_update', 50));
+    // TODO Please convert this statement to the D7 database API syntax.
+    $result = db_query_range("SELECT fbss.*, alias.src, alias.dst
+      FROM {facebook_status} fbss
+      LEFT JOIN {url_alias} alias
+        ON CONCAT('statuses/', CAST(fbss.sid AS CHAR)) = alias.src
+      WHERE alias.src IS NULL");
     $placeholders = array();
-    while ($status = db_fetch_object($result)) {
+    while ($status = $result->fetchObject()) {
       // pathauto.inc should already be included.
@@ -117,3 +124,3 @@ function fbss_pathauto_pathauto_bulkupda
 /**
- * Implementation of hook_path_alias_types().
+ * Implements hook_path_alias_types().
  */
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/fbss_privacy/fbss_privacy.css screamwork_fbss7/submodules/fbss_privacy/fbss_privacy.css
--- facebook_status_6_3/submodules/fbss_privacy/fbss_privacy.css	2011-06-12 17:47:35.192069900 -0400
+++ screamwork_fbss7/submodules/fbss_privacy/fbss_privacy.css	1969-12-31 19:00:00.000000000 -0500
@@ -1,9 +0,0 @@
-.facebook-status-private-box {
-  float: right;
-}
-.facebook-status-private-box .form-item {
-  margin: 0.5em;
-}
-.facebook-status-private-text {
-  font-style: italic;
-}
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/fbss_privacy/fbss_privacy.info screamwork_fbss7/submodules/fbss_privacy/fbss_privacy.info
--- facebook_status_6_3/submodules/fbss_privacy/fbss_privacy.info	2011-06-04 16:09:09.920205400 -0400
+++ screamwork_fbss7/submodules/fbss_privacy/fbss_privacy.info	1969-12-31 19:00:00.000000000 -0500
@@ -1,5 +0,0 @@
-name = Facebook-style Statuses Private Statuses
-description = "Allows statuses between two users to be designated as private."
-dependencies[] = facebook_status
-package = Facebook-style Statuses
-core = 6.x
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/fbss_privacy/fbss_privacy.install screamwork_fbss7/submodules/fbss_privacy/fbss_privacy.install
--- facebook_status_6_3/submodules/fbss_privacy/fbss_privacy.install	2011-06-04 15:52:32.780172200 -0400
+++ screamwork_fbss7/submodules/fbss_privacy/fbss_privacy.install	1969-12-31 19:00:00.000000000 -0500
@@ -1,29 +0,0 @@
-<?php
-
-/**
- * @file
- *   (Un)installs the Facebook-style Statuses Private Statuses module.
- */
-
-/**
- * Implementation of hook_install().
- */
-function fbss_privacy_install() {
-  $ret = array();
-  db_add_field($ret, 'facebook_status', 'private', array(
-    'type' => 'int',
-    'size' => 'tiny',
-    'unsigned' => TRUE,
-    'not null' => TRUE,
-    'default' => 0,
-    'description' => 'Whether the status is private (1) or not (0).',
-  ));
-}
-
-/**
- * Implementation of hook_uninstall().
- */
-function fbss_privacy_uninstall() {
-  $ret = array();
-  db_drop_field($ret, 'facebook_status', 'private');
-}
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/fbss_privacy/fbss_privacy.module screamwork_fbss7/submodules/fbss_privacy/fbss_privacy.module
--- facebook_status_6_3/submodules/fbss_privacy/fbss_privacy.module	2011-06-12 16:58:59.349293200 -0400
+++ screamwork_fbss7/submodules/fbss_privacy/fbss_privacy.module	1969-12-31 19:00:00.000000000 -0500
@@ -1,166 +0,0 @@
-<?php
-
-/**
- * @file
- *   Allows statuses between two users to be designated as private.
- *
- * Ultimately, this module could be modified to support choosing specific
- * entities which are allowed to see a specific status update. This would be
- * done by adding a table like { sid | eid | type } where each record indicates
- * that the specified entity has access to the specified status. Then there
- * would have to be options added to the status update form to make choosing
- * specific observers possible.
- */
-
-//============
-// CORE HOOKS
-//============
-
-/**
- * Implementation of hook_perm().
- */
-function fbss_privacy_perm() {
-  return array('send private status messages', 'view all private status messages');
-}
-
-//============
-// FBSS HOOKS
-//============
-
-/**
- * Implementation of hook_form_FORM_ID_alter().
- */
-function fbss_privacy_form_facebook_status_box_alter(&$form, &$form_state) {
-  if ($form['recipient']['#value'] == $GLOBALS['user']->uid || $form['type']['#value'] != 'user' || !user_access('send private status messages')) {
-    return;
-  }
-  drupal_add_css(drupal_get_path('module', 'fbss_privacy') .'/fbss_privacy.css');
-  $form['private'] = array(
-    '#type' => 'checkbox',
-    '#title' => t('Private'),
-    '#default_value' => 0,
-    '#weight' => -24,
-    '#prefix' => '<div class="facebook-status-private-box">',
-    '#suffix' => '</div>',
-  );
-  $form['fbss-submit']['#submit'][] = 'fbss_privacy_facebook_status_box_submit';
-}
-
-/**
- * Submit callback for the Privacy checkbox.
- */
-function fbss_privacy_facebook_status_box_submit($form, $form_state) {
-  if (!empty($form_state['values']['private']) && user_access('send private status messages')) {
-    db_query("UPDATE {facebook_status} SET private = %d WHERE sid = %d", $form_state['values']['private'], $form_state['facebook_status']['sid']);
-  }
-}
-
-/**
- * Implementation of hook_facebook_status_form_ahah_alter().
- */
-function fbss_privacy_facebook_status_form_ahah_alter(&$new_form, $old_form) {
-  $new_form['private'] = $old_form['private'];
-}
-
-/**
- * Implementation of hook_facebook_status_user_access_alter().
- */
-function fbss_privacy_facebook_status_user_access_alter(&$allow, $op, $args) {
-  if ($op == 'view') {
-    $status = $args[0];
-    global $user;
-    // If the status is private and the user is not a participant and the user does not have admin access, then the user does not have access to view the status
-    if ($status->private && $user->uid != $status->sender && !($user->uid == $status->recipient && $status->type == 'user') && !user_access('send private status messages')) {
-      $allow = FALSE;
-    }
-  }
-}
-
-/**
- * Implementation of hook_preprocess_facebook_status_item().
- */
-function fbss_privacy_preprocess_facebook_status_item(&$vars) {
-  $vars['private'] = (bool) $vars['status']->private;
-  $vars['private_text'] = $vars['private'] ? t('(Private)') : t('Public');
-  drupal_add_css(drupal_get_path('module', 'fbss_privacy') .'/fbss_privacy.css');
-}
-
-//=============
-// VIEWS HOOKS
-//=============
-
-/**
- * Implementation of hook_views_api().
- */
-function fbss_privacy_views_api() {
-  return array(
-    'api' => 2,
-    'path' => drupal_get_path('module', 'fbss_privacy'),
-  );
-}
-
-/**
- * Implementation of hook_views_default_views_alter().
- */
-function fbss_privacy_views_default_views_alter(&$views) {
-  foreach ($views as $view) {
-    // Show private messages in the conversation view.
-    if ($view->name == 'facebook_status_conversation') {
-      $view->display['default']->display_options['filters']['private'] = array(
-        'operator' => '=',
-        'value' => 'all',
-        'group' => '0',
-        'exposed' => FALSE,
-        'expose' => array(
-          'operator' => FALSE,
-          'label' => '',
-        ),
-        'id' => 'private',
-        'table' => 'facebook_status',
-        'field' => 'private',
-        'relationship' => 'none',
-      );
-    }
-    // Add the Private field.
-    if ($view->tag == 'Facebook-style Statuses') {
-      $private = 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,
-          'html' => 0,
-          'strip_tags' => 0,
-        ),
-        'empty' => '',
-        'hide_empty' => 0,
-        'empty_zero' => 0,
-        'exclude' => 1,
-        'id' => 'private',
-        'table' => 'facebook_status',
-        'field' => 'private',
-        'relationship' => 'none',
-      );
-      // Add the Private field above the Global: Nothing field so we can use it as a token.
-      $nothing = array_pop($view->display['default']->display_options['fields']);
-      $view->display['default']->display_options['fields']['private'] = $private;
-      $view->display['default']->display_options['fields']['nothing'] = $nothing;
-      // Add the Private token to the Global: Nothing field.
-      $t = $view->display['default']->display_options['fields']['nothing']['alter']['text'];
-      $t = str_replace('[name] [message]', '[name] [private] [message]', $t); // context-based Views
-      $t = str_replace('[user_contextual_pic] [message]', '[user_contextual_pic] [private] [message]', $t); // all context Views
-      $view->display['default']->display_options['fields']['nothing']['alter']['text'] = $t;
-    }
-  }
-}
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/fbss_privacy/fbss_privacy.views.inc screamwork_fbss7/submodules/fbss_privacy/fbss_privacy.views.inc
--- facebook_status_6_3/submodules/fbss_privacy/fbss_privacy.views.inc	2011-07-06 16:58:23.767001400 -0400
+++ screamwork_fbss7/submodules/fbss_privacy/fbss_privacy.views.inc	1969-12-31 19:00:00.000000000 -0500
@@ -1,74 +0,0 @@
-<?php
-
-/**
- * @file
- *   Integrates Facebook-style Statuses Private Statuses with Views.
- */
-
-/**
- * Implementation of hook_views_query_alter().
- */
-function fbss_privacy_views_query_alter(&$view, &$query) {
-  global $user;
-  // Alter any view that shows status updates and exclude private statuses (unless we've already set a related filter).
-  foreach ($query->table_queue as $table) {
-    if ($table['table'] == 'facebook_status' && !isset($query->where['fbss_privacy']) && !user_access('view all private status messages')) {
-      $query->add_where('fbss_privacy',
-        $table['alias'] .'.private = 0 OR '.
-        $table['alias'] .'.sender = %d OR ('.
-          $table['alias'] .".type = 'user' AND ". $table['alias'] .".recipient = %d)",
-        $user->uid, $user->uid);
-      break;
-    }
-  }
-}
-
-/**
- * Implementation of hook_views_data().
- */
-function fbss_privacy_views_data() {
-  $data = array();
-  $data['facebook_status']['private'] = array(
-    'title' => t('Show private status messages'),
-    'help' => t('Enable showing private status messages in this view.'),
-    'field' => array(
-      'handler' => 'fbss_privacy_views_handler_field',
-      'label' => t('The word "%private" if the status message is private', array('%private' => t('(Private)'))),
-    ),
-    'filter' => array(
-      'handler' => 'fbss_privacy_views_handler_filter',
-      'label' => t('Show private status messages'),
-    ),
-    'argument' => array(
-      'handler' => 'fbss_privacy_views_handler_argument',
-      'label' => t('Show private status messages'),
-    ),
-    'sort' => array(
-      'handler' => 'views_handler_sort',
-      'label' => t('Private messages first'),
-    ),
-  );
-  return $data;
-}
-
-/**
- * Implementation of hook_views_handlers().
- */
-function fbss_privacy_views_handlers() {
-  return array(
-    'info' => array(
-      'path' => drupal_get_path('module', 'fbss_privacy'),
-    ),
-    'handlers' => array(
-      'fbss_privacy_views_handler_argument' => array(
-        'parent' => 'views_handler_argument',
-      ),
-      'fbss_privacy_views_handler_field' => array(
-        'parent' => 'views_handler_field',
-      ),
-      'fbss_privacy_views_handler_filter' => array(
-        'parent' => 'views_handler_filter',
-      ),
-    ),
-  );
-}
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/fbss_privacy/fbss_privacy.views_default.inc screamwork_fbss7/submodules/fbss_privacy/fbss_privacy.views_default.inc
--- facebook_status_6_3/submodules/fbss_privacy/fbss_privacy.views_default.inc	2011-06-12 16:49:25.955497000 -0400
+++ screamwork_fbss7/submodules/fbss_privacy/fbss_privacy.views_default.inc	1969-12-31 19:00:00.000000000 -0500
@@ -1,388 +0,0 @@
-<?php
-
-/**
- * @file
- *   Default Views for Facebook-style Statuses Private Statuses.
- */
-
-/**
- * Implementation of hook_views_default_views().
- */
-function fbss_privacy_views_default_views() {
-  $views = array();
-
-  $view = new view;
-  $view->name = 'facebook_status_private_messages';
-  $view->description = 'Displays private status messages sent or received by a given user.';
-  $view->tag = 'Facebook-style Statuses';
-  $view->view_php = '';
-  $view->base_table = 'facebook_status';
-  $view->is_cacheable = FALSE;
-  $view->api_version = 2;
-  $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
-  $handler = $view->new_display('default', 'Defaults', 'default');
-  $handler->override_option('fields', array(
-    'sid' => 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,
-        'html' => 0,
-        'strip_tags' => 0,
-      ),
-      'empty' => '',
-      'hide_empty' => 0,
-      'empty_zero' => 0,
-      'exclude' => 1,
-      'id' => 'sid',
-      'table' => 'facebook_status',
-      'field' => 'sid',
-      'relationship' => 'none',
-    ),
-    'user_contextual_pic' => 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,
-        'html' => 0,
-        'strip_tags' => 0,
-      ),
-      'empty' => '',
-      'hide_empty' => 0,
-      'empty_zero' => 0,
-      'exclude' => 1,
-      'id' => 'user_contextual_pic',
-      'table' => 'facebook_status',
-      'field' => 'user_contextual_pic',
-      'relationship' => 'none',
-    ),
-    'message' => 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,
-        'html' => 0,
-        'strip_tags' => 0,
-      ),
-      'empty' => '',
-      'hide_empty' => 0,
-      'empty_zero' => 0,
-      'exclude' => 1,
-      'id' => 'message',
-      'table' => 'facebook_status',
-      'field' => 'message',
-      'relationship' => 'none',
-    ),
-    'edit' => 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,
-        'html' => 0,
-        'strip_tags' => 0,
-      ),
-      'empty' => '',
-      'hide_empty' => 0,
-      'empty_zero' => 0,
-      'exclude' => 1,
-      'id' => 'edit',
-      'table' => 'facebook_status',
-      'field' => 'edit',
-      'relationship' => 'none',
-    ),
-    'delete' => 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,
-        'html' => 0,
-        'strip_tags' => 0,
-      ),
-      'empty' => '',
-      'hide_empty' => 0,
-      'empty_zero' => 0,
-      'exclude' => 1,
-      'id' => 'delete',
-      'table' => 'facebook_status',
-      'field' => 'delete',
-      'relationship' => 'none',
-    ),
-    'repost' => 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,
-        'html' => 0,
-        'strip_tags' => 0,
-      ),
-      'empty' => '',
-      'hide_empty' => 0,
-      'empty_zero' => 0,
-      'repost_text' => 'Share',
-      'exclude' => 1,
-      'id' => 'repost',
-      'table' => 'facebook_status',
-      'field' => 'repost',
-      'relationship' => 'none',
-    ),
-    'created' => array(
-      'label' => '',
-      'alter' => array(
-        'alter_text' => 0,
-        'text' => '',
-        'make_link' => 1,
-        'path' => 'statuses/[sid]',
-        '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,
-      'date_format' => 'themed',
-      'custom_date_format' => '',
-      'exclude' => 1,
-      'id' => 'created',
-      'table' => 'facebook_status',
-      'field' => 'created',
-      'relationship' => 'none',
-    ),
-    'nothing' => array(
-      'label' => '',
-      'alter' => array(
-        'text' => '<div>[user_contextual_pic] [message]</div>
-  
-  <div class="facebook-status-details">[created] [edit] [delete] [repost]</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(
-    'sid' => array(
-      'order' => 'DESC',
-      'id' => 'sid',
-      'table' => 'facebook_status',
-      'field' => 'sid',
-      'relationship' => 'none',
-    ),
-  ));
-  $handler->override_option('arguments', array(
-    'private' => array(
-      'default_action' => 'default',
-      'style_plugin' => 'default_summary',
-      'style_options' => array(),
-      'wildcard' => 'all',
-      'wildcard_substitution' => 'All',
-      'title' => 'Private messages',
-      'breadcrumb' => '',
-      'default_argument_type' => 'current_user',
-      'default_argument' => '',
-      'validate_type' => 'user',
-      'validate_fail' => 'not found',
-      'privacy' => '1',
-      'id' => 'private',
-      'table' => 'facebook_status',
-      'field' => 'private',
-      'validate_user_argument_type' => 'uid',
-      'validate_user_roles' => array(
-        '2' => 0,
-      ),
-      'relationship' => 'none',
-      'default_options_div_prefix' => '',
-      'default_argument_fixed' => '',
-      'default_argument_user' => 0,
-      'default_argument_php' => '',
-      'validate_argument_node_type' => array(
-        'book' => 0,
-        'page' => 0,
-        'story' => 0,
-      ),
-      'validate_argument_node_access' => 0,
-      'validate_argument_nid_type' => 'nid',
-      'validate_argument_vocabulary' => array(
-        '2' => 0,
-        '4' => 0,
-        '5' => 0,
-        '3' => 0,
-      ),
-      'validate_argument_type' => 'tid',
-      'validate_argument_transform' => 0,
-      'validate_user_restrict_roles' => 0,
-      'validate_argument_node_flag_name' => '*relationship*',
-      'validate_argument_node_flag_test' => 'flaggable',
-      'validate_argument_node_flag_id_type' => 'id',
-      'validate_argument_user_flag_name' => '*relationship*',
-      'validate_argument_user_flag_test' => 'flaggable',
-      'validate_argument_user_flag_id_type' => 'id',
-      'validate_argument_php' => '',
-      'override' => array(
-        'button' => 'Override',
-      ),
-    ),
-  ));
-  $handler->override_option('filters', array(
-    'message' => array(
-      'operator' => '!=',
-      'value' => '',
-      'group' => '0',
-      'exposed' => FALSE,
-      'expose' => array(
-        'operator' => FALSE,
-        'label' => '',
-      ),
-      'case' => 1,
-      'id' => 'message',
-      'table' => 'facebook_status',
-      'field' => 'message',
-      'relationship' => 'none',
-    ),
-    'type' => array(
-      'operator' => 'in',
-      'value' => array(
-        'user' => 'user',
-      ),
-      'group' => '0',
-      'exposed' => FALSE,
-      'expose' => array(
-        'operator' => FALSE,
-        'label' => '',
-      ),
-      'id' => 'type',
-      'table' => 'facebook_status',
-      'field' => 'type',
-      'relationship' => 'none',
-    ),
-  ));
-  $handler->override_option('access', array(
-    'type' => 'perm',
-    'perm' => 'view all statuses',
-  ));
-  $handler->override_option('cache', array(
-    'type' => 'none',
-  ));
-  $handler->override_option('use_ajax', TRUE);
-  $handler->override_option('use_pager', '1');
-  $handler->override_option('distinct', 0);
-  $handler->override_option('style_plugin', 'table');
-  $handler = $view->new_display('page', 'Page', 'page_1');
-  $handler->override_option('path', 'statuses/private/%');
-  $handler->override_option('menu', array(
-    'type' => 'none',
-    'title' => '',
-    'description' => '',
-    'weight' => 0,
-    'name' => 'navigation',
-  ));
-  $handler->override_option('tab_options', array(
-    'type' => 'none',
-    'title' => '',
-    'description' => '',
-    'weight' => 0,
-    'name' => 'navigation',
-  ));
-  $views[$view->name] = $view;
-
-  return $views;
-}
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/fbss_privacy/fbss_privacy_views_handler_argument.inc screamwork_fbss7/submodules/fbss_privacy/fbss_privacy_views_handler_argument.inc
--- facebook_status_6_3/submodules/fbss_privacy/fbss_privacy_views_handler_argument.inc	2011-06-04 19:56:04.501914900 -0400
+++ screamwork_fbss7/submodules/fbss_privacy/fbss_privacy_views_handler_argument.inc	1969-12-31 19:00:00.000000000 -0500
@@ -1,55 +0,0 @@
-<?php
-
-/**
- * @file
- *   The handler for the Privacy argument.
- */
-
-/**
- * Controls whether private statuses are included in the View results.
- */
-class fbss_privacy_views_handler_argument extends views_handler_argument {
-  function option_definition() {
-    $options = parent::option_definition();
-    $options['privacy'] = array('default' => 1);
-    return $options;
-  }
-  function options_form(&$form, &$form_state) {
-    parent::options_form($form, $form_state);
-    $form['privacy'] = array(
-      '#type' => 'radios',
-      '#default_value' => $this->options['privacy'],
-      '#required' => TRUE,
-      '#options' => array(
-        0 => t('Show only non-private status messages'),
-        1 => t('Show only private status messages'),
-        'all' => t('Show private and non-private status messages'),
-      ),
-      '#description' => t('If you an option that shows private messages, only private status messages which the user is permitted to see will be shown.'),
-    );
-  }
-  function query() {
-    global $user;
-    $argument = $this->argument;
-    $privacy = $this->options['privacy'];
-    $query = "{facebook_status}.private = %d";
-    // The argument user must have participated in the status message.
-    $this->query->add_where('fbss_privacy', db_prefix_tables("{facebook_status}.sender = %d OR ({facebook_status}.recipient = %d AND {facebook_status}.type = 'user')"), $argument, $argument);
-    // Show only private or only non-private status messages.
-    if (is_numeric($privacy)) {
-      // Only show private messages if the current is the argument user or has admin permissions.
-      if (!$privacy || $user->uid == $argument || user_access('view all private status messages')) {
-        $this->query->add_where('fbss_privacy', db_prefix_tables($query), $privacy);
-      }
-      else {
-        // Return no results.
-        $this->query->add_where('fbss_privacy', db_prefix_tables("$query AND $query"), 0, 1);
-      }
-    }
-    // Show private and non-private messages.
-    elseif ($user->uid != $argument && !user_access('view all private status messages')) {
-      // Return no results if the current user is not the argument user and has no admin permissions.
-      $this->query->add_where('fbss_privacy', db_prefix_tables("$query AND $query"), 0, 1);
-    }
-  }
-}
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/fbss_privacy/fbss_privacy_views_handler_field.inc screamwork_fbss7/submodules/fbss_privacy/fbss_privacy_views_handler_field.inc
--- facebook_status_6_3/submodules/fbss_privacy/fbss_privacy_views_handler_field.inc	2011-06-04 22:22:11.213342100 -0400
+++ screamwork_fbss7/submodules/fbss_privacy/fbss_privacy_views_handler_field.inc	1969-12-31 19:00:00.000000000 -0500
@@ -1,18 +0,0 @@
-<?php
-
-/**
- * @file
- *   Handler for the Private field.
- */
-
-/**
- * Displays "Private" if the status is private.
- */
-class fbss_privacy_views_handler_field extends views_handler_field {
-  function render($values) {
-    if ($values->{$this->field_alias}) {
-      drupal_add_css(drupal_get_path('module', 'fbss_privacy') .'/fbss_privacy.css');
-      return '<span class="facebook-status-private-text">'. t('(Private)') .'</span>';
-    }
-  }
-}
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/fbss_privacy/fbss_privacy_views_handler_filter.inc screamwork_fbss7/submodules/fbss_privacy/fbss_privacy_views_handler_filter.inc
--- facebook_status_6_3/submodules/fbss_privacy/fbss_privacy_views_handler_filter.inc	2011-06-04 19:50:58.219396500 -0400
+++ screamwork_fbss7/submodules/fbss_privacy/fbss_privacy_views_handler_filter.inc	1969-12-31 19:00:00.000000000 -0500
@@ -1,51 +0,0 @@
-<?php
-
-/**
- * @file
- *   The handler for the Privacy filter.
- */
-
-/**
- * Controls whether private statuses are included in the View results.
- */
-class fbss_privacy_views_handler_filter extends views_handler_filter {
-  function value_form(&$form, &$form_state) {
-    $form['value'] = array(
-      '#type' => 'radios',
-      '#default_value' => isset($this->value) ? $this->value : '',
-      '#required' => TRUE,
-      '#options' => array(
-        0 => t('Show only non-private status messages'),
-        1 => t('Show only private status messages'),
-        'all' => t('Show private and non-private status messages'),
-      ),
-      '#description' => t('If you choose an option that shows private messages, only private status messages which the user is permitted to see will be shown.'),
-    );
-  }
-  function query() {
-    global $user;
-    // This selects only statuses in which the current user participated.
-    $subquery = "{facebook_status}.sender = %d OR ({facebook_status}.recipient = %d AND {facebook_status}.type = 'user')";
-    // Show only private or only non-private status messages.
-    if (is_numeric($this->value)) {
-      $query = "{facebook_status}.private = %d";
-      // If we're showing only private messages, only show the ones in which the current user participated, unless the current user has permission to see all private messages.
-      if ($this->value && !user_access('view all private status messages')) {
-        $this->query->add_where('fbss_privacy', db_prefix_tables($query ." AND ($subquery)"), $this->value, $user->uid, $user->uid);
-      }
-      else {
-        $this->query->add_where('fbss_privacy', db_prefix_tables($query), $this->value);
-      }
-    }
-    // Show private and non-private messages.
-    else {
-      // Only show private messages in which the current user participated, unless the current user has permission to see all private messages.
-      if (user_access('view all private status messages')) {
-        $this->query->add_where('fbss_privacy', db_prefix_tables("{facebook_status}.private = 0 OR {facebook_status}.private = 1"));
-      }
-      else {
-        $this->query->add_where('fbss_privacy', db_prefix_tables("{facebook_status}.private = 0 OR ({facebook_status}.private = 1 AND ($subquery))"), $user->uid, $user->uid);
-      }
-    }
-  }
-}
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/fbss_rules/fbss_rules.info screamwork_fbss7/submodules/fbss_rules/fbss_rules.info
--- facebook_status_6_3/submodules/fbss_rules/fbss_rules.info	2011-04-09 19:23:26.595620800 -0400
+++ screamwork_fbss7/submodules/fbss_rules/fbss_rules.info	2011-05-25 20:53:28.000000000 -0400
@@ -5,2 +5,6 @@ dependencies[] = facebook_status
 dependencies[] = rules
-core = 6.x
+core = 7.x
+
+files[] = fbss_rules.module
+files[] = fbss_rules.rules.inc
+files[] = fbss_rules.rules_defaults.inc
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/fbss_rules/fbss_rules.module screamwork_fbss7/submodules/fbss_rules/fbss_rules.module
--- facebook_status_6_3/submodules/fbss_rules/fbss_rules.module	2011-06-02 10:49:46.966226000 -0400
+++ screamwork_fbss7/submodules/fbss_rules/fbss_rules.module	2011-05-25 20:53:28.000000000 -0400
@@ -8,8 +8,6 @@
 /**
- * Implementation of hook_facebook_status_delete().
+ * Implements hook_facebook_status_delete().
  */
-function fbss_rules_facebook_status_delete($status, $meta = array()) {
-  if (empty($meta['has attachment'])) {
-    rules_invoke_event('facebook_status_delete', $status);
-  }
+function fbss_rules_facebook_status_delete($sid) {
+  rules_invoke_event('facebook_status_delete', facebook_status_load($sid));
 }
@@ -17,12 +15,10 @@ function fbss_rules_facebook_status_dele
 /**
- * Implementation of hook_facebook_status_save().
+ * Implements hook_facebook_status_save().
  */
-function fbss_rules_facebook_status_save($status, $context, $edit, $options) {
-  if (empty($options['has attachment'])) {
+function fbss_rules_facebook_status_save($status, $context, $edit) {
     if ($edit) {
-      rules_invoke_event('facebook_status_edit', $status/*, $context*/);
+    rules_invoke_event('facebook_status_edit', $status, $context);
     }
     else {
-      rules_invoke_event('facebook_status_save', $status/*, $context*/);
-    }
+    rules_invoke_event('facebook_status_save', $status, $context);
   }
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/fbss_rules/fbss_rules.rules.inc screamwork_fbss7/submodules/fbss_rules/fbss_rules.rules.inc
--- facebook_status_6_3/submodules/fbss_rules/fbss_rules.rules.inc	2011-05-20 04:35:15.922042300 -0400
+++ screamwork_fbss7/submodules/fbss_rules/fbss_rules.rules.inc	2011-05-25 20:53:28.000000000 -0400
@@ -9,3 +9,3 @@
 /**
- * Implementation of hook_rules_event_info().
+ * Implements hook_rules_event_info().
  */
@@ -17,3 +17,6 @@ function fbss_rules_rules_event_info() {
       'arguments' => array(
-        'status' => array('type' => 'facebook_status', 'label' => t('The status.')),
+        'status' => array(
+          'type' => 'facebook_status',
+          'label' => t('The status.'),
+        ),
       ),
@@ -24,3 +27,6 @@ function fbss_rules_rules_event_info() {
       'arguments' => array(
-        'status' => array('type' => 'facebook_status', 'label' => t('The status.')),
+        'status' => array(
+          'type' => 'facebook_status',
+          'label' => t('The status.'),
+        ),
         //'context' => array('type' => 'value', 'label' => t('The status context.')),
@@ -32,3 +38,6 @@ function fbss_rules_rules_event_info() {
       'arguments' => array(
-        'status' => array('type' => 'facebook_status', 'label' => t('The status.')),
+        'status' => array(
+          'type' => 'facebook_status',
+          'label' => t('The status.'),
+        ),
         //'context' => array('type' => 'value', 'label' => t('The status context.')),
@@ -40,3 +49,3 @@ function fbss_rules_rules_event_info() {
 /**
- * Implementation of hook_rules_condition_info().
+ * Implements hook_rules_condition_info().
  */
@@ -47,3 +56,6 @@ function fbss_rules_rules_condition_info
       'arguments' => array(
-        'status' => array('type' => 'facebook_status', 'label' => t('The status')),
+        'status' => array(
+          'type' => 'facebook_status',
+          'label' => t('The status'),
+        ),
       ),
@@ -54,4 +66,10 @@ function fbss_rules_rules_condition_info
       'arguments' => array(
-        'recipient' => array('type' => 'number', 'label' => t('The ID of the object to which the status will be posted.')),
-        'sender' => array('type' => 'user', 'label' => t('Sender')),
+        'recipient' => array(
+          'type' => 'number',
+          'label' => t('The ID of the object to which the status will be posted.'),
+        ),
+        'sender' => array(
+          'type' => 'user',
+          'label' => t('Sender'),
+        ),
       ),
@@ -62,3 +80,6 @@ function fbss_rules_rules_condition_info
       'arguments' => array(
-        'status' => array('type' => 'facebook_status', 'label' => t('The status')),
+        'status' => array(
+          'type' => 'facebook_status',
+          'label' => t('The status'),
+        ),
       ),
@@ -69,10 +90,6 @@ function fbss_rules_rules_condition_info
       'arguments' => array(
-        'status' => array('type' => 'facebook_status', 'label' => t('The status')),
+        'status' => array(
+          'type' => 'facebook_status',
+          'label' => t('The status'),
       ),
-      'module' => 'Facebook-style Statuses',
-    ),
-    'fbss_rules_rules_condition_is_type' => array(
-      'label' => t('Status recipient is a certain type'),
-      'arguments' => array(
-        'status' => array('type' => 'facebook_status', 'label' => t('The status')),
       ),
@@ -104,3 +121,3 @@ function fbss_rules_can_post_form($setti
     '#default_value' => $settings['type'],
-    '#description' => t('The type of entity onto whose stream the status update will be posted.'),
+    '#description' => t('The type of entity that onto whose stream the status update will be posted.'),
     '#options' => $options,
@@ -121,31 +138,2 @@ function fbss_rules_can_post($recipient,
 /**
- * Builds the form for the fbss_rules_rules_condition_is_type condition.
- */
-function fbss_rules_rules_condition_is_type_form($settings, &$form) {
-  $settings += array('types' => array());
-  $contexts = module_invoke_all('facebook_status_context_info');
-  $options = array();
-  foreach ($contexts as $key => $context) {
-    $options[$key] = $context['title'];
-  }
-  $form['settings']['types'] = array(
-    '#type' => 'checkboxes',
-    '#title' => t('Recipient type'),
-    '#default_value' => $settings['types'],
-    '#description' => t('The types of recipients allowed for this condition to be true.'),
-    '#options' => $options,
-  );
-}
-
-/**
- * Checks if the status recipient is one of a specified type.
- */
-function fbss_rules_rules_condition_is_type($status, $settings) {
-  if (empty($settings['types'])) {
-    return FALSE;
-  }
-  return !empty($settings['types'][$status->type]);
-}
-
-/**
  * Checks if the current user can edit the status.
@@ -164,3 +152,3 @@ function fbss_rules_rules_condition_can_
 /**
- * Implementation of hook_rules_action_info().
+ * Implements hook_rules_action_info().
  */
@@ -171,3 +159,6 @@ function fbss_rules_rules_action_info()
       'new variables' => array(
-        'status_loaded' => array('type' => 'facebook_status', 'label' => t('Loaded status')),
+        'status_loaded' => array(
+          'type' => 'facebook_status',
+          'label' => t('Loaded status'),
+        ),
       ),
@@ -222,3 +213,6 @@ function fbss_rules_load_action($setting
 function fbss_rules_edit_action_form($settings, &$form) {
-  $settings += array('sid' => '', 'message' => '');
+  $settings += array(
+    'sid' => '',
+    'message' => '',
+  );
   $form['settings']['sid'] = array(
@@ -241,3 +235,32 @@ function fbss_rules_edit_action_form($se
 function fbss_rules_edit_action($settings) {
-  facebook_status_edit_status(facebook_status_load($settings['sid']), $settings['message']);
+  $status_old = facebook_status_load($settings['sid']);
+  $context = facebook_status_determine_context($status_old->type);
+  $new_status = trim($settings['message']);
+  $time = REQUEST_TIME;
+  global $user;
+  // Pretend to have set a new status if the submitted status is exactly the same as the old one.
+  if ($new_status != $status_old->message) {
+    $sql = "UPDATE {facebook_status} SET message = '%s', created = %d WHERE sid = %d";
+    // TODO Please review the conversion of this statement to the D7 database API syntax.
+    /* db_query($sql, $new_status, $time, $status_old->sid) */
+    db_update('facebook_status')
+  ->fields(array(
+    'message' => $new_status,
+    'created' => $time,
+  ))
+  ->condition('sid', $status_old->sid)
+  ->execute();
+    // Invokes hook_facebook_status_save($status, $edit).
+    $status_old->message = $new_status;
+    $status_old->created = $time;
+    module_invoke_all('facebook_status_save', $status_old, $context, TRUE);
+  }
+  // Trigger integration. Don't call if the status is blank because usually nothing interesting is happening.
+  if (module_exists('trigger') && !empty($new_status)) {
+    $op = 'fbss_edited_' . $status_old->type;
+    if ($status_old->type == 'user') {
+      $op .= ($status_old->recipient == $status_old->sender ? '_self' : '_other');
+    }
+    module_invoke_all('facebook_status', $op, $status_old, $context);
+  }
 }
@@ -268,3 +291,8 @@ function fbss_rules_delete_action($setti
 function fbss_rules_add_action_form($settings, &$form) {
-  $settings += array('sender' => '', 'recipient' => '', 'type' => '', 'message' => '');
+  $settings += array(
+    'sender' => '',
+    'recipient' => '',
+    'type' => '',
+    'message' => '',
+  );
   $form['settings']['sender'] = array(
@@ -316,3 +344,3 @@ function fbss_rules_add_action($settings
 /**
- * Implementation of hook_rules_data_type_info().
+ * Implements hook_rules_data_type_info().
  */
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/fbss_rules/fbss_rules.rules_defaults.inc screamwork_fbss7/submodules/fbss_rules/fbss_rules.rules_defaults.inc
--- facebook_status_6_3/submodules/fbss_rules/fbss_rules.rules_defaults.inc	2011-06-14 12:51:00.411352500 -0400
+++ screamwork_fbss7/submodules/fbss_rules/fbss_rules.rules_defaults.inc	2011-05-25 20:53:28.000000000 -0400
@@ -12,6 +12,4 @@ function facebook_status_rules_defaults(
   $config = array(
-    'rules' =>
-    array(
-      'facebook_status_rules_update' =>
-      array(
+    'rules' => array(
+      'facebook_status_rules_update' => array(
         '#type' => 'rule',
@@ -21,4 +19,3 @@ function facebook_status_rules_defaults(
         '#weight' => '0',
-        '#categories' =>
-        array(
+        '#categories' => array(
           0 => 'facebook_status',
@@ -26,12 +23,8 @@ function facebook_status_rules_defaults(
         '#status' => 'default',
-        '#conditions' =>
-        array(
+        '#conditions' => array(
         ),
-        '#actions' =>
-        array(
-          0 =>
-          array(
+        '#actions' => array(
+          0 => array(
             '#type' => 'action',
-            '#settings' =>
-            array(
+            '#settings' => array(
               'severity' => '6',
@@ -40,8 +33,5 @@ function facebook_status_rules_defaults(
               'link' => '/user/<?php echo $account->uid; ?>',
-              '#eval input' =>
-              array(
-                'rules_input_evaluator_php' =>
-                array(
-                  'message' =>
-                  array(
+              '#eval input' => array(
+                'rules_input_evaluator_php' => array(
+                  'message' => array(
                     0 => 'account',
@@ -49,4 +39,3 @@ function facebook_status_rules_defaults(
                   ),
-                  'link' =>
-                  array(
+                  'link' => array(
                     0 => 'account',
@@ -57,8 +46,6 @@ function facebook_status_rules_defaults(
             '#name' => 'rules_action_watchdog',
-            '#info' =>
-            array(
+            '#info' => array(
               'label' => 'Log to watchdog',
               'module' => 'System',
-              'eval input' =>
-              array(
+              'eval input' => array(
                 0 => 'type',
@@ -72,4 +59,3 @@ function facebook_status_rules_defaults(
       ),
-      'facebook_status_rules_delete' =>
-      array(
+      'facebook_status_rules_delete' => array(
         '#type' => 'rule',
@@ -77,6 +63,5 @@ function facebook_status_rules_defaults(
         '#label' => 'Delete Facebook-style Status',
-        '#active' => 0,
+        '#active' => 1,
         '#weight' => '0',
-        '#categories' =>
-        array(
+        '#categories' => array(
           0 => 'facebook_status',
@@ -84,12 +69,8 @@ function facebook_status_rules_defaults(
         '#status' => 'default',
-        '#conditions' =>
-        array(
+        '#conditions' => array(
         ),
-        '#actions' =>
-        array(
-          0 =>
-          array(
+        '#actions' => array(
+          0 => array(
             '#type' => 'action',
-            '#settings' =>
-            array(
+            '#settings' => array(
               'message' => 'Status deleted.',
@@ -98,8 +79,6 @@ function facebook_status_rules_defaults(
             '#name' => 'rules_action_drupal_message',
-            '#info' =>
-            array(
+            '#info' => array(
               'label' => 'Show a configurable message on the site',
               'module' => 'System',
-              'eval input' =>
-              array(
+              'eval input' => array(
                 0 => 'message',
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/fbss_services/fbss_services.inc screamwork_fbss7/submodules/fbss_services/fbss_services.inc
--- facebook_status_6_3/submodules/fbss_services/fbss_services.inc	2011-05-20 03:22:15.601502300 -0400
+++ screamwork_fbss7/submodules/fbss_services/fbss_services.inc	1969-12-31 19:00:00.000000000 -0500
@@ -1,203 +0,0 @@
-<?php
-
-/**
- * @file
- *   Callbacks for Services integration with Facebook-style Statuses.
- */
-
-/**
- * Determines permissions to CRUD resources.
- *
- * @param $action
- *   One of "create," "retrieve," "update," "delete," "index."
- *   Depending on what $action is, other parameters will follow:
- *   - create: $recipient_id, $type, $message
- *   - retrieve, delete: $sid
- *   - update: $sid, $message
- *   - index: $page, $parameters
- * @return
- *   TRUE if access to the given action is permitted; FALSE otherwise.
- */
-function _fbss_services_access($action) {
-  $args = func_get_args();
-  $args = $args[1];
-  if ($action == 'create') {
-    $context = facebook_status_determine_context($args[1]);
-    if (empty($context)) {
-      return services_error('Invalid context stream type', 406);
-    }
-    $recipient = $context['handler']->load_recipient($args[0]);
-    if (empty($recipient)) {
-      return services_error('Recipient not found', 404);
-    }
-    return facebook_status_user_access('add', $recipient, $args[1]);
-  }
-  elseif ($action == 'index') {
-    if (!empty($args[1]['recipient']) && !empty($args[1]['type'])) {
-      $context = facebook_status_determine_context($args[1]['type']);
-      if (empty($context)) {
-        return services_error('Invalid context stream type', 406);
-      }
-      $recipient = $context['handler']->load_recipient($args[1]['recipient']);
-      if (empty($recipient)) {
-        return services_error('Recipient not found', 404);
-      }
-      return facebook_status_user_access('view_stream', $recipient, $args[1]['type']);
-    }
-    return user_access('view all statuses');
-  }
-  else {
-    if ($action == 'retrieve') {
-      $action = 'view';
-    }
-    elseif ($action == 'update') {
-      $action = 'edit';
-    }
-    $status = facebook_status_load($args[0]);
-    if (empty($status)) {
-      return services_error('Status sid '. $sid .' not found', 404);
-    }
-    return facebook_status_user_access($action, $status);
-  }
-}
-
-/**
- * Creates a new status message based on submitted values.
- *
- * @param $recipient_id
- *   The ID of the recipient of the status message.
- * @param $type
- *   The type of the recipient of the status message.
- * @param $message
- *   The status message.
- * @return
- *   The newly saved status object. If applicable, has an additional "uri"
- *   parameter containing the fully qualified URI to this resource.
- */
-function fbss_services_create($recipient_id, $type, $message) {
-  $maxlen = variable_get('facebook_status_length', 140);
-  if (drupal_strlen($message) > $maxlen && $maxlen != 0) {
-    return services_error('The status must be no longer than '. $maxlen .' characters', 406);
-  }
-  $context = facebook_status_determine_context($type);
-  if (empty($context)) {
-    return services_error('Invalid context stream type', 406);
-  }
-  $recipient = $context['handler']->load_recipient($recipient_id);
-  if (empty($recipient)) {
-    return services_error('Recipient not found', 404);
-  }
-  $status = facebook_status_save_status($recipient, $type, $message);
-  if ($uri = services_resource_uri(array('status', $status->sid))) {
-    $status->uri = $uri;
-  }
-  return $status;
-}
-
-/**
- * Loads and retrieves a status object.
- *
- * @param $sid
- *   The ID of the status to return.
- * @return
- *   The status object.
- */
-function fbss_services_retrieve($sid) {
-  $status = facebook_status_load($sid);
-  if (!empty($status)) {
-    $status->uri = services_resource_uri(array('status', $status->sid));
-    return $status;
-  }
-  return services_error('Status sid '. $sid .' not found', 404);
-}
-
-/**
- * Updates a status message based on submitted values.
- *
- * @param $sid
- *   The ID of the status to edit.
- * @param $message
- *   The new message text.
- * @return
- *   The modified status object. If applicable, has an additional "uri"
- *   parameter containing the fully qualified URI to this resource.
- */
-function fbss_services_update($sid, $message) {
-  $maxlen = variable_get('facebook_status_length', 140);
-  if (drupal_strlen($message) > $maxlen && $maxlen != 0) {
-    return services_error('The status must be no longer than '. $maxlen .' characters', 406);
-  }
-  $status = facebook_status_load($sid);
-  if (empty($status)) {
-    return services_error('Status sid '. $sid .' not found', 404);
-  }
-  $status = facebook_status_edit_status($status, $message);
-  if ($uri = services_resource_uri(array('status', $sid))) {
-    $status->uri = $uri;
-  }
-  return $status;
-}
-
-/**
- * Delete a status given its SID.
- *
- * @param $sid
- *   The ID of the status to delete.
- */
-function fbss_services_delete($sid) {
-  facebook_status_delete_status($sid);
-  return TRUE;
-}
-
-/**
- * Return a paged set of statuses based on a set of parameters.
- *
- * An example request might look like this:
- *
- * ...endpoint/status?page=0&parameters['recipient']=7&parameters['type']=user
- *
- * This would return an array of the last 20 status messages sent to the user
- * with UID 7.
- *
- * @param $page
- *   Page number of results to return (in pages of 20). Optional.
- * @param $parameters
- *   An optional array of parameters by which to filter. Valid parameters
- *   include:
- *   - recipient: The ID of the recipient of the status messages.
- *   - type: The type of the recipient of the status messages. Required if
- *     recipient is specified.
- *   - sender: The user ID of the sender of the status messages.
- */
-function fbss_services_index($page, $parameters) {
-  if ($page < 0 || !is_numeric($page)) {
-    return services_error('Invalid page', 404);
-  }
-  $statuses = array();
-  $args = array();
-  $query = "SELECT * FROM {facebook_status} WHERE created <> 0";
-  if (!empty($parameters['type'])) {
-    $query .= " AND type = '%s'";
-    $args[] = $parameters['type'];
-  }
-  if (!empty($parameters['recipient'])) {
-    if (empty($parameters['type'])) {
-      return services_error('Invalid context stream type', 406);
-    }
-    $query .= " AND recipient = %d";
-    $args[] = $parameters['recipient'];
-  }
-  if (!empty($parameters['sender'])) {
-    $query .= " AND sender = %d";
-    $args[] = $parameters['sender'];
-  }
-  $query .= " ORDER BY created DESC, sid DESC";
-  $result = db_query_range($query, $args, $page * 20, 20);
-  while ($status = db_fetch_object($result)) {
-    if ($uri = services_resource_uri(array('status', $status->sid))) {
-      $status->uri = $uri;
-    }
-    $statuses[] = $status;
-  }
-  return $statuses;
-}
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/fbss_services/fbss_services.info screamwork_fbss7/submodules/fbss_services/fbss_services.info
--- facebook_status_6_3/submodules/fbss_services/fbss_services.info	2011-04-23 23:00:57.257775000 -0400
+++ screamwork_fbss7/submodules/fbss_services/fbss_services.info	1969-12-31 19:00:00.000000000 -0500
@@ -1,6 +0,0 @@
-name = Facebook-style Statuses Services
-description = Integrates Services with Facebook-style Statuses.
-package = Facebook-style Statuses
-dependencies[] = facebook_status
-dependencies[] = services
-core = 6.x
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/fbss_services/fbss_services.module screamwork_fbss7/submodules/fbss_services/fbss_services.module
--- facebook_status_6_3/submodules/fbss_services/fbss_services.module	2011-04-24 01:09:54.347311200 -0400
+++ screamwork_fbss7/submodules/fbss_services/fbss_services.module	1969-12-31 19:00:00.000000000 -0500
@@ -1,129 +0,0 @@
-<?php
-
-/**
- * @file
- *   Integrates Services with Facebook-style Statuses.
- */
-
-/**
- * Implementation of hook_services_resources().
- */
-function fbss_services_services_resources() {
-  return array(
-    'status' => array(
-      'file' => array('type' => 'inc', 'module' => 'fbss_services'),
-      'create' => array(
-        'help' => 'Creates a status message.',
-        'callback' => 'fbss_services_create',
-        'access callback' => '_fbss_services_access',
-        'access arguments' => array('create'),
-        'access arguments append' => TRUE,
-        'args' => array(
-          array(
-            'name' => 'recipient',
-            'type' => 'int',
-            'description' => 'The ID of the recipient of the status message.',
-            'optional' => FALSE,
-            'source' => 'data',
-          ),
-          array(
-            'name' => 'type',
-            'type' => 'string',
-            'description' => 'The type of the recipient of the status message.',
-            'optional' => FALSE,
-            'source' => 'data',
-          ),
-          array(
-            'name' => 'message',
-            'type' => 'string',
-            'description' => 'The status message.',
-            'optional' => FALSE,
-            'source' => 'data',
-            'default value' => '',
-          ),
-        ),
-      ),
-      'retrieve' => array(
-        'help' => 'Retrieves a status message.',
-        'callback' => 'fbss_services_retrieve',
-        'access callback' => '_fbss_services_access',
-        'access arguments' => array('retrieve'),
-        'access arguments append' => TRUE,
-        'args' => array(
-          array(
-            'name' => 'sid',
-            'type' => 'int',
-            'description' => 'The status ID.',
-            'optional' => FALSE,
-            'source' => array('path' => 0),
-          ),
-        ),
-      ),
-      'update' => array(
-        'help' => 'Updates a status message.',
-        'callback' => 'fbss_services_update',
-        'access callback' => '_fbss_services_access',
-        'access arguments' => array('update'),
-        'access arguments append' => TRUE,
-        'args' => array(
-          array(
-            'name' => 'sid',
-            'type' => 'int',
-            'description' => 'The status ID.',
-            'optional' => FALSE,
-            'source' => array('path' => 0),
-          ),
-          array(
-            'name' => 'message',
-            'type' => 'string',
-            'description' => 'The new status message.',
-            'optional' => FALSE,
-            'source' => 'data',
-            'default value' => '',
-          ),
-        ),
-      ),
-      'delete' => array(
-        'help' => 'Deletes a status message.',
-        'callback' => 'fbss_services_delete',
-        'access callback' => '_fbss_services_access',
-        'access arguments' => array('delete'),
-        'access arguments append' => TRUE,
-        'args' => array(
-          array(
-            'name' => 'sid',
-            'type' => 'int',
-            'description' => 'The status ID.',
-            'optional' => FALSE,
-            'source' => array('path' => 0),
-          ),
-        ),
-      ),
-      'index' => array(
-        'help' => 'Lists status messages in pages of 20.',
-        'callback' => 'fbss_services_index',
-        'access callback' => '_fbss_services_access',
-        'access arguments' => array('index'),
-        'access arguments append' => TRUE,
-        'args' => array(
-          array(
-            'name' => 'page',
-            'type' => 'int',
-            'description' => 'The zero-based index of the page to get (defaults to 0).',
-            'optional' => TRUE,
-            'source' => array('param' => 'page'),
-            'default value' => 0,
-          ),
-          array(
-            'name' => 'parameters',
-            'type' => 'array',
-            'description' => 'An array of options by which to filter the results. Valid parameters include recipient, type, and sender.',
-            'optional' => TRUE,
-            'source' => array('param' => 'parameters'),
-            'default value' => array(),
-          ),
-        ),
-      ),
-    ),
-  );
-}
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/fbss_twitter/fbss_twitter.admin.inc screamwork_fbss7/submodules/fbss_twitter/fbss_twitter.admin.inc
--- facebook_status_6_3/submodules/fbss_twitter/fbss_twitter.admin.inc	2011-05-31 10:22:33.504907800 -0400
+++ screamwork_fbss7/submodules/fbss_twitter/fbss_twitter.admin.inc	1969-12-31 19:00:00.000000000 -0500
@@ -1,57 +0,0 @@
-<?php
-
-/**
- * @file
- *   Administrative settings for the Facebook-style Statuses Twitter module.
- */
-
-/**
- * The administrative settings form.
- */
-function fbss_twitter_admin() {
-  $form = array();
-  $form['fbss_twitter_default'] = array(
-    '#type' => 'radios',
-    '#title' => t('Default Twitter option'),
-    '#default_value' => variable_get('fbss_twitter_default', 'off'),
-    '#required' => TRUE,
-    '#options' => array(
-      'on' => t('Always enabled by default'),
-      'off' => t('Always disabled by default'),
-      'on-user' => t('Let the user choose (enabled is default)'),
-      'off-user' => t('Let the user choose (disabled is default)'),
-      'disallow' => t('Do not allow posting to Twitter at all'),
-    ),
-    '#weight' => -70,
-  );
-  $form['fbss_twitter_select_account'] = array(
-    '#type' => 'checkbox',
-    '#title' => t('Automatically set the first Twitter account added for use with status updates.'),
-    '#description' => t('With this setting disabled, users must explicitly select a Twitter account to which to post status updates after connecting their Twitter account to their Drupal account.') .' '.
-      t('With this setting enabled, the first Twitter account users connect to their Drupal account will be automatically chosen as the one to which status updates can be posted.') .' '.
-      t('Users can always change which Twitter account they want to use (including setting it back to "none").') .' '.
-      t('Changing this setting will not affect users who have already connected at least one Twitter account to their Drupal account.'),
-    '#default_value' => variable_get('fbss_twitter_select_account', 0),
-    '#weight' => -30,
-  );
-  return system_settings_form($form);
-}
-
-/**
- * Validate function for the Facebook-style Statuses settings form alter.
- */
-function fbss_twitter_admin_validate(&$form, &$form_state) {
-  $len = $form_state['values']['facebook_status_length'];
-  if (($len > 140 || $len == 0) && variable_get('fbss_twitter_default', 'off') != 'disallow') {
-    $message = t('These settings could allow users to attempt to post messages to Twitter which are too long for Twitter to handle.') .' '.
-      t('In this situation, Facebook-style Statuses will attempt to truncate the tweet and include a link to view the full message on your site.') .' '.
-      t('Occasionally it is not possible to get a link to the status message, in which case the tweet will simply be shortened to 140 characters by Twitter.');
-    if ($len > 140) {
-      $message = t('The maximum number of characters allowed in a status is set to a number above 140, and users can post status updates to Twitter.') .' '. $message;
-    }
-    else {
-      $message = t('The maximum number of characters allowed in a status is set to 0 (unlimited), and users can post status updates to Twitter.') .' '. $message;
-    }
-    drupal_set_message($message, 'warning');
-  }
-}
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/fbss_twitter/fbss_twitter.css screamwork_fbss7/submodules/fbss_twitter/fbss_twitter.css
--- facebook_status_6_3/submodules/fbss_twitter/fbss_twitter.css	2011-06-05 02:39:39.202916600 -0400
+++ screamwork_fbss7/submodules/fbss_twitter/fbss_twitter.css	2011-05-25 20:53:28.000000000 -0400
@@ -3,3 +4,2 @@
   margin: 0;
-  display: inline;
 }
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/fbss_twitter/fbss_twitter.info screamwork_fbss7/submodules/fbss_twitter/fbss_twitter.info
--- facebook_status_6_3/submodules/fbss_twitter/fbss_twitter.info	2011-04-09 19:23:26.601621100 -0400
+++ screamwork_fbss7/submodules/fbss_twitter/fbss_twitter.info	2011-05-25 20:53:28.000000000 -0400
@@ -6,2 +6,5 @@ dependencies[] = twitter
 dependencies[] = oauth
-core = 6.x
+core = 7.x
+
+files[] = fbss_twitter.install
+files[] = fbss_twitter.module
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/fbss_twitter/fbss_twitter.install screamwork_fbss7/submodules/fbss_twitter/fbss_twitter.install
--- facebook_status_6_3/submodules/fbss_twitter/fbss_twitter.install	2011-04-26 14:35:06.519039400 -0400
+++ screamwork_fbss7/submodules/fbss_twitter/fbss_twitter.install	2011-05-25 20:53:28.000000000 -0400
@@ -8,6 +8,5 @@
 /**
- * Implementation of hook_uninstall().
+ * Implements hook_uninstall().
  */
 function fbss_twitter_uninstall() {
-  variable_del('fbss_twitter_select_account');
   variable_del('fbss_twitter_default');
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/fbss_twitter/fbss_twitter.module screamwork_fbss7/submodules/fbss_twitter/fbss_twitter.module
--- facebook_status_6_3/submodules/fbss_twitter/fbss_twitter.module	2011-06-07 15:13:17.129915400 -0400
+++ screamwork_fbss7/submodules/fbss_twitter/fbss_twitter.module	2011-05-25 20:53:28.000000000 -0400
@@ -8,30 +8,10 @@
 /**
- * Implementation of hook_menu().
- */
-function fbss_twitter_menu() {
-  $items = array();
-  $items['admin/settings/facebook_status/twitter'] = array(
-    'title' => 'Twitter',
-    'page callback' => 'drupal_get_form',
-    'page arguments' => array('fbss_twitter_admin'),
-    'access arguments' => array('administer Facebook-style Statuses settings'),
-    'description' => 'Allows administrators to adjust Twitter integration settings for Facebook-style Statuses.',
-    'type' => MENU_LOCAL_TASK,
-    'file' => 'fbss_twitter.admin.inc',
-  );
-  return $items;
-}
-
-/**
- * Implementation of hook_form_FORM_ID_alter().
+ * Implements hook_form_FORM_ID_alter().
  */
 function fbss_twitter_form_facebook_status_box_alter(&$form, &$form_state) {
-  $recipient = $form['recipient']['#value'];
-  $type = $form['type']['#value'];
-  if ($recipient != $GLOBALS['user']->uid || $type != 'user') {
+  if ($form_state['facebook_status']['recipient'] != $GLOBALS['user']->uid || $form_state['facebook_status']['type'] != 'user') {
     return;
   }
-  drupal_add_css(drupal_get_path('module', 'fbss_twitter') .'/fbss_twitter.css');
-  $context = facebook_status_determine_context($type);
-  $recipient = $context['handler']->load_recipient($recipient);
+  $context = facebook_status_determine_context($form_state['facebook_status']['type']);
+  $recipient = $context['handler']->load_recipient($form_state['facebook_status']['recipient']);
   $data = $recipient->data;
@@ -48,3 +28,3 @@ function fbss_twitter_form_facebook_stat
   }
-  $form['fbss-submit']['#submit'][] = 'fbss_twitter_facebook_status_box_submit';
+  $form_state['submit'][] = 'fbss_twitter_facebook_status_box_submit';
 }
@@ -64,3 +44,3 @@ function fbss_twitter_facebook_status_bo
       }
-      fbss_twitter_post_to_twitter($GLOBALS['user'], $new_status, $sid);
+      fbss_twitter_post_to_twitter($account, $new_status, $sid);
     }
@@ -70,3 +50,3 @@ function fbss_twitter_facebook_status_bo
 /**
- * Implementation of hook_form_FORM_ID_alter().
+ * Implements hook_form_FORM_ID_alter().
  * No need to check permissions since the form is already restricted.
@@ -78,3 +58,3 @@ function fbss_twitter_form_twitter_accou
   }
-  $result = db_query("SELECT screen_name FROM {twitter_account} WHERE uid = %d", arg(1));
+  $result = db_query("SELECT screen_name FROM {twitter_account} WHERE uid = :uid", array(':uid' => arg(1)));
   $options = array(0 => t('None'));
@@ -102,3 +82,2 @@ function fbss_twitter_form_twitter_accou
     $form_state['#account'] = $account;
-    $form_state['#options_count'] = count($options);
     $form['fbss_twitter_account'] = array(
@@ -121,16 +100,4 @@ function fbss_twitter_twitter_submit($fo
   if (!empty($account)) {
-    $twitter_account = $form_state['values']['fbss_twitter_account'];
-    // If we just added the first Twitter account, set it as the one to use with FBSS.
-    if ($twitter_account == 0 && $form_state['#options_count'] === 1 && variable_get('fbss_twitter_select_account', 0)) {
-      $result = db_query("SELECT screen_name FROM {twitter_account} WHERE uid = %d", arg(1));
-      $options = array();
-      while ($option = db_fetch_array($result)) {
-        $options[$option['screen_name']] = $option['screen_name'];
-      }
-      if (count($options) === 1) {
-        $twitter_account = array_pop($options);
-      }
-    }
     user_save($account, array(
-      'fbss_twitter_account' => $twitter_account,
+      'fbss_twitter' => $form_state['values']['fbss_twitter_account'],
       'fbss_twitter_default' => $form_state['values']['fbss_twitter_default'],
@@ -141,2 +108,37 @@ function fbss_twitter_twitter_submit($fo
 /**
+ * Implements hook_form_FORM_ID_alter().
+ * @todo: Make this its own page
+ */
+function fbss_twitter_form_facebook_status_admin_alter(&$form, &$form_state) {
+  $form['fbss_twitter_default'] = array(
+    '#type' => 'radios',
+    '#title' => t('Default Twitter option'),
+    '#default_value' => variable_get('fbss_twitter_default', 'off'),
+    '#required' => TRUE,
+    '#options' => array(
+      'on' => t('Always enabled by default'),
+      'off' => t('Always disabled by default'),
+      'on-user' => t('Let the user choose (enabled is default)'),
+      'off-user' => t('Let the user choose (disabled is default)'),
+      'disallow' => t('Do not allow posting to Twitter at all'),
+    ),
+    '#weight' => -70,
+  );
+  $form['#validate'][] = 'fbss_twitter_settings_validate';
+}
+
+/**
+ * Validate function for the Facebook-style Statuses settings form alter.
+ */
+function fbss_twitter_settings_validate(&$form, &$form_state) {
+  if ($form_state['values']['facebook_status_length'] > 140 && variable_get('fbss_twitter_default', 'off') != 'disallow') {
+    drupal_set_message(t('The maximum number of characters allowed in a status is set to a number above 140, and users can post status updates to Twitter.') . ' ' .
+      t('These settings could allow users to attempt to post messages to Twitter which are too long for Twitter to handle.') . ' ' .
+      t('In this situation, Facebook-style Statuses will attempt to truncate the tweet and include a link to view the full message on your site.') . ' ' .
+      t('Occasionally it is not possible to get a link to the status message, in which case the tweet will simply be shortened to 140 characters by Twitter.'),
+      'warning');
+  }
+}
+
+/**
  * Posts a status to Twitter.
@@ -147,13 +149,9 @@ function fbss_twitter_twitter_submit($fo
  *   The text of the message being posted.
- * @param $options
- *   (optional) An associative array of parameters to control how the tweet is
- *   constructed. If the "add URL" parameter is TRUE, a link to the status will
- *   be added to the message and the message will be truncated if necessary.
- *   Otherwise, if the message is too long to fit in a tweet and the "sid"
- *   parameter is given (identifying the status that the message is about) then
- *   the tweet will be truncated and a link to view the whole status message
- *   will be appended. If the message is too long and the "sid" parameter is
- *   not given, Twitter will simply truncate the message on its own.
+ * @param $sid
+ *   (optional) If the message is too long to fit in a tweet and a SID is
+ *   given, the tweet will be truncated and a link to view the whole status
+ *   message will be appended. If the message is too long and a SID is not
+ *   given, Twitter will simply truncate the message on its own.
  */
-function fbss_twitter_post_to_twitter($account, $message, $options = array()) {
+function fbss_twitter_post_to_twitter($account, $message, $sid = NULL) {
   if (empty($message)) {
@@ -165,11 +163,5 @@ function fbss_twitter_post_to_twitter($a
   }
-  // Backwards compatibility.
-  if (is_numeric($options)) {
-    $options = array('sid' => $options);
-  }
-  $options += array('add URL' => FALSE);
   // Try to fit the message into a tweet.
-  $message_length = drupal_strlen($message);
-  if ((!empty($options['sid']) && $message_length > 140) || $options['add URL']) {
-    $url = url('statuses/'. $options['sid']);
+  if (!empty($sid) && drupal_strlen($message) > 140) {
+    $url = url('statuses/' . $sid);
     if (module_exists('shorten')) {
@@ -178,9 +170,4 @@ function fbss_twitter_post_to_twitter($a
     $url_length = drupal_strlen($url);
-    if ($message_length + $url_length > 140) {
       $message = drupal_substr($message, 0, 138 - $url_length) ."\xE2\x80\xA6 ". $url;
     }
-    else {
-      $message .= ' '. $url;
-    }
-  }
   module_load_include('inc', 'twitter');
@@ -219,3 +206,3 @@ function _fbss_twitter_get_default($acco
 /**
- * Implementation of hook_facebook_status_form_ahah_alter().
+ * Implements hook_facebook_status_form_ahah_alter().
  */
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/fbss_userpoints/fbss_userpoints.info screamwork_fbss7/submodules/fbss_userpoints/fbss_userpoints.info
--- facebook_status_6_3/submodules/fbss_userpoints/fbss_userpoints.info	2011-04-09 19:23:26.604621300 -0400
+++ screamwork_fbss7/submodules/fbss_userpoints/fbss_userpoints.info	2011-05-25 20:53:28.000000000 -0400
@@ -5,2 +5,5 @@ dependencies[] = facebook_status
 dependencies[] = userpoints
-core = 6.x
+core = 7.x
+
+files[] = fbss_userpoints.install
+files[] = fbss_userpoints.module
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/fbss_userpoints/fbss_userpoints.install screamwork_fbss7/submodules/fbss_userpoints/fbss_userpoints.install
--- facebook_status_6_3/submodules/fbss_userpoints/fbss_userpoints.install	2011-05-26 15:17:01.257200400 -0400
+++ screamwork_fbss7/submodules/fbss_userpoints/fbss_userpoints.install	2011-05-25 20:53:28.000000000 -0400
@@ -8,3 +8,3 @@
 /**
- * Implementation of hook_uninstall().
+ * Implements hook_uninstall().
  */
@@ -14,4 +14,2 @@ function fbss_userpoints_uninstall() {
   variable_del('facebook_status_userpoints_own');
-  variable_del('fbss_comments_userpoints_max');
-  variable_del('fbss_comments_userpoints');
 }
diff -u -p1 -r -N -b -B -w facebook_status_6_3/submodules/fbss_userpoints/fbss_userpoints.module screamwork_fbss7/submodules/fbss_userpoints/fbss_userpoints.module
--- facebook_status_6_3/submodules/fbss_userpoints/fbss_userpoints.module	2011-06-03 10:25:04.218844400 -0400
+++ screamwork_fbss7/submodules/fbss_userpoints/fbss_userpoints.module	2011-05-25 20:53:28.000000000 -0400
@@ -8,3 +8,3 @@
 /**
- * Implementation of hook_userpoints().
+ * Implements hook_userpoints().
  */
@@ -33,27 +33,5 @@ function fbss_userpoints_userpoints($op,
         t('Note that the actual number of points awarded per day could be higher than this if this value is not a multiple of the points given above.'),
-      '#default_value' => variable_get('facebook_status_userpoints_max', 0),
+      '#default_value' => variable_get('facebook_status_userpoints_max', 5),
     );
     $form['#validate'][] = '_fbss_userpoints_validate';
-
-    if (module_exists('fbss_comments')) {
-      $form['fbss_comments'] = array(
-        '#type' => 'fieldset',
-        '#title' => t('Facebook-style Statuses Comments'),
-        '#collapsible' => TRUE,
-        '#collapsed' => TRUE,
-      );
-      $form['fbss_comments']['fbss_comments_userpoints'] = array(
-        '#type' => 'textfield',
-        '#title' => t("Userpoints for commenting on a status"),
-        '#default_value' => variable_get('fbss_comments_userpoints', 0),
-      );
-      $form['fbss_comments']['fbss_comments_userpoints_max'] = array(
-        '#type' => 'textfield',
-        '#title' => t('Maximum number of Userpoints from posting status comments per day'),
-        '#description' => t('Set to zero for no limit.') .' '.
-          t('Note that the actual number of points awarded per day could be higher than this if this value is not a multiple of the points given above.'),
-        '#default_value' => variable_get('fbss_comments_userpoints_max', 0),
-      );
-      $form['#validate'][] = '_fbss_comments_userpoints_validate';
-    }
     return $form;
@@ -79,35 +57,12 @@ function _fbss_userpoints_validate($form
 /**
- * Validate function for the Userpoints settings.
- */
-function _fbss_comments_userpoints_validate($form, &$form_state) {
-  $v = $form_state['values'];
-  if (!is_numeric($v['fbss_comments_userpoints']) || $v['fbss_comments_userpoints'] < 0) {
-    form_set_error('fbss_comments_userpoints', t("Userpoints for commenting on a status must be a non-negative integer."));
-  }
-  if (!is_numeric($v['fbss_comments_userpoints_max']) || $v['fbss_comments_userpoints_max'] < 0) {
-    form_set_error('fbss_comments_userpoints_max', t('The maximum number of Userpoints from posting status comments per day must be a non-negative integer.'));
-  }
-}
-
-/**
- * Implementation of hook_facebook_status_save().
+ * Implements hook_facebook_status_save().
  */
-function fbss_userpoints_facebook_status_save($status, $context, $edit, $options) {
-  // If the FBSMP module is enabled and there is an attachment on this status,
-  // FBSMP will take care of handling userpoints.
-  if (!empty($options['has attachment'])) {
-    return;
-  }
-  // Don't give points for editing.
-  if ($edit) {
-    return;
-  }
+function fbss_userpoints_facebook_status_save($status, $context, $edit) {
   $sender = _facebook_status_user_load($status->sender);
   $recipient = $context['handler']->load_recipient($status->recipient);
-  $points_today = db_result(db_query("SELECT SUM(points) FROM {userpoints_txn}
-    WHERE uid = %d AND time_stamp > %d
-      AND (operation = 'facebook_status add own' OR operation = 'facebook_status add other')
-      AND expired = 0 AND status = 0",
-    $sender->uid, time() - 86400));
-  if (variable_get('facebook_status_userpoints_max', 0) && $points_today >= variable_get('facebook_status_userpoints_max', 0)) {
+  $points_today = db_query("SELECT SUM(points) FROM {userpoints_txn}
+    WHERE uid = :uid AND time_stamp > :time_stamp
+      AND (operation = :(operation OR operation = :operation)
+      AND expired = :expired AND status = :status", array(':uid' => $sender->uid, ':time_stamp' => REQUEST_TIME - 86400, ':(operation' => 'facebook_status add own', ':operation' => 'facebook_status add other', ':expired' => 0, ':status' => 0))->fetchField();
+  if (variable_get('facebook_status_userpoints_max', 5) && $points_today > variable_get('facebook_status_userpoints_max', 5)) {
     return;
@@ -122,3 +77,3 @@ function fbss_userpoints_facebook_status
   if ($status->sender == $status->recipient && $status->type == 'user') {
-    $params['description'] = t('!user posted a new status.', array('!user' => theme('username', $sender)));
+    $params['description'] = t('!user posted a new status.', array('!user' => theme('username', array('account' => $sender))));
     $params['points'] = variable_get('facebook_status_userpoints_own', 0);
@@ -128,3 +83,3 @@ function fbss_userpoints_facebook_status
     $params['description'] = t('!sender wrote a message to !recipient',
-      array('!sender' => theme('username', $sender), '!recipient' => $context['handler']->recipient_link($recipient)));
+      array('!sender' => theme('username', array('account' => $sender)), '!recipient' => $context['handler']->recipient_link($recipient)));
     $params['points'] = variable_get('facebook_status_userpoints_other', 0);
@@ -134,3 +89,3 @@ function fbss_userpoints_facebook_status
     $params['description'] = t('!sender wrote a message at !recipient',
-      array('!sender' => theme('username', $sender), '!recipient' => $context['handler']->recipient_link($recipient)));
+      array('!sender' => theme('username', array('account' => $sender)), '!recipient' => $context['handler']->recipient_link($recipient)));
     $params['points'] = variable_get('facebook_status_userpoints_other', 0);
@@ -142,17 +97,9 @@ function fbss_userpoints_facebook_status
 /**
- * Implementation of hook_facebook_status_delete().
+ * Implements hook_facebook_status_delete().
  */
-function fbss_userpoints_facebook_status_delete($status, $meta = array()) {
-  // If the FBSMP module is enabled and there is an attachment on this status,
-  // FBSMP will take care of handling userpoints.
-  if (!empty($options['has attachment'])) {
-    return;
-  }
-  $sender = _facebook_status_user_load($status->sender);
+function fbss_userpoints_facebook_status_delete($sid) {
+  $status = facebook_status_load($sid);
+  $sender = _facebook_status_user_load(array('uid' => $status->sender));
   global $user;
-  $result = db_fetch_object(db_query(
-    "SELECT points FROM {userpoints_txn} WHERE operation LIKE 'facebook_status add%%' AND reference = %d AND uid = %d",
-    $status->sid,
-    $sender->uid
-  ));
+  $result = db_fetch_object(db_query("SELECT points FROM {userpoints_txn} WHERE operation LIKE 'facebook_status add%%' AND reference = :reference AND uid = :uid", array(':reference' => $sid, ':uid' => $sender->uid)));
   $params = array(
@@ -163,3 +110,3 @@ function fbss_userpoints_facebook_status
   if ($user->uid == $sender->uid) {
-    $params['description'] = t('!user deleted a status message.', array('!user' => theme('username', $user)));
+    $params['description'] = t('!user deleted a status message.', array('!user' => theme('username', array('account' => $user))));
   }
@@ -167,50 +114,4 @@ function fbss_userpoints_facebook_status
     $params['description'] = t('!user deleted a message by !sender',
-      array('!user' => theme('username', $user), '!sender' => theme('username', $sender)));
-  }
-  userpoints_userpointsapi($params);
-}
-
-/**
- * Implementation of hook_fbss_comments_after_save().
- */
-function fbss_userpoints_fbss_comments_after_save($comment, $edit) {
-  // Don't give points for editing.
-  if ($edit) {
-    return;
-  }
-  $account = _facebook_status_user_load($comment->uid);
-  $points_today = db_result(db_query("SELECT SUM(points) FROM {userpoints_txn}
-    WHERE uid = %d AND time_stamp > %d
-      AND operation = 'fbss_comments add'
-      AND expired = 0 AND status = 0",
-    $comment->uid, time() - 86400));
-  if (variable_get('fbss_comments_userpoints_max', 0) && $points_today >= variable_get('fbss_comments_userpoints_max', 0)) {
-    return;
+      array('!user' => theme('username', array('account' => $user)), '!sender' => theme('username', array('account' => $sender))));
   }
-  $params = array(
-    'uid' => $comment->uid,
-    'reference' => $comment->cid,
-    'description' => t('!user posted a new status comment.', array('!user' => theme('username', $account))),
-    'points' => variable_get('fbss_comments_userpoints', 0),
-    'operation' => 'fbss_comments add',
-    // Unknown purpose.
-    //'entity_id' => $cid,
-    //'entity_type' => 'fbss_comments',
-  );
-  userpoints_userpointsapi($params);
-}
-
-/**
- * Implementation of hook_fbss_comments_delete().
- */
-function fbss_userpoints_fbss_comments_delete($cid) {
-  $comment = fbss_comments_load($cid);
-  $account = _facebook_status_user_load($comment->uid);
-  $result = db_fetch_object(db_query("SELECT points FROM {userpoints_txn} WHERE operation = 'fbss_comments add' AND reference = %d AND uid = %d", $cid, $comment->uid));
-  $params = array(
-    'uid' => $comment->uid,
-    'points' => 0 - $result->points,
-    'operation' => 'fbss_comments delete',
-    'description' => t('!user deleted a status comment.', array('!user' => theme('username', $account))),
-  );
   userpoints_userpointsapi($params);
diff -u -p1 -r -N -b -B -w facebook_status_6_3/templates/facebook-status-item.tpl.php screamwork_fbss7/templates/facebook-status-item.tpl.php
--- facebook_status_6_3/templates/facebook-status-item.tpl.php	2011-06-10 03:18:02.690535100 -0400
+++ screamwork_fbss7/templates/facebook-status-item.tpl.php	2011-05-25 20:53:28.000000000 -0400
@@ -32,11 +32,2 @@
  *
- * If the Facebook-style Statuses Private Statuses module is enabled, these
- * variables are also available:
- * - $private: Whether the status update is private or not
- * - $private_text: The translated version of either "Private" or "Public"
- *
- * If the (third-party) Facebook-style Micropublisher module is enabled, these
- * variables are also available:
- * - $attachment: The themed attachment to the status update
- *
  * Other modules may add additional variables.
@@ -44,3 +35,4 @@
 ?>
-<div id="facebook-status-item-<?php echo $sid; ?>" class="facebook-status-item facebook-status-type-<?php echo $type; ?><?php if ($self): ?> facebook-status-self-update<?php endif; ?><?php if ($page): ?> facebook-status-page<?php endif; ?><?php if ($private): ?> facebook-status-private<?php endif; ?>">
+
+<div id="facebook-status-item-<?php echo $sid; ?>" class="facebook-status-item facebook-status-type-<?php echo $type; ?><?php if ($self): ?> facebook-status-self-update<?php endif; ?><?php if ($page): ?> facebook-status-page<?php endif; ?>">
   <?php if ($sender_picture): ?>
@@ -48,3 +40,3 @@
   <?php endif; ?>
-  <span class="facebook-status-sender"><?php echo $sender_link; ?></span>
+  <span class="facebook-status-sender"><?php echo $sender_name; ?></span>
   <?php if ($type == 'user' && !$self): ?>
@@ -52,9 +44,3 @@
   <?php endif; ?>
-  <?php if ($private): ?>
-    <span class="facebook-status-private-text"><?php echo $private_text; ?></span>
-  <?php endif; ?>
   <span class="facebook-status-content"><?php echo $message; ?></span>
-  <?php if ($attachment): ?>
-    <div class="fbsmp"><?php echo $attachment; ?></div>
-  <?php endif; ?>
   <div class="facebook-status-details">
@@ -65,3 +51,3 @@
     <?php if ($links): ?>
-      <span class="facebook-status-links"><?php echo $links; ?></span>
+      <div class="facebook-status-links"><?php echo $links; ?></div>
     <?php endif; ?>
diff -u -p1 -r -N -b -B -w facebook_status_6_3/views-view-row-rss.tpl.php screamwork_fbss7/views-view-row-rss.tpl.php
--- facebook_status_6_3/views-view-row-rss.tpl.php	2011-04-09 19:23:26.609621600 -0400
+++ screamwork_fbss7/views-view-row-rss.tpl.php	2011-05-25 20:53:28.000000000 -0400
@@ -10,6 +11,22 @@
   <item>
-    <title><?php print $title; ?></title>
-    <link><?php print $link; ?></link>
-    <description><?php print $description; ?></description>
-    <?php print $item_elements; ?>
+    <title>
+<?php
+print $title;
+?>
+</title>
+    <link>
+<?php
+print $link;
+?>
+</link>
+    <description>
+<?php
+print $description;
+?>
+</description>
+
+<?php
+print $item_elements;
+?>
+
   </item>
