diff -urp ../dp_installed_files/activitystream_orig/DEVELOPERS.txt sites/all/modules/activitystream/DEVELOPERS.txt
--- ../dp_installed_files/activitystream_orig/DEVELOPERS.txt	2008-03-25 19:46:11.000000000 -0500
+++ sites/all/modules/activitystream/DEVELOPERS.txt	2008-07-28 19:35:08.000000000 -0500
@@ -39,16 +39,16 @@ If the site you are integrating provides
 For example, the Digg module does this...
 
 function activitystream_digg_streamapi($user) {
-	// This user doesn't have a digg ID entered
-	if (!$user->userid) {
-		return;
-	}
-	
-	// Use the activitystream_feed module to pull in the user's
-	// history. 
-	$user->feed = 'http://digg.com/users/'.$user->userid . '/history.rss';
-	$items = activitystream_feed_streamapi($user);
-	return $items;
+  // This user doesn't have a digg ID entered
+  if (!$user->userid) {
+    return;
+  }
+  
+  // Use the activitystream_feed module to pull in the user's
+  // history. 
+  $user->feed = 'http://digg.com/users/'.$user->userid . '/history.rss';
+  $items = activitystream_feed_streamapi($user);
+  return $items;
 }
 
 activitystream_admin
@@ -61,22 +61,22 @@ Modules should build a form using an arr
 Example: 
 
 function activitystream_flickr_activitystream_admin() {
-	$form['activitystream_flickr'] = array(
-		'#type' => 'fieldset',
-		'#title' => t("Flickr"),
-		'#description' => t("Flickr API settings."),
-		'#weight' => 1,
-		'#collapsible' => TRUE,
-		'#collapsed' => TRUE
-	);
-	$form['activitystream_flickr']['activitystream_flickr_key'] = array(
-		'#type' => 'textfield',
-		'#title' => t("API Key"),
-		'#description' => t("Your Flickr API Key"),
-		'#default_value' => variable_get('activitystream_flickr_key', ''),
-		'#required' => FALSE
-	);
-	return $form;
+  $form['activitystream_flickr'] = array(
+    '#type' => 'fieldset',
+    '#title' => t("Flickr"),
+    '#description' => t("Flickr API settings."),
+    '#weight' => 1,
+    '#collapsible' => TRUE,
+    '#collapsed' => TRUE
+  );
+  $form['activitystream_flickr']['activitystream_flickr_key'] = array(
+    '#type' => 'textfield',
+    '#title' => t("API Key"),
+    '#description' => t("Your Flickr API Key"),
+    '#default_value' => variable_get('activitystream_flickr_key', ''),
+    '#required' => FALSE
+  );
+  return $form;
 }
 
 activitystream_settings
@@ -91,7 +91,7 @@ Return the form array.
 Example:
 
 function activitystream_flickr_activitystream_settings() {
-	$form['activitystream_flickr'] = array(
+  $form['activitystream_flickr'] = array(
       '#type' => 'fieldset',
       '#title' => t('Flickr settings'));
   $form['activitystream_flickr']['activitystream_flickr_userid'] = array(
@@ -99,7 +99,7 @@ function activitystream_flickr_activitys
     '#title' => t('Username'),
     '#default_value' => $edit['activitystream_flickr_userid'],
     '#description' => t('The username for your Flickr account'));
-  return $form;	
+  return $form;  
 }
 
 Theme Functions
@@ -113,7 +113,7 @@ Return an image used to identify the act
 Example:
 
 function theme_activitystream_flickr_icon() {
-	return theme_image(drupal_get_path('module', 'activitystream_flickr') . '/flickr.png', 'Flickr');
+  return theme_image(drupal_get_path('module', 'activitystream_flickr') . '/flickr.png', 'Flickr');
 }
 
 
@@ -134,9 +134,9 @@ The item date and username should be run
 It is recommended that your item theme follow the HTML conventions shown in the example. This will allow theme designers to style stream items using only CSS.
 
 function theme_activitystream_flickr_item($action) {
-	$node = node_load($action->nid);
-	$date = theme('activitystream_date',$node->created);
-	$user = user_load(array('uid' => $node->uid));
-	$name = theme('activitystream_username',$user);
-	return '<span class="activitystream-item">' . theme('activitystream_flickr_icon') . " <span>$name posted " . l($node->title, $action->link) . " <span class=\"activitystream-created\">$date</span></span> " . l('#', 'node/' . $node->nid, array('class' => 'permalink')) . '</span>';
+  $node = node_load($action->nid);
+  $date = theme('activitystream_date',$node->created);
+  $user = user_load(array('uid' => $node->uid));
+  $name = theme('activitystream_username',$user);
+  return '<span class="activitystream-item">' . theme('activitystream_flickr_icon') . " <span>$name posted " . l($node->title, $action->link) . " <span class=\"activitystream-created\">$date</span></span> " . l('#', 'node/' . $node->nid, array('class' => 'permalink')) . '</span>';
 }
\ No newline at end of file
diff -urp ../dp_installed_files/activitystream_orig/activitystream.css sites/all/modules/activitystream/activitystream.css
--- ../dp_installed_files/activitystream_orig/activitystream.css	2008-03-25 19:46:11.000000000 -0500
+++ sites/all/modules/activitystream/activitystream.css	2008-07-28 19:35:08.000000000 -0500
@@ -3,24 +3,24 @@
 */
 
 .activitystream-item ul {
-	list-style-type: none;
-	padding: 0; margin: 0;
+  list-style-type: none;
+  padding: 0; margin: 0;
 }
 
 .activitystream-item li {
-	list-style-type: none !important;
-	padding: 5px 0 !important; 
-	margin: 0 !important;
+  list-style-type: none !important;
+  padding: 5px 0 !important; 
+  margin: 0 !important;
 }
 
 #activitystream h3.datehead {
-	margin-top: 1em;
-	border-bottom: 1px solid #ccc;
-	color: #999;
-	font-size: 0.9em;
+  margin-top: 1em;
+  border-bottom: 1px solid #ccc;
+  color: #999;
+  font-size: 0.9em;
 }
 
 .activitystream-created, #activitystream a.permalink {
-	color: #999;
-	font-size: 0.9em;
+  color: #999;
+  font-size: 0.9em;
 }
diff -urp ../dp_installed_files/activitystream_orig/activitystream.install sites/all/modules/activitystream/activitystream.install
--- ../dp_installed_files/activitystream_orig/activitystream.install	2008-05-20 17:35:54.000000000 -0500
+++ sites/all/modules/activitystream/activitystream.install	2008-07-28 19:35:08.000000000 -0500
@@ -2,6 +2,11 @@
 // $Id: activitystream.install,v 1.3.2.1 2008/05/20 22:35:54 akalsey Exp $
 
 /**
+ * @file
+ * Installs the tables for activitystream.
+ */
+
+/**
  * Implementation of hook_install()
  *
  * This will automatically install the database tables for the Activity Stream
diff -urp ../dp_installed_files/activitystream_orig/activitystream.module sites/all/modules/activitystream/activitystream.module
--- ../dp_installed_files/activitystream_orig/activitystream.module	2008-05-20 17:35:54.000000000 -0500
+++ sites/all/modules/activitystream/activitystream.module	2008-07-28 19:37:34.000000000 -0500
@@ -1,5 +1,10 @@
 <?php
 // $Id: activitystream.module,v 1.2.2.1 2008/05/20 22:35:54 akalsey Exp $
+/**
+ * @file
+ * The main module for the Activity Stream set.
+ */
+
 
 // uid, module, userid, password, feed, lastfetch
 /**
@@ -26,43 +31,43 @@
  * @return
  *   True if the information was saved
  */
-function activitystream_save_account($module, &$user,$params) {
-	if (count($params) == 0) {
-		return false;
-	}
-	$result = db_query('DELETE FROM {activitystream_accounts} WHERE module = "%s" and uid = %d',$module,$user->uid);
-	if (empty($params['userid']) && empty($params['password']) && empty($params['feed'])) {
-		return;
-	}
-	// Save multiline feed fields each to a different feed
-	$arrFeeds = split("\n",$params['feed']);
-	foreach ($arrFeeds as $url) {
-		$params['feed'] = $url;
-		$result = db_query('INSERT INTO {activitystream_accounts} (module, uid, userid, password, feed) VALUES ("%s", %d, "%s", "%s", "%s")', $module,$user->uid,$params['userid'],$params['password'],$params['feed']);		
-	}
-	return true;
+function activitystream_save_account($module, &$user, $params) {
+  if (count($params) == 0) {
+    return FALSE;
+  }
+  $result = db_query('DELETE FROM {activitystream_accounts} WHERE module = "%s" and uid = %d', $module, $user->uid);
+  if (empty($params['userid']) && empty($params['password']) && empty($params['feed'])) {
+    return;
+  }
+  // Save multiline feed fields each to a different feed
+  $arrfeeds = split("\n", $params['feed']);
+  foreach ($arrfeeds as $url) {
+    $params['feed'] = $url;
+    $result = db_query('INSERT INTO {activitystream_accounts} (module, uid, userid, password, feed) VALUES ("%s", %d, "%s", "%s", "%s")', $module, $user->uid, $params['userid'], $params['password'], $params['feed']);    
+  }
+  return TRUE;
 }
 
 function activitystream_menu() {
-	$items = array();
+  $items = array();
 
-	$items['admin/settings/activitystream'] = array(
-		'title' => 'Activity Stream',
-		'description' => 'Administer settings for activity feeds',
-		'page callback' => 'drupal_get_form',
-		'page arguments' => array('activitystream_settings'),
-		'access arguments' => array('access administration pages'),
-		'type' => MENU_NORMAL_ITEM,
-	);
-
-	$items['stream'] = array(
-	 	'title' => 'Activity Stream',
-		'page callback' => 'activitystream_page',
-		'access arguments' => array('access content'),
-		'type' => MENU_CALLBACK
-	);
+  $items['admin/settings/activitystream'] = array(
+    'title' => 'Activity Stream',
+    'description' => 'Administer settings for activity feeds',
+    'page callback' => 'drupal_get_form',
+    'page arguments' => array('activitystream_settings'),
+    'access arguments' => array('access administration pages'),
+    'type' => MENU_NORMAL_ITEM,
+  );
+
+  $items['stream'] = array(
+     'title' => 'Activity Stream',
+    'page callback' => 'activitystream_page',
+    'access arguments' => array('access content'),
+    'type' => MENU_CALLBACK
+  );
 
-	return $items;
+  return $items;
 }
 
 /**
@@ -109,104 +114,104 @@ function activitystream_form(&$node) {
  * items to the Activity Stream settings page.
  */
 function activitystream_form_alter(&$form, &$form_state, $form_id) {
-	unset($form['Activity Stream']);
-	if ($form_id == 'activitystream_settings') {
-		foreach (module_implements('activitystream_admin') as $name) {
-			$function = $name .'_activitystream_admin';
-		    $elements = $function();
-			foreach ($elements as $key=>$value) {
-				$form[$key] = $value;
-			}
-		}
-	}
+  unset($form['Activity Stream']);
+  if ($form_id == 'activitystream_settings') {
+    foreach (module_implements('activitystream_admin') as $name) {
+      $function = $name .'_activitystream_admin';
+        $elements = $function();
+      foreach ($elements as $key => $value) {
+        $form[$key] = $value;
+      }
+    }
+  }
 }
 
 /**
  * Implementation of hook_user()
  */
 function activitystream_user($op, &$edit, &$account, $category = NULL) {
-	switch ($op) {
+  switch ($op) {
     case 'form':
-		if ($category == 'Activity Stream') {
-			foreach (module_implements('activitystream_settings') as $name) {
-				$function = $name .'_activitystream_settings';
-			    $elements = $function($edit);
-				foreach ($elements as $key=>$value) {
-					$form[$key] = $value;
-				}
-			}
-		}
-		return $form;
-		break;
+    if ($category == 'Activity Stream') {
+      foreach (module_implements('activitystream_settings') as $name) {
+        $function = $name .'_activitystream_settings';
+          $elements = $function($edit);
+        foreach ($elements as $key => $value) {
+          $form[$key] = $value;
+        }
+      }
+    }
+    return $form;
+    break;
     case 'update':
-		foreach (module_implements('activitystream_settings') as $name) {
-			$arrDetails = array();
-			if (array_key_exists($name . '_userid',$edit)) {
-				$arrDetails['userid'] = $edit[$name . '_userid'];
-			}
-			if (array_key_exists($name . '_password',$edit)) {
-				$arrDetails['password'] = $edit[$name . '_password'];
-			}
-			if (array_key_exists($name . '_feed',$edit)) {
-				$arrDetails['feed'] = $edit[$name . '_feed'];
-			}
-			activitystream_save_account($name, $account, $arrDetails);				
-		}
-		break;
-	  case 'view':
-		$items = _activitystream_get_activity($account);
-		$title = variable_get('activitystream_title', 'Activity Stream');
-		$account->content['summary']['activitystream'] =  array(
+    foreach (module_implements('activitystream_settings') as $name) {
+      $arrdetails = array();
+      if (array_key_exists($name .'_userid', $edit)) {
+        $arrdetails['userid'] = $edit[$name .'_userid'];
+      }
+      if (array_key_exists($name .'_password', $edit)) {
+        $arrdetails['password'] = $edit[$name .'_password'];
+      }
+      if (array_key_exists($name .'_feed', $edit)) {
+        $arrdetails['feed'] = $edit[$name .'_feed'];
+      }
+      activitystream_save_account($name, $account, $arrdetails);        
+    }
+    break;
+    case 'view':
+    $items = _activitystream_get_activity($account);
+    $title = variable_get('activitystream_title', 'Activity Stream');
+    $account->content['summary']['activitystream'] =  array(
       '#type' => 'user_profile_item',
       '#title' => t($title),
-      '#value' => theme('activitystream',$items),
+      '#value' => theme('activitystream', $items),
       '#attributes' => array('class' => 'user'),
      );
-		break;
+    break;
   }
 }
 
 function activitystream_page($uid = 0) {
-	drupal_add_css(drupal_get_path('module', 'activitystream') .'/activitystream.css');
-	$title = variable_get('activitystream_title', 'Activity Stream');
-	if ($uid) {
-		$user = user_load(array('uid' => $uid));
-		drupal_set_title(check_plain($user->name .'\'s ' . $title));
-		$items = _activitystream_get_activity($user);
-		drupal_set_breadcrumb(array(l(t('Home'), NULL), l(t('Activity Stream'), 'stream')));
-	} 
-	else {
-		drupal_set_title(check_plain('All user\'s ' . $title . 's'));
-		$items = _activitystream_get_activity();		
-	}
-	$output = theme('activitystream',$items);
-	
-	//$output = theme('item_list',$items);
-	if ($page) {
+  drupal_add_css(drupal_get_path('module', 'activitystream') .'/activitystream.css');
+  $title = variable_get('activitystream_title', 'Activity Stream');
+  if ($uid) {
+    $user = user_load(array('uid' => $uid));
+    drupal_set_title(check_plain($user->name .'\'s '. $title));
+    $items = _activitystream_get_activity($user);
+    drupal_set_breadcrumb(array(l(t('Home'), NULL), l(t('Activity Stream'), 'stream')));
+  } 
+  else {
+    drupal_set_title(check_plain('All user\'s '. $title .'s'));
+    $items = _activitystream_get_activity();    
+  }
+  $output = theme('activitystream', $items);
+  
+  //$output = theme('item_list',$items);
+  if ($page) {
     // Breadcrumb navigation
     $breadcrumb[] = l(t($title), 'stream');
     $breadcrumb[] = l($node->nid, 'node/');
     drupal_set_breadcrumb($breadcrumb);
-	}
+  }
   $pager = theme('pager', NULL, 15, 0);
   if (!empty($pager)) {
     $output .= $pager;
   }
   
-	return $output;
+  return $output;
 }
 
 /*
-	hook_view
+  hook_view
 */
 function activitystream_view($node, $teaser = FALSE, $page = FALSE) {
   $user = user_load(array('uid' => $node->uid));
   $title = variable_get('activitystream_title', 'Activity Stream');
   $node->body = check_markup($node->body, $node->format, FALSE);
 
-  $result = db_query('SELECT s.module, s.link, s.data, s.nid FROM {activitystream} s WHERE s.nid=%d LIMIT 1', $node->nid);			
+  $result = db_query_range('SELECT s.module, s.link, s.data, s.nid FROM {activitystream} s WHERE s.nid=%d', $node->nid, 0, 1);      
   $action = db_fetch_object($result);
-  $node->body .= theme('activitystream_view',$action);
+  $node->body .= theme('activitystream_view', $action);
 
   $node->content['body'] = array(
     '#value' => $node->body,
@@ -216,109 +221,111 @@ function activitystream_view($node, $tea
   if ($page) {
     // Breadcrumb navigation
     $breadcrumb[] = l(t($title), 'stream');
-    $breadcrumb[] = l($user->name .'\'s ' . $title, 'stream/'.$user->name);
+    $breadcrumb[] = l($user->name .'\'s '. $title, 'stream/'. $user->name);
     $breadcrumb[] = l($node->nid, 'node/');
     drupal_set_breadcrumb($breadcrumb);
   }
   return $node;
 }
 
-function activitystream_get_activity($user = null, $show_buddies = false, $count = 15) {
-	$items = _activitystream_get_activity($user, $show_buddies, $count);
-	return theme('activitystream',$items);
-}
-
-function _activitystream_get_activity($user = null, $show_buddies = false, $count = 15) {
-	if (module_exists('buddylist') && $show_buddies) {
-		$buddies = db_query('SELECT bl.buddy as bid FROM {buddylist} bl WHERE bl.uid = %d',$user->uid);
-		// Since a number of items might be from the same buddy, load the users now and stuff them
-		// into an array for later. This avoids loading the same user multiple times.
-		while ($buddy = db_fetch_object($buddies)) {
-			$objBuddy = user_load(array('uid' => $buddy->bid));
-    	}
-		if (count($arrUsers) == 0) {
-			// No buddies
-			return;
-		}
-
-		$query = 'SELECT n.title, n.nid, s.module, s.link, s.data, n.created FROM {activitystream} s, {node} n WHERE s.nid=n.nid AND n.status =1 AND n.uid in ('.join(',',array_keys($arrUsers)).') ORDER BY n.created DESC';
-		$countquery = 'SELECT count(*) FROM {activitystream} s, {node} n WHERE s.nid=n.nid AND n.status =1 AND n.uid in ('.join(',',array_keys($arrUsers)).') ORDER BY n.created DESC';
-	} elseif ($user->uid) {
-		$query = "SELECT n.title, n.nid, s.module, s.link, s.data, n.created FROM {activitystream} s, {node} n WHERE s.nid=n.nid AND n.status =1 AND n.uid = " . $user->uid . " ORDER BY n.created DESC";	
-		$countquery = "SELECT count(*) FROM {activitystream} s, {node} n WHERE s.nid=n.nid AND n.status =1 AND n.uid = " . $user->uid . " ORDER BY n.created";	
-	} else {
-		$query = 'SELECT n.title, n.nid, s.module, s.link, s.data, n.created FROM {activitystream} s, {node} n WHERE s.nid=n.nid AND n.status =1 ORDER BY n.created DESC';			
-		$countquery = 'SELECT count(*) FROM {activitystream} s, {node} n WHERE s.nid=n.nid AND n.status =1 ORDER BY n.created DESC';			
-	}
-	$datehead = '';
-	$stream = pager_query($query, $count, 0, $countquery);
-	while ($action = db_fetch_object($stream)) {
-		if (date('Ymd', $action->created) != $datehead) {
-			$datehead = date('Ymd', $action->created);
-			$items[] = '<h3 class="datehead">' . date('F j, Y',$action->created) . '</h3>'; 
-		}
-		
-		if (function_exists('theme_' . $action->module .'_item')) {
-			$theme_function = $action->module .'_item';
-		} 
-		else {
-			$theme_function = 'activitystream_item';
-		}
-		
-		$items[] = theme($theme_function,$action);			
-	}
-	return $items;
+function activitystream_get_activity($user = NULL, $show_buddies = FALSE, $count = 15) {
+  $items = _activitystream_get_activity($user, $show_buddies, $count);
+  return theme('activitystream', $items);
+}
+
+function _activitystream_get_activity($user = NULL, $show_buddies = FALSE, $count = 15) {
+  if (module_exists('buddylist') && $show_buddies) {
+    $buddies = db_query('SELECT bl.buddy as bid FROM {buddylist} bl WHERE bl.uid = %d', $user->uid);
+    // Since a number of items might be from the same buddy, load the users now and stuff them
+    // into an array for later. This avoids loading the same user multiple times.
+    while ($buddy = db_fetch_object($buddies)) {
+      $objbuddy = user_load(array('uid' => $buddy->bid));
+      }
+    if (count($arrusers) == 0) {
+      // No buddies
+      return;
+    }
+
+    $query = 'SELECT n.title, n.nid, s.module, s.link, s.data, n.created FROM {activitystream} s, {node} n WHERE s.nid=n.nid AND n.status =1 AND n.uid in ('. join(', ', array_keys($arrusers)) .') ORDER BY n.created DESC';
+    $countquery = 'SELECT count(*) FROM {activitystream} s, {node} n WHERE s.nid=n.nid AND n.status =1 AND n.uid in ('. join(', ', array_keys($arrusers)) .') ORDER BY n.created DESC';
+  }
+  elseif ($user->uid) {
+    $query = "SELECT n.title, n.nid, s.module, s.link, s.data, n.created FROM {activitystream} s, {node} n WHERE s.nid=n.nid AND n.status =1 AND n.uid = ". $user->uid ." ORDER BY n.created DESC";  
+    $countquery = "SELECT count(*) FROM {activitystream} s, {node} n WHERE s.nid=n.nid AND n.status =1 AND n.uid = ". $user->uid ." ORDER BY n.created";  
+  }
+  else {
+    $query = 'SELECT n.title, n.nid, s.module, s.link, s.data, n.created FROM {activitystream} s, {node} n WHERE s.nid=n.nid AND n.status =1 ORDER BY n.created DESC';      
+    $countquery = 'SELECT count(*) FROM {activitystream} s, {node} n WHERE s.nid=n.nid AND n.status =1 ORDER BY n.created DESC';      
+  }
+  $datehead = '';
+  $stream = pager_query($query, $count, 0, $countquery);
+  while ($action = db_fetch_object($stream)) {
+    if (date('Ymd', $action->created) != $datehead) {
+      $datehead = date('Ymd', $action->created);
+      $items[] = '<h3 class="datehead">'. date('F j, Y', $action->created) .'</h3>'; 
+    }
+    
+    if (function_exists('theme_'. $action->module .'_item')) {
+      $theme_function = $action->module .'_item';
+    } 
+    else {
+      $theme_function = 'activitystream_item';
+    }
+    
+    $items[] = theme($theme_function, $action);      
+  }
+  return $items;
 }
 
 function theme_activitystream_item($action) {
-	$node = node_load($action->nid);
-	$date = theme('activitystream_date',$node->created);
-	$user = user_load(array('uid' => $node->uid));
-	$name = theme('activitystream_username',$user);
-	if (function_exists('theme_'.$action->module .'_icon')) {
-		$theme_function = $action->module .'_icon';
-	} 
-	else {
-		$theme_function = 'activitystream_icon';
-	}
-	return '<span class="activitystream-item">' . theme($theme_function) . " <span>$name " . l($node->title, 'node/'. $node->nid) . " <span class=\"activitystream-created\">$date</span></span>" . l('#', 'node/' . $node->nid, array('class' => 'permalink')) . "</span>\n";
+  $node = node_load($action->nid);
+  $date = theme('activitystream_date', $node->created);
+  $user = user_load(array('uid' => $node->uid));
+  $name = theme('activitystream_username', $user);
+  if (function_exists('theme_'. $action->module .'_icon')) {
+    $theme_function = $action->module .'_icon';
+  } 
+  else {
+    $theme_function = 'activitystream_icon';
+  }
+  return '<span class="activitystream-item">'. theme($theme_function) ." <span>$name ". l($node->title, 'node/'. $node->nid) ." <span class=\"activitystream-created\">$date</span></span>". l('#', 'node/'. $node->nid, array('class' => 'permalink')) ."</span>\n";
 }
 
 
 function theme_activitystream($items) {
-	drupal_add_css(drupal_get_path('module', 'activitystream') .'/activitystream.css');
-	if (!count($items)) {
-	  $items = array(t('There are no activities to show.'));
-	}
-	return '<div id="activitystream">' . "\n" . theme('item_list',$items) . "\n</div>";
+  drupal_add_css(drupal_get_path('module', 'activitystream') .'/activitystream.css');
+  if (!count($items)) {
+    $items = array(t('There are no activities to show.'));
+  }
+  return '<div id="activitystream">'."\n". theme('item_list', $items) ."\n</div>";
 }
 
 function theme_activitystream_date($date) {
-	$date = date('g:ia',$date);
-	return $date;
+  $date = date('g:ia', $date);
+  return $date;
 }
 
 function theme_activitystream_username($user) {
-	$arrNames = split(' ',$user->name);
-	return l($arrNames[0],'user/' . $user->uid);
+  $arrnames = split(' ', $user->name);
+  return l($arrnames[0], 'user/'. $user->uid);
 }
 
 function theme_activitystream_view($activity) {
-	$node = node_load($activity->nid);
-	$icon_theme = $activity->module.'_icon';
-	$return = '<p class="activitystream-original">See original: ';
-	$return .= theme($icon_theme,$activity->data) . ' ' . l($node->title, $activity->link);
-	$return .= '</p>';
-	return $return;
+  $node = node_load($activity->nid);
+  $icon_theme = $activity->module .'_icon';
+  $return = '<p class="activitystream-original">See original: ';
+  $return .= theme($icon_theme, $activity->data) .' '. l($node->title, $activity->link);
+  $return .= '</p>';
+  return $return;
 }
 
 
 function activitystream_cron() {
-	module_load_include('inc', 'node', 'node.pages');
-	$result = db_query('SELECT uid, userid, password, feed, module from {activitystream_accounts}');
-	while ($user = db_fetch_object($result)) {
-		activitystream_invoke_streamapi($user);
-	}	
+  module_load_include('inc', 'node', 'node.pages');
+  $result = db_query('SELECT uid, userid, password, feed, module from {activitystream_accounts}');
+  while ($user = db_fetch_object($result)) {
+    activitystream_invoke_streamapi($user);
+  }  
 }
 
 
@@ -326,7 +333,7 @@ function activitystream_cron() {
  * Implementation of hook_settings()
  */
 function activitystream_settings() {
-	
+  
   $form['activitystream_title'] = array(
     '#type' => 'textfield',
     '#title' => t('Title'),
@@ -341,66 +348,67 @@ function activitystream_settings() {
 function activitystream_invoke_streamapi($user) {
   $return = array();
   if (module_hook($user->module, 'streamapi')) {
-  	$items = array();
+    $items = array();
     $function = $user->module .'_streamapi';
     $items = $function($user);
-  	if (is_array($items)) {
-  		foreach ($items as $activity) {
-  			$return[] = _activitystream_save($activity, $user, $user->module);		
-  		}		
-  	}
+    if (is_array($items)) {
+      foreach ($items as $activity) {
+        $return[] = _activitystream_save($activity, $user, $user->module);    
+      }    
+    }
   }
   return $return;
 }
 
 function _activitystream_save($activity, $user, $name) {
-	if (empty($activity['guid']) || !array_key_exists('guid',$activity)) {
-		$activity['guid'] = md5($name,$activity['link']);
-	} 
-	else {
-		$activity['guid'] = md5($activity['guid']);		
-	}
-	if (empty($activity['link'])) {
-		$activity['link'] = '';
-	}
-	if (empty($activity['data'])) {
-		$activity['data'] = '';
-	}
-	$node = db_fetch_object(db_query('SELECT nid FROM {activitystream} WHERE guid = "%s"',$activity['guid']));
-	if ($node->nid) {
-		node_load($node->nid);
-		$new = false;
-	} 
-	else {
-	  $node = new stdClass();	
-		$new = true;
-	}
-	$node->title = $activity['title'];
-	$node->body = $activity['body'];
-	$node->created = $activity['timestamp'];
-	$node->uid = $user->uid;
-	$node->type = 'activitystream';
-	$options = variable_get('node_options_activitystream', FALSE);
-	if (is_array($options)) {
-	  $node->status = in_array('status', $options) ? 1 : 0;
-	  $node->promote = in_array('promote', $options) ? 1 : 0;
-	  $node->sticky = in_array('sticky', $options) ? 1 : 0;
-	}
-	else {
-	  $node->status = 1;
-	}
-	if ($new) {
-		node_object_prepare($node);
-		$node->created = $activity['timestamp'];
-		$node->uid = $user->uid;
-		node_save($node);
-		
-	  $actions = db_query('INSERT into {activitystream} (nid,module, guid, link, data) VALUES (%d,"%s", "%s","%s","%s")',$node->nid,$name,$activity['guid'],$activity['link'],$activity['data']);		
-	} else {
-		node_save($node);
-	}
-	watchdog('activitystream', 'Added %title from %name', array('%title' => $node->title, '%name' => $name));
-	return $node->nid;
+  if (empty($activity['guid']) || !array_key_exists('guid', $activity)) {
+    $activity['guid'] = md5($name, $activity['link']);
+  } 
+  else {
+    $activity['guid'] = md5($activity['guid']);    
+  }
+  if (empty($activity['link'])) {
+    $activity['link'] = '';
+  }
+  if (empty($activity['data'])) {
+    $activity['data'] = '';
+  }
+  $node = db_fetch_object(db_query('SELECT nid FROM {activitystream} WHERE guid = "%s"', $activity['guid']));
+  if ($node->nid) {
+    node_load($node->nid);
+    $new = FALSE;
+  } 
+  else {
+    $node = new stdClass();  
+    $new = TRUE;
+  }
+  $node->title = $activity['title'];
+  $node->body = $activity['body'];
+  $node->created = $activity['timestamp'];
+  $node->uid = $user->uid;
+  $node->type = 'activitystream';
+  $options = variable_get('node_options_activitystream', FALSE);
+  if (is_array($options)) {
+    $node->status = in_array('status', $options) ? 1 : 0;
+    $node->promote = in_array('promote', $options) ? 1 : 0;
+    $node->sticky = in_array('sticky', $options) ? 1 : 0;
+  }
+  else {
+    $node->status = 1;
+  }
+  if ($new) {
+    node_object_prepare($node);
+    $node->created = $activity['timestamp'];
+    $node->uid = $user->uid;
+    node_save($node);
+    
+    $actions = db_query('INSERT into {activitystream} (nid,module, guid, link, data) VALUES (%d, "%s", "%s", "%s", "%s")', $node->nid, $name, $activity['guid'], $activity['link'], $activity['data']);    
+  }
+  else {
+    node_save($node);
+  }
+  watchdog('activitystream', 'Added %title from %name', array('%title' => $node->title, '%name' => $name));
+  return $node->nid;
 }
 
 function activitystream_theme() {
@@ -411,13 +419,13 @@ function activitystream_theme() {
     'activitystream' => array(
       'arguments' => array('items' => NULL),
     ),
-		'activitystream_date' => array(
+    'activitystream_date' => array(
       'arguments' => array('date' => NULL),
     ),
-		'activitystream_username' => array(
+    'activitystream_username' => array(
       'arguments' => array('user' => NULL),
     ),
-		'activitystream_view' => array(
+    'activitystream_view' => array(
       'arguments' => array('activity' => NULL),
     ),
   );
@@ -437,8 +445,8 @@ function activitystream_block($op = 'lis
     $block = array();
     switch ($delta) {
       case 0:
-				$title = variable_get('activitystream_title', 'Activity Stream');
-		    $block['subject'] = t($title);
+        $title = variable_get('activitystream_title', 'Activity Stream');
+        $block['subject'] = t($title);
         $block['content'] = block_activitystream_content(0);
         break;
       
@@ -452,13 +460,13 @@ function activitystream_block($op = 'lis
  */
 
 function block_activitystream_content($which_block) {
-	global $user;
-	
+  global $user;
+  
   switch ($which_block) {
     case 0:
       $items = _activitystream_get_activity($user);
-		  
-    return theme('activitystream',$items);
+      
+    return theme('activitystream', $items);
 
   }
 }
diff -urp ../dp_installed_files/activitystream_orig/activitystream_delicious/activitystream_delicious.module sites/all/modules/activitystream/activitystream_delicious/activitystream_delicious.module
--- ../dp_installed_files/activitystream_orig/activitystream_delicious/activitystream_delicious.module	2008-05-20 17:35:54.000000000 -0500
+++ sites/all/modules/activitystream/activitystream_delicious/activitystream_delicious.module	2008-07-28 19:35:08.000000000 -0500
@@ -1,6 +1,10 @@
 <?php
 // $Id: activitystream_delicious.module,v 1.2.2.1 2008/05/20 22:35:54 akalsey Exp $
-
+/**
+ * @file
+ * The module for importing del.icio.us links
+ */
+ 
 /*
  * The API passes in a $user object that contains four properties:
  * uid, userid, password, feed. These properties contain the account
@@ -8,18 +12,18 @@
  * uid of their Drupal account.
  */
 function activitystream_delicious_streamapi($user) {
-	// This user doesn't have a Delicious ID entered
-	// into their settings. Move along. Nothing
-	// to see here.
-	if (!$user->userid) {
-		return;
-	}
-	
-	// Use the activitystream_feed module to pull in the user's
-	// del.icio.us links
-	$user->feed = 'http://del.icio.us/rss/'.$user->userid;
-	$items = activitystream_feed_streamapi($user);
-	return $items;
+  // This user doesn't have a Delicious ID entered
+  // into their settings. Move along. Nothing
+  // to see here.
+  if (!$user->userid) {
+    return;
+  }
+  
+  // Use the activitystream_feed module to pull in the user's
+  // del.icio.us links
+  $user->feed = 'http://del.icio.us/rss/'. $user->userid;
+  $items = activitystream_feed_streamapi($user);
+  return $items;
 }
 
 
@@ -39,7 +43,7 @@ function activitystream_delicious_stream
  * 
  */
 function activitystream_delicious_activitystream_settings(&$edit) {
-	$form['activitystream_delicious'] = array(
+  $form['activitystream_delicious'] = array(
       '#type' => 'fieldset',
       '#title' => t('Del.icio.us settings'));
   $form['activitystream_delicious']['activitystream_delicious_userid'] = array(
@@ -47,19 +51,19 @@ function activitystream_delicious_activi
     '#title' => t('Username'),
     '#default_value' => $edit['activitystream_delicious_userid'],
     '#description' => t('The username for your Del.icio.us account'));
-  return $form;	
+  return $form;  
 }
 
 function theme_activitystream_delicious_icon() {
-	return theme_image(drupal_get_path('module', 'activitystream_delicious') . '/delicious.png', 'Del.icio.us');
+  return theme_image(drupal_get_path('module', 'activitystream_delicious') .'/delicious.png', 'Del.icio.us');
 }
 
 function theme_activitystream_delicious_item($action) {
-	$node = node_load($action->nid);
-	$date = theme('activitystream_date',$node->created);
-	$user = user_load(array('uid' => $node->uid));
-	$name = theme('activitystream_username',$user);
-	return '<span class="activitystream-item">' . theme('activitystream_delicious_icon') . " <span>$name linked to " . l($node->title, $action->link) . " <span class=\"activitystream-created\">$date</span></span>" . l('#', 'node/' . $node->nid, array('attributes' => array('class' => 'permalink'))) . '</span>';
+  $node = node_load($action->nid);
+  $date = theme('activitystream_date', $node->created);
+  $user = user_load(array('uid' => $node->uid));
+  $name = theme('activitystream_username', $user);
+  return '<span class="activitystream-item">'. theme('activitystream_delicious_icon') ." <span>$name linked to ". l($node->title, $action->link) ." <span class=\"activitystream-created\">$date</span></span>". l('#', 'node/'. $node->nid, array('attributes' => array('class' => 'permalink'))) .'</span>';
 }
 
 function activitystream_delicious_theme() {
diff -urp ../dp_installed_files/activitystream_orig/activitystream_digg/activitystream_digg.module sites/all/modules/activitystream/activitystream_digg/activitystream_digg.module
--- ../dp_installed_files/activitystream_orig/activitystream_digg/activitystream_digg.module	2008-05-20 17:35:54.000000000 -0500
+++ sites/all/modules/activitystream/activitystream_digg/activitystream_digg.module	2008-07-28 19:35:08.000000000 -0500
@@ -1,6 +1,11 @@
 <?php
 // $Id: activitystream_digg.module,v 1.1.4.1 2008/05/20 22:35:54 akalsey Exp $
 
+/**
+ * @file
+ * The module for importing digg links.
+ */
+ 
 /*
  * The API passes in a $user object that contains four properties:
  * uid, userid, password, feed. These properties contain the account
@@ -8,16 +13,16 @@
  * uid of their Drupal account.
  */
 function activitystream_digg_streamapi($user) {
-	// This user doesn't have a digg ID entered
-	if (!$user->userid) {
-		return;
-	}
-	
-	// Use the activitystream_feed module to pull in the user's
-	// history. 
-	$user->feed = 'http://digg.com/users/'.$user->userid . '/history.rss';
-	$items = activitystream_feed_streamapi($user);
-	return $items;
+  // This user doesn't have a digg ID entered
+  if (!$user->userid) {
+    return;
+  }
+  
+  // Use the activitystream_feed module to pull in the user's
+  // history. 
+  $user->feed = 'http://digg.com/users/'. $user->userid .'/history.rss';
+  $items = activitystream_feed_streamapi($user);
+  return $items;
 }
 
 
@@ -37,7 +42,7 @@ function activitystream_digg_streamapi($
  * 
  */
 function activitystream_digg_activitystream_settings(&$edit) {
-	$form['activitystream_digg'] = array(
+  $form['activitystream_digg'] = array(
     '#type' => 'fieldset',
     '#title' => t('Digg settings'));
   $form['activitystream_digg']['activitystream_digg_userid'] = array(
@@ -45,19 +50,19 @@ function activitystream_digg_activitystr
     '#title' => t('Username'),
     '#default_value' => $edit['activitystream_digg_userid'],
     '#description' => t('Your digg username'));
-  return $form;	
+  return $form;  
 }
 
 function theme_activitystream_digg_icon() {
-	return theme_image(drupal_get_path('module', 'activitystream_digg') . '/digg.png', 'Digg');
+  return theme_image(drupal_get_path('module', 'activitystream_digg') .'/digg.png', 'Digg');
 }
 
 function theme_activitystream_digg_item($activity) {
-	$node = node_load($activity->nid);
-	$date = theme('activitystream_date',$node->created);
-	$user = user_load(array('uid' => $node->uid));
-	$name = theme('activitystream_username',$user);
-	return '<span class="activitystream-item">' . theme('activitystream_digg_icon') . " <span>$name dugg " . l($node->title, $activity->link) . " <span class=\"activitystream-created\">$date</span></span>" . l('#', 'node/' . $node->nid, array('class' => 'permalink')) . '</span>';
+  $node = node_load($activity->nid);
+  $date = theme('activitystream_date', $node->created);
+  $user = user_load(array('uid' => $node->uid));
+  $name = theme('activitystream_username', $user);
+  return '<span class="activitystream-item">'. theme('activitystream_digg_icon') ." <span>$name dugg ". l($node->title, $activity->link) ." <span class=\"activitystream-created\">$date</span></span>". l('#', 'node/'. $node->nid, array('class' => 'permalink')) .'</span>';
 }
 
 function activitystream_digg_theme() {
diff -urp ../dp_installed_files/activitystream_orig/activitystream_feed/activitystream_feed.module sites/all/modules/activitystream/activitystream_feed/activitystream_feed.module
--- ../dp_installed_files/activitystream_orig/activitystream_feed/activitystream_feed.module	2008-05-20 17:35:54.000000000 -0500
+++ sites/all/modules/activitystream/activitystream_feed/activitystream_feed.module	2008-07-28 19:35:08.000000000 -0500
@@ -1,6 +1,51 @@
 <?php
 // $Id: activitystream_feed.module,v 1.2.2.1 2008/05/20 22:35:54 akalsey Exp $
-require_once 'simplepie.inc';
+
+/**
+ * @file
+ * The module for importing feeds. 
+ * This is required by lastfm, twitter, digg and delicious.
+ */
+
+$path = drupal_get_path('module', 'activitystream_feed') .'/simplepie.inc';
+
+if (file_exists($path)) {
+  require_once $path;
+  }
+
+/**
+ * Implementation of hook_requirements().
+ */
+function activitystream_feed_requirements($phase) {
+  $requirements = array();
+  // Ensure translations don't break at install time
+  $t = get_t();
+  switch ($phase) {
+    case 'install' :
+    case 'runtime' :
+      $path = drupal_get_path('module', 'activitystream_feed') .'/simplepie.inc';
+      if (!file_exists($path)) {
+        $requirements['simplepie'] = array(
+          'title' => $t("ActivityStream Feed: SimplePie Parser"),
+          'description' => $t("Obtain the !simplepie package and copy simplepie.inc to the activitystream/activitystream_feed directory.",
+          array('!simplepie' => l('SimplePie', 'http://simplepie.org/downloads', array(), NULL, NULL, TRUE))),
+          'severity' => $phase == 'install' ? REQUIREMENT_WARNING : REQUIREMENT_ERROR,
+          'value' => $t('simplepie.inc file missing'),
+        );
+      }
+      elseif ($phase == 'runtime') {
+        require_once($path);
+        $requirements['simplepie'] = array(
+          'title' => $t('ActivityStream Feed: SimplePie Parser'),
+          'description' => t('The current installed version of SimplePie is !version',
+          array('!version' => '<strong>'. SIMPLEPIE_VERSION .'</strong>')),
+          'severity' => REQUIREMENT_OK,
+          'value' => $t('Installed correctly'),
+        );
+      }
+  }
+  return $requirements;
+}
 
 /*
  * The API passes in a $user object that contains four properties:
@@ -9,35 +54,35 @@ require_once 'simplepie.inc';
  * uid of their Drupal account.
  */
 function activitystream_feed_streamapi($user) {
-	// No feed URL, skip this one
-	if (!$user->feed) {
-		return;
-	}
-
-	$feed = new SimplePie();
-	$feed->set_cache_location('/tmp');
-	$feed->set_feed_url($user->feed);
-	$feed->set_useragent('Drupal Activity Streams');	
-  if(!$feed->init()) {
+  // No feed URL, skip this one
+  if (!$user->feed) {
+    return;
+  }
+
+  $feed = new SimplePie();
+  $feed->set_cache_location('/tmp');
+  $feed->set_feed_url($user->feed);
+  $feed->set_useragent('Drupal Activity Streams');  
+  if (!$feed->init()) {
     watchdog('activitystream', $feed->error, WATCHDOG_ERROR);
     return;
   }
 
-	$arrFeed = $feed->get_items();
-	$items = array();
-	if (is_array($arrFeed)) {
-		foreach($arrFeed as $item) {
-			$activity['link'] = $item->get_permalink();
-			$activity['title'] = $item->get_title();
-	    $activity['body'] = $item->get_description();
-      $activity['timestamp'] = strtotime(str_replace(',','',$item->get_date()));
-	    $activity['guid'] = md5($item->get_permalink());
-			$activity['data'] = serialize(array('favicon' => $feed->get_favicon(), 'feedtitle' => $feed->get_title()));
-			$items[] = $activity;
-		}
-	}
-	
-	return $items;
+  $arrfeed = $feed->get_items();
+  $items = array();
+  if (is_array($arrfeed)) {
+    foreach ($arrfeed as $item) {
+      $activity['link'] = $item->get_permalink();
+      $activity['title'] = $item->get_title();
+      $activity['body'] = $item->get_description();
+      $activity['timestamp'] = strtotime(str_replace(',', '', $item->get_date()));
+      $activity['guid'] = md5($item->get_permalink());
+      $activity['data'] = serialize(array('favicon' => $feed->get_favicon(), 'feedtitle' => $feed->get_title()));
+      $items[] = $activity;
+    }
+  }
+  
+  return $items;
 }
 
 /*
@@ -52,7 +97,7 @@ function activitystream_feed_streamapi($
  * use your module's name as the form array's key.
  */
 function activitystream_feed_activitystream_settings(&$edit) {
-	$form['activitystream_feed'] = array(
+  $form['activitystream_feed'] = array(
       '#type' => 'fieldset',
       '#title' => t('Feed settings'));
   $form['activitystream_feed']['activitystream_feed_feed'] = array(
@@ -61,26 +106,26 @@ function activitystream_feed_activitystr
   '#rows' => 15,
     '#default_value' => $edit['activitystream_feed_feed'],
     '#description' => t('URL of the feeds to import as an activity stream. Multiple feeds are allowed; place each on a seperate line.'));
-  return $form;	
+  return $form;  
 }
 
 function theme_activitystream_feed_icon($params) {
-	$params = unserialize($params);
-	// Return the favicon if we have it. Otherwise return a default feed icon.
-	if ($params['favicon']) {
-		return '<img src="' . $params['favicon'] . '" alt="' . $params['feedtitle'] . '" height="16" width="16"/>';		
-	} 
-	else {
-		return theme('image',drupal_get_path('module', 'activitystream_feed') . '/feed-icon-16x16.png',$params['feedtitle'],$params['feedtitle']);
-	}
+  $params = unserialize($params);
+  // Return the favicon if we have it. Otherwise return a default feed icon.
+  if ($params['favicon']) {
+    return '<img src="'. $params['favicon'] .'" alt="'. $params['feedtitle'] .'" height="16" width="16"/>';    
+  } 
+  else {
+    return theme('image', drupal_get_path('module', 'activitystream_feed') .'/feed-icon-16x16.png', $params['feedtitle'], $params['feedtitle']);
+  }
 }
 
 function theme_activitystream_feed_item($activity) {
-	$node = node_load($activity->nid);
-	$date = theme('activitystream_date',$node->created);
-	$user = user_load(array('uid' => $node->uid));
-	$name = theme('activitystream_username',$user);
-	return '<span class="activitystream-item">' . theme('activitystream_feed_icon',$activity->data) . " <span>$name posted " . l($node->title, $activity->link) . " <span class=\"activitystream-created\">$date</span></span>" . l('#', 'node/' . $node->nid, array('class' => 'permalink')) . '</span>'."\n";
+  $node = node_load($activity->nid);
+  $date = theme('activitystream_date', $node->created);
+  $user = user_load(array('uid' => $node->uid));
+  $name = theme('activitystream_username', $user);
+  return '<span class="activitystream-item">'. theme('activitystream_feed_icon', $activity->data) ." <span>$name posted ". l($node->title, $activity->link) ." <span class=\"activitystream-created\">$date</span></span>". l('#', 'node/'. $node->nid, array('class' => 'permalink')) .'</span>'."\n";
 }
 
 function activitystream_feed_theme() {
Only in sites/all/modules/activitystream/activitystream_feed: actvitystream_feed.install
Only in ../dp_installed_files/activitystream_orig/activitystream_feed: simplepie.inc
diff -urp ../dp_installed_files/activitystream_orig/activitystream_flickr/activitystream_flickr.module sites/all/modules/activitystream/activitystream_flickr/activitystream_flickr.module
--- ../dp_installed_files/activitystream_orig/activitystream_flickr/activitystream_flickr.module	2008-05-20 17:35:54.000000000 -0500
+++ sites/all/modules/activitystream/activitystream_flickr/activitystream_flickr.module	2008-07-28 19:35:08.000000000 -0500
@@ -1,5 +1,9 @@
 <?php
 // $Id: activitystream_flickr.module,v 1.2.2.1 2008/05/20 22:35:54 akalsey Exp $
+/**
+ * @file
+ * The module for importing Flickr Images.
+ */
 
 include('phpFlickr.php');
 
@@ -10,34 +14,34 @@ include('phpFlickr.php');
  * uid of their Drupal account.
  */
 function activitystream_flickr_streamapi($user) {
-	// This user doesn't have a Flickr ID entered
-	// into their settings. Move along. Nothing
-	// to see here.
-	if (!$user->userid) {
-		return;
-	}
-	$f = new phpFlickr(variable_get('activitystream_flickr_key', ''));
-	$person = $f->people_findByUsername($user->userid);
-	$baseurl = $f->urls_getUserPhotos($person['id']);
-	$photos = $f->people_getPublicPhotos($person['id'], NULL, 10);
-	
-	// There's no photos? Jump out.
-	if (!is_array($photos['photo'])) {
-		return;
-	}
-	 
-	$items = array();
-	foreach ($photos['photo'] as $photo) {
-		$info = $f->photos_getInfo($photo['id']);
-	  $link = $baseurl . $photo['id'];
-		$activity['guid'] = $photo['id'];
-		$activity['title'] = $photo['title'];
-		$activity['link'] = $link;
-	  $activity['body'] = '<img class="activitystream-flickr photo" alt="' . $photo['title'] . '" src="' . $f->buildPhotoURL($photo, "Square") . '" />';
-	  $activity['timestamp'] = $info['dateuploaded'];
-		$items[] = $activity;
-	}
-	return $items;
+  // This user doesn't have a Flickr ID entered
+  // into their settings. Move along. Nothing
+  // to see here.
+  if (!$user->userid) {
+    return;
+  }
+  $f = new phpFlickr(variable_get('activitystream_flickr_key', ''));
+  $person = $f->people_findByUsername($user->userid);
+  $baseurl = $f->urls_getUserPhotos($person['id']);
+  $photos = $f->people_getPublicPhotos($person['id'], NULL, 10);
+  
+  // There's no photos? Jump out.
+  if (!is_array($photos['photo'])) {
+    return;
+  }
+   
+  $items = array();
+  foreach ($photos['photo'] as $photo) {
+    $info = $f->photos_getInfo($photo['id']);
+    $link = $baseurl . $photo['id'];
+    $activity['guid'] = $photo['id'];
+    $activity['title'] = $photo['title'];
+    $activity['link'] = $link;
+    $activity['body'] = '<img class="activitystream-flickr photo" alt="'. $photo['title'] .'" src="'. $f->buildPhotoURL($photo, "Square") .'" />';
+    $activity['timestamp'] = $info['dateuploaded'];
+    $items[] = $activity;
+  }
+  return $items;
 }
 
 /*
@@ -48,22 +52,22 @@ function activitystream_flickr_streamapi
  * use your module's name as the form array's key.
  */
 function activitystream_flickr_activitystream_admin() {
-	$form['activitystream_flickr'] = array(
-		'#type' => 'fieldset',
-		'#title' => t("Flickr"),
-		'#description' => t("Flickr API settings."),
-		'#weight' => 1,
-		'#collapsible' => TRUE,
-		'#collapsed' => TRUE
-	);
-	$form['activitystream_flickr']['activitystream_flickr_key'] = array(
-		'#type' => 'textfield',
-		'#title' => t("API Key"),
-		'#description' => t("Your Flickr API Key"),
-		'#default_value' => variable_get('activitystream_flickr_key', ''),
-		'#required' => FALSE
-	);
-	return $form;
+  $form['activitystream_flickr'] = array(
+    '#type' => 'fieldset',
+    '#title' => t("Flickr"),
+    '#description' => t("Flickr API settings."),
+    '#weight' => 1,
+    '#collapsible' => TRUE,
+    '#collapsed' => TRUE
+  );
+  $form['activitystream_flickr']['activitystream_flickr_key'] = array(
+    '#type' => 'textfield',
+    '#title' => t("API Key"),
+    '#description' => t("Your Flickr API Key"),
+    '#default_value' => variable_get('activitystream_flickr_key', ''),
+    '#required' => FALSE
+  );
+  return $form;
 }
 
 /*
@@ -78,7 +82,7 @@ function activitystream_flickr_activitys
  * use your module's name as the form array's key.
  */
 function activitystream_flickr_activitystream_settings(&$edit) {
-	$form['activitystream_flickr'] = array(
+  $form['activitystream_flickr'] = array(
       '#type' => 'fieldset',
       '#title' => t('Flickr settings'));
   $form['activitystream_flickr']['activitystream_flickr_userid'] = array(
@@ -86,7 +90,7 @@ function activitystream_flickr_activitys
     '#title' => t('Username'),
     '#default_value' => $edit['activitystream_flickr_userid'],
     '#description' => t('The username for your Flickr account'));
-  return $form;	
+  return $form;  
 }
 
 /*
@@ -94,15 +98,15 @@ function activitystream_flickr_activitys
  * so you should stick with that. Return the full <img> tag for the image.
  */
 function theme_activitystream_flickr_icon() {
-	return theme_image(drupal_get_path('module', 'activitystream_flickr') . '/flickr.png', 'Flickr');
+  return theme_image(drupal_get_path('module', 'activitystream_flickr') .'/flickr.png', 'Flickr');
 }
 
 function theme_activitystream_flickr_item($action) {
-	$node = node_load($action->nid);
-	$date = theme('activitystream_date',$node->created);
-	$user = user_load(array('uid' => $node->uid));
-	$name = theme('activitystream_username',$user);
-	return '<span class="activitystream-item">' . theme('activitystream_flickr_icon') . " <span>$name posted " . l($node->title, $action->link) . " <span class=\"activitystream-created\">$date</span></span> " . l('#', 'node/' . $node->nid, array('class' => 'permalink')) . '</span>';
+  $node = node_load($action->nid);
+  $date = theme('activitystream_date', $node->created);
+  $user = user_load(array('uid' => $node->uid));
+  $name = theme('activitystream_username', $user);
+  return '<span class="activitystream-item">'. theme('activitystream_flickr_icon') ." <span>$name posted " . l($node->title, $action->link) ." <span class=\"activitystream-created\">$date</span></span> ". l('#', 'node/'. $node->nid, array('class' => 'permalink')) .'</span>';
 }
 
 
diff -urp ../dp_installed_files/activitystream_orig/activitystream_lastfm/activitystream_lastfm.module sites/all/modules/activitystream/activitystream_lastfm/activitystream_lastfm.module
--- ../dp_installed_files/activitystream_orig/activitystream_lastfm/activitystream_lastfm.module	2008-05-20 17:35:55.000000000 -0500
+++ sites/all/modules/activitystream/activitystream_lastfm/activitystream_lastfm.module	2008-07-28 19:35:08.000000000 -0500
@@ -1,6 +1,11 @@
 <?php
 // $Id: activitystream_lastfm.module,v 1.1.4.1 2008/05/20 22:35:55 akalsey Exp $
 
+/**
+ * @file
+ * The module for importing LastFM activity.
+ */
+
 /*
  * The API passes in a $user object that contains four properties:
  * uid, userid, password, feed. These properties contain the account
@@ -8,16 +13,16 @@
  * uid of their Drupal account.
  */
 function activitystream_lastfm_streamapi($user) {
-	// This user doesn't have a lastfm ID entered
-	if (!$user->userid) {
-		return;
-	}
-	
-	// Use the activitystream_feed module to pull in the user's
-	// history. 
-	$user->feed = 'http://ws.audioscrobbler.com/1.0/user/'.$user->userid . '/recenttracks.rss';
-	$items = activitystream_feed_streamapi($user);
-	return $items;
+  // This user doesn't have a lastfm ID entered
+  if (!$user->userid) {
+    return;
+  }
+  
+  // Use the activitystream_feed module to pull in the user's
+  // history. 
+  $user->feed = 'http://ws.audioscrobbler.com/1.0/user/'. $user->userid .'/recenttracks.rss';
+  $items = activitystream_feed_streamapi($user);
+  return $items;
 }
 
 
@@ -37,7 +42,7 @@ function activitystream_lastfm_streamapi
  * 
  */
 function activitystream_lastfm_activitystream_settings(&$edit) {
-	$form['activitystream_lastfm'] = array(
+  $form['activitystream_lastfm'] = array(
       '#type' => 'fieldset',
       '#title' => t('lastfm settings'));
   $form['activitystream_lastfm']['activitystream_lastfm_userid'] = array(
@@ -45,19 +50,19 @@ function activitystream_lastfm_activitys
     '#title' => t('Username'),
     '#default_value' => $edit['activitystream_lastfm_userid'],
     '#description' => t('The username for your lastfm account'));
-  return $form;	
+  return $form;  
 }
 
 function theme_activitystream_lastfm_icon() {
-	return theme_image(drupal_get_path('module', 'activitystream_lastfm') . '/lastfm.png', 'Last.fm');
+  return theme_image(drupal_get_path('module', 'activitystream_lastfm') .'/lastfm.png', 'Last.fm');
 }
 
 function theme_activitystream_lastfm_item($activity) {
-	$node = node_load($activity->nid);
-	$date = theme('activitystream_date',$node->created);
-	$user = user_load(array('uid' => $node->uid));
-	$name = theme('activitystream_username',$user);
-	return '<span class="activitystream-item">' . theme('activitystream_lastfm_icon') . " <span>$name listened to " . l($node->title, $activity->link) . " <span class=\"activitystream-created\">$date</span></span>" . l('#', 'node/' . $node->nid, array('class' => 'permalink')) . '</span>';
+  $node = node_load($activity->nid);
+  $date = theme('activitystream_date', $node->created);
+  $user = user_load(array('uid' => $node->uid));
+  $name = theme('activitystream_username', $user);
+  return '<span class="activitystream-item">'. theme('activitystream_lastfm_icon') ." <span>$name listened to ". l($node->title, $activity->link) ." <span class=\"activitystream-created\">$date</span></span>". l('#', 'node/'. $node->nid, array('class' => 'permalink')) .'</span>';
 }
 
 function activitystream_lastfm_theme() {
diff -urp ../dp_installed_files/activitystream_orig/activitystream_twitter/activitystream_twitter.module sites/all/modules/activitystream/activitystream_twitter/activitystream_twitter.module
--- ../dp_installed_files/activitystream_orig/activitystream_twitter/activitystream_twitter.module	2008-05-20 17:35:55.000000000 -0500
+++ sites/all/modules/activitystream/activitystream_twitter/activitystream_twitter.module	2008-07-28 19:35:08.000000000 -0500
@@ -1,5 +1,9 @@
 <?php
 // $Id: activitystream_twitter.module,v 1.2.2.1 2008/05/20 22:35:55 akalsey Exp $
+/**
+ * @file
+ * The module for importing twitter activity.
+ */
 
 /*
  * The API passes in a $user object that contains four properties:
@@ -8,22 +12,22 @@
  * uid of their Drupal account.
  */
 function activitystream_twitter_streamapi($user) {
-	// This user doesn't have a twitter ID entered
-	if (!$user->userid) {
-		return;
-	}
-	
-	// Use the activitystream_feed module to pull in the user's
-	// tweets. 
-	$user->feed = 'http://twitter.com/statuses/user_timeline/'.$user->userid . '.rss';
-	$items = activitystream_feed_streamapi($user);
-	foreach ($items as $tweet) {
-		$userid = $user->userid . ':';
-		$tweet['title'] = preg_replace('/^'.$userid.' /', '', $tweet['title']);
+  // This user doesn't have a twitter ID entered
+  if (!$user->userid) {
+    return;
+  }
+  
+  // Use the activitystream_feed module to pull in the user's
+  // tweets. 
+  $user->feed = 'http://twitter.com/statuses/user_timeline/'. $user->userid .'.rss';
+  $items = activitystream_feed_streamapi($user);
+  foreach ($items as $tweet) {
+    $userid = $user->userid .':';
+    $tweet['title'] = preg_replace('/^'. $userid .' /', '', $tweet['title']);
     $tweet['body'] = activitystream_twitter_makelinks($tweet['body']);
-		$newitems[] = $tweet;
-	}
-	return $newitems;
+    $newitems[] = $tweet;
+  }
+  return $newitems;
 }
 
 /*
@@ -43,7 +47,7 @@ function activitystream_twitter_streamap
  */
 
 function activitystream_twitter_activitystream_settings(&$edit) {
-	$form['activitystream_twitter'] = array(
+  $form['activitystream_twitter'] = array(
       '#type' => 'fieldset',
       '#title' => t('Twitter settings'));
   $form['activitystream_twitter']['activitystream_twitter_userid'] = array(
@@ -51,20 +55,20 @@ function activitystream_twitter_activity
     '#title' => t('Username'),
     '#default_value' => $edit['activitystream_twitter_userid'],
     '#description' => t('The username for your Twitter account'));
-  return $form;	
+  return $form;  
 }
 
 function theme_activitystream_twitter_icon() {
-	return theme_image(drupal_get_path('module', 'activitystream_twitter') . '/twitter.png', 'Twitter');
+  return theme_image(drupal_get_path('module', 'activitystream_twitter') .'/twitter.png', 'Twitter');
 }
 
 function theme_activitystream_twitter_item($activity) {
-	$node = node_load($activity->nid);
-	$date = theme('activitystream_date',$node->created);
-	$user = user_load(array('uid' => $node->uid));
+  $node = node_load($activity->nid);
+  $date = theme('activitystream_date', $node->created);
+  $user = user_load(array('uid' => $node->uid));
   $title = activitystream_twitter_makelinks($node->title);
-	$name = theme('activitystream_username',$user);
-	 return '<span class="activitystream-item">' . theme('activitystream_twitter_icon') . " <span>$name " . l('tweeted', $activity->link) . " \"" . $title . "\" <span class=\"activitystream-created\">$date</span></span>" . l('#', 'node/' . $node->nid, array('class' => 'permalink')) . '</span>';
+  $name = theme('activitystream_username', $user);
+   return '<span class="activitystream-item">'. theme('activitystream_twitter_icon') ." <span>$name ". l('tweeted', $activity->link) ." \"". $title ."\" <span class=\"activitystream-created\">$date</span></span>". l('#', 'node/'. $node->nid, array('class' => 'permalink')) .'</span>';
 }
 function activitystream_twitter_makelinks($text) {
   // autolink URLS
